go-gun/gun/message.go

24 lines
626 B
Go
Raw Normal View History

2019-02-22 09:23:14 +00:00
package gun
type Message struct {
Ack string `json:"@,omitEmpty"`
ID string `json:"#,omitEmpty"`
To string `json:"><,omitEmpty"`
Hash string `json:"##,omitempty"`
How string `json:"how,omitempty"`
Get *MessageGetRequest `json:"get,omitempty"`
Put map[string]*Node `json:"put,omitempty"`
DAM string `json:"dam,omitempty"`
PID string `json:"pid,omitempty"`
}
type MessageGetRequest struct {
Soul string `json:"#,omitempty"`
Field string `json:".,omitempty"`
}
type MessageReceived struct {
*Message
2019-02-22 18:40:02 +00:00
peer *gunPeer
2019-02-22 09:23:14 +00:00
}