1
0
mirror of https://github.com/mainflux/mainflux.git synced 2025-04-28 13:48:49 +08:00

33 lines
468 B
Go
Raw Normal View History

//
// Copyright (c) 2018
// Mainflux
//
// SPDX-License-Identifier: Apache-2.0
//
2018-05-10 23:53:25 +02:00
package http
import (
"net/http"
"github.com/mainflux/mainflux"
)
var _ mainflux.Response = (*tokenRes)(nil)
type tokenRes struct {
Token string `json:"token,omitempty"`
}
func (res tokenRes) Code() int {
return http.StatusCreated
}
func (res tokenRes) Headers() map[string]string {
return map[string]string{}
}
func (res tokenRes) Empty() bool {
return res.Token == ""
}