You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
568 B
Go

package main
import ()
type Message struct {
Key []byte
From []byte
To string
Text []byte
}
func (m Message) Kind() string {
return "message"
}
type ListMessages struct {
N int
}
func (l ListMessages) Kind() string {
return "list-messages"
}
type ListMessagesResponseItem struct {
Id int
Key []byte
From []byte
}
type ListMessagesResponse []ListMessagesResponseItem
func (l ListMessagesResponse) Kind() string {
return "list-messages-response"
}
type GetMessage struct {
Id int
}
func (g GetMessage) Kind() string {
return "get-message"
}