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

* Enable Message JSON mashaling/unmarshaling Update Protobuf generated files. Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com> * Update readers and SDK to use Mainflux Message Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com> * Fix alignment Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
33 lines
495 B
Go
33 lines
495 B
Go
//
|
|
// Copyright (c) 2018
|
|
// Mainflux
|
|
//
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
|
|
package api
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/mainflux/mainflux"
|
|
)
|
|
|
|
var _ mainflux.Response = (*listMessagesRes)(nil)
|
|
|
|
type listMessagesRes struct {
|
|
Messages []mainflux.Message `json:"messages"`
|
|
}
|
|
|
|
func (res listMessagesRes) Headers() map[string]string {
|
|
return map[string]string{}
|
|
}
|
|
|
|
func (res listMessagesRes) Code() int {
|
|
return http.StatusOK
|
|
}
|
|
|
|
func (res listMessagesRes) Empty() bool {
|
|
return false
|
|
}
|