AppNamestring`json:"name"`// Name of the related application stored in the main database
Errorbool`json:"error"`// True if the message is an error message
Messagestring`json:"message"`
}
func(s*StateMessage)JSON()([]byte,error){
returnjson.Marshal(s)
}
// ReplyMessage is returned as reply to a message that requires replying
typeReplyMessagestruct{
AppNamestring`json:"name,omitempty"`
Errorbool`json:"error,omitempty"`// True if this message is an error message and in that case Payload is string with an error message, otherwise it's standard response