2018-08-26 19:15:48 +08:00
|
|
|
//
|
|
|
|
// Copyright (c) 2018
|
|
|
|
// Mainflux
|
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
//
|
|
|
|
|
2018-08-06 23:06:55 +08:00
|
|
|
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.
|
2019-03-16 01:38:07 +08:00
|
|
|
ReadAll(string, uint64, uint64, map[string]string) []mainflux.Message
|
2018-08-06 23:06:55 +08:00
|
|
|
}
|