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

* Update copyright comment for go files Signed-off-by: nwneisen <nwneisen@gmail.com> * Update copyright in assortment of file types Signed-off-by: nwneisen <nwneisen@gmail.com> * Remove missed copyright date Signed-off-by: nwneisen <nwneisen@gmail.com>
32 lines
571 B
Go
32 lines
571 B
Go
// Copyright (c) Mainflux
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package api
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/mainflux/mainflux"
|
|
)
|
|
|
|
var _ mainflux.Response = (*pageRes)(nil)
|
|
|
|
type pageRes struct {
|
|
Total uint64 `json:"total"`
|
|
Offset uint64 `json:"offset"`
|
|
Limit uint64 `json:"limit"`
|
|
Messages []mainflux.Message `json:"messages"`
|
|
}
|
|
|
|
func (res pageRes) Headers() map[string]string {
|
|
return map[string]string{}
|
|
}
|
|
|
|
func (res pageRes) Code() int {
|
|
return http.StatusOK
|
|
}
|
|
|
|
func (res pageRes) Empty() bool {
|
|
return false
|
|
}
|