Documentation ¶
Index ¶
- type Action
- type Command
- type JSON
- func (json *JSON) Action(name string, t string, payload interface{}, next string) *JSON
- func (json *JSON) Append(content []byte) []byte
- func (json *JSON) Bind(data map[string]interface{}) *JSON
- func (json *JSON) Command(name, id, request string) *JSON
- func (json *JSON) Confirm() *JSON
- func (json *JSON) Done() *JSON
- func (json *JSON) IsDone() bool
- func (json *JSON) String() string
- func (json *JSON) Text(text string) *JSON
- func (json *JSON) Write(w io.Writer) bool
- type Message
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct { Name string `json:"name,omitempty"` Type string `json:"type"` Payload interface{} `json:"payload,omitempty"` Next string `json:"next,omitempty"` }
Action the action
type Command ¶
type Command struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Reqeust string `json:"request,omitempty"` }
Command the command
type JSON ¶
type JSON struct{ *Message }
JSON the JSON message
type Message ¶
type Message struct { Text string `json:"text,omitempty"` Error string `json:"error,omitempty"` Done bool `json:"done,omitempty"` Confirm bool `json:"confirm,omitempty"` Command *Command `json:"command,omitempty"` Actions []Action `json:"actions,omitempty"` Data map[string]interface{} }
Message the message
Click to show internal directories.
Click to hide internal directories.