PUT/POST as JSON, relates to #133
This commit is contained in:
parent
53375ff559
commit
37d4d5d647
2 changed files with 55 additions and 0 deletions
|
@ -42,6 +42,18 @@ type attachment struct {
|
|||
Owner string `json:"-"` // IP address of uploader, used for rate limiting
|
||||
}
|
||||
|
||||
// publishMessage is used as input when publishing as JSON
|
||||
type publishMessage struct {
|
||||
Topic string `json:"topic"`
|
||||
Title string `json:"title"`
|
||||
Message string `json:"message"`
|
||||
Priority string `json:"priority"`
|
||||
Tags string `json:"tags"`
|
||||
Click string `json:"click"`
|
||||
Attach string `json:"attach"`
|
||||
Filename string `json:"filename"`
|
||||
}
|
||||
|
||||
// messageEncoder is a function that knows how to encode a message
|
||||
type messageEncoder func(msg *message) (string, error)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue