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

24 lines
372 B
Go
Raw Normal View History

// Copyright (c) Mainflux
// SPDX-License-Identifier: Apache-2.0
package api
import "github.com/mainflux/mainflux/readers"
type apiReq interface {
validate() error
}
type listMessagesReq struct {
chanID string
pageMeta readers.PageMetadata
}
func (req listMessagesReq) validate() error {
if req.pageMeta.Limit < 1 {
return errInvalidRequest
}
return nil
}