Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("Not found")
ErrNotFound indicates that the operation did not return a result
Functions ¶
This section is empty.
Types ¶
type EntityData ¶
type EntityData struct {
Channel *channel.ChannelData `json:"channel,omitempty"`
Asterisk *asterisk.AsteriskInfo `json:"asterisk,omitempty"`
Bridge *bridge.BridgeData `json:"bridge,omitempty"`
Playback *play.PlaybackData `json:"playback,omitempty"`
StoredRecording *recordings.StoredRecordingData `json:"stored_recording,omitempty"`
LiveRecording *recordings.LiveRecordingData `json:"live_recording,omitempty"`
ChannelList []*channel.ChannelData `json:"channellist,omitempty"`
Variable string `json:"variable,omitempty"`
}
type Response ¶
type Response struct {
// Error is the error encountered
Error string `json:"error"`
Code int `json:"code,omitempty"`
// Data is the returned entity data, if applicable
Data *EntityData `json:"data,omitempty"`
// Key is the key of the returned entity, if applicable
Key *key.Key `json:"key,omitempty"`
// Keys is the list of keys of any matching entities, if applicable
Keys []*key.Key `json:"keys,omitempty"`
}
func NewErrorResponse ¶
NewErrorResponse wraps an error as an ErrorResponse
func (*Response) Err ¶
Err returns an error from the Response. If the response's Error is empty, a nil error is returned. Otherwise, the error will be filled with the value of response.Error.
func (*Response) IsNotFound ¶
IsNotFound indicates that the retuned error response was a Not Found error response
Click to show internal directories.
Click to hide internal directories.