1
0
mirror of https://github.com/mainflux/mainflux.git synced 2025-05-12 19:29:30 +08:00
Nick Neisen 66487eda42 MF-788 - Remove date and minimize copyright comments (#876)
* 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>
2019-10-07 16:14:47 +02:00

30 lines
736 B
Go

// Copyright (c) Mainflux
// SPDX-License-Identifier: Apache-2.0
package readers
import (
"errors"
"github.com/mainflux/mainflux"
)
// ErrNotFound indicates that requested entity doesn't exist.
var ErrNotFound = errors.New("entity not found")
// MessageRepository specifies message reader API.
type MessageRepository interface {
// ReadAll skips given number of messages for given channel and returns next
// limited number of messages.
ReadAll(string, uint64, uint64, map[string]string) (MessagesPage, error)
}
// MessagesPage contains page related metadata as well as list of messages that
// belong to this page.
type MessagesPage struct {
Total uint64
Offset uint64
Limit uint64
Messages []mainflux.Message
}