do not expose low level message.Message to publish

This commit is contained in:
Marcelo Pires
2018-09-06 13:03:21 +02:00
parent c8bfbbd8fd
commit eed039f351
4 changed files with 13 additions and 11 deletions

View File

@ -4,6 +4,8 @@ import "errors"
type Extension func(message *Message)
type Data = interface{}
type Message struct {
Channel string `json:"channel,omitempty"`
Version string `json:"version,omitempty"`
@ -15,7 +17,7 @@ type Message struct {
Id string `json:"id,omitempty"`
ClientId string `json:"clientId,omitempty"`
Advice Advise `json:"advice,omitempty"`
Data interface{} `json:"data,omitempty"`
Data Data `json:"data,omitempty"`
Timestamp uint64 `json:"timestamp,omitempty"`
AuthSuccessful bool `json:"authSuccessful,omitempty"`
Error string `json:"error,omitempty"`