Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAPI ¶
func NewAPI() transports.MessageAPI
newAPI is a required function for returning the implemented interface transports.MessageAPI This function is used by the router in order to fetch the specific type defined here.
Types ¶
type MyAPI ¶
type MyAPI struct { ID string `json:"request"` Method string `json:"method,omitempty"` PubKeys []string `json:"pubKeys,omitempty"` Timestamp int32 `json:"timestamp"` Error string `json:"error,omitempty"` Reply string `json:"reply,omitempty"` }
MyAPI is an example JSON API type compatible with transports.MessageAPI
func (*MyAPI) SetTimestamp ¶
SetTimestamp sets the timestamp
Click to show internal directories.
Click to hide internal directories.