|
|
@ -19,21 +19,21 @@ type RunOptions struct { |
|
|
|
|
|
|
|
|
|
|
|
// ChatAPI holds information about a message received by the `keybase chat api-listen` command
|
|
|
|
// ChatAPI holds information about a message received by the `keybase chat api-listen` command
|
|
|
|
type ChatAPI struct { |
|
|
|
type ChatAPI struct { |
|
|
|
Type string `json:"type,omitempty"` |
|
|
|
Type string `json:"type,omitempty"` |
|
|
|
Source string `json:"source,omitempty"` |
|
|
|
Source string `json:"source,omitempty"` |
|
|
|
Msg *msg `json:"msg,omitempty"` |
|
|
|
Msg *msg `json:"msg,omitempty"` |
|
|
|
Method string `json:"method,omitempty"` |
|
|
|
Method string `json:"method,omitempty"` |
|
|
|
Params *params `json:"params,omitempty"` |
|
|
|
Params *params `json:"params,omitempty"` |
|
|
|
Message string `json:"message,omitempty"` |
|
|
|
Message string `json:"message,omitempty"` |
|
|
|
ID int `json:"id,omitempty"` |
|
|
|
ID int `json:"id,omitempty"` |
|
|
|
Ratelimits []rateLimits `json:"ratelimits,omitempty"` |
|
|
|
Ratelimits []rateLimits `json:"ratelimits,omitempty"` |
|
|
|
Notification *notification `json:"notification,omitempty"` |
|
|
|
Notification *notification `json:"notification,omitempty"` |
|
|
|
Result *result `json:"result,omitempty"` |
|
|
|
Result *result `json:"result,omitempty"` |
|
|
|
Pagination *pagination `json:"pagination,omitempty"` |
|
|
|
Pagination *pagination `json:"pagination,omitempty"` |
|
|
|
ErrorRaw json.RawMessage `json:"error,omitempty"` // Raw JSON string containit any errors returned
|
|
|
|
ErrorRaw *json.RawMessage `json:"error,omitempty"` // Raw JSON string containing any errors returned
|
|
|
|
ErrorRead *Error `json:"-"` // Errors returned by any outgoing chat functions such as Read(), Edit(), etc
|
|
|
|
ErrorRead *Error `json:"-"` // Errors returned by any outgoing chat functions such as Read(), Edit(), etc
|
|
|
|
ErrorListen *string `json:"-"` // Errors returned by the api-listen command (used in the Run() function)
|
|
|
|
ErrorListen *string `json:"-"` // Errors returned by the api-listen command (used in the Run() function)
|
|
|
|
keybase Keybase // Some methods will need this, so I'm passing it but keeping it unexported
|
|
|
|
keybase Keybase // Some methods will need this, so I'm passing it but keeping it unexported
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
type sender struct { |
|
|
|
type sender struct { |
|
|
|