github.com/status-im/status-go@v1.1.0/protocol/requests/fetch_messages.go (about) 1 package requests 2 3 import ( 4 "errors" 5 ) 6 7 var ErrFetchMessagesInvalidID = errors.New("fetch-messages: invalid id") 8 9 type FetchMessages struct { 10 ID string `json:"id"` 11 } 12 13 func (c *FetchMessages) Validate() error { 14 if len(c.ID) == 0 { 15 return ErrFetchMessagesInvalidID 16 } 17 18 return nil 19 }