Documentation
¶
Index ¶
Constants ¶
View Source
const DateFormat = "2006-01-02T15:04:05.000-0700"
DateFormat is the date format that ARI returns in the JSON bodies
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AMIClientInterface ¶
type Config ¶
type Config interface { Get() (*ConfigData, error) Put(cfg *ConfigData) error Delete() error }
type ConfigData ¶
type ConfigData struct { NatsUrl string UserName string Password string Server string Port int Verbose bool Events bool }
func NewConfig ¶
func NewConfig() *ConfigData
func (ConfigData) Delete ¶
func (c ConfigData) Delete() error
func (ConfigData) Get ¶
func (c ConfigData) Get() (*ConfigData, error)
func (ConfigData) Put ¶
func (c ConfigData) Put(*ConfigData) error
type DateTime ¶
DateTime is an alias type for attaching a custom asterisk unmarshaller and marshaller for JSON
func (DateTime) MarshalJSON ¶
MarshalJSON converts the given date object to ARIs date format
func (*DateTime) UnmarshalJSON ¶
UnmarshalJSON parses the given date per ARIs date format
type DurationSec ¶
DurationSec is a JSON type for duration in seconds
func (DurationSec) MarshalJSON ¶
func (ds DurationSec) MarshalJSON() ([]byte, error)
MarshalJSON converts the duration into a JSON friendly format
func (*DurationSec) UnmarshalJSON ¶
func (ds *DurationSec) UnmarshalJSON(data []byte) error
UnmarshalJSON parses the data into the duration seconds object
type EventType ¶ added in v1.0.2
type EventType string
const ( All EventType = "all" FullyBooted EventType = "FullyBooted" Hangup EventType = "Hangup" Newstate EventType = "Newstate" DialEnd EventType = "DialEnd" SoftHangupRequest EventType = "SoftHangupRequest" HangupRequest EventType = "HangupRequest" MixMonitorStart EventType = "MixMonitorStart" MixMonitorStop EventType = "MixMonitorStop" NewConnectedLine EventType = "NewConnectedLine" DialBegin EventType = "DialBegin" NewCallerid EventType = "NewCallerid" NewAccountCode EventType = "NewAccountCode" )
type RequestHandlerFunc ¶ added in v1.0.2
Click to show internal directories.
Click to hide internal directories.