status-go/protocol/requests/fetch_messages.go
2023-11-29 09:31:02 +00:00

20 lines
285 B
Go

package requests
import (
"errors"
)
var ErrFetchMessagesInvalidID = errors.New("fetch-messages: invalid id")
type FetchMessages struct {
ID string `json:"id"`
}
func (c *FetchMessages) Validate() error {
if len(c.ID) == 0 {
return ErrFetchMessagesInvalidID
}
return nil
}