Versions in this module Expand all Collapse all v1 v1.0.0 Feb 3, 2018 Changes in this version + type Command struct + App string + Args string + Sync bool + UId string + func (cmd *Command) Serialize() []byte + func (cmd Command) Execute(con *Connection) (*Event, error) + type Connection struct + Address string + Connected bool + Handler ConnectionHandler + MaxRetries int + Password string + Timeout time.Duration + UserData interface{} + func NewConnection(host string, handler ConnectionHandler) (*Connection, error) + func (con *Connection) Api(cmd string, args ...string) (string, error) + func (con *Connection) Authenticate() error + func (con *Connection) BgApi(cmd string, args ...string) (string, error) + func (con *Connection) Close() + func (con *Connection) ConnectRetry(MaxRetries int) error + func (con *Connection) Execute(app string, uuid string, params ...string) (*Event, error) + func (con *Connection) ExecuteSync(app string, uuid string, params ...string) (*Event, error) + func (con *Connection) HandleEvents() error + func (con *Connection) MustSendRecv(cmd string, args ...string) *Event + func (con *Connection) SendEvent(cmd string, headers map[string]string, body []byte) (*Event, error) + func (con *Connection) SendRecv(cmd string, args ...string) (*Event, error) + func (con *Connection) Write(b []byte) (int, error) + type ConnectionHandler interface + OnClose func(con *Connection) + OnConnect func(con *Connection) + OnDisconnect func(con *Connection, ev *Event) + OnEvent func(con *Connection, ev *Event) + type Event struct + App string + AppData string + Body MIMEMap + Header MIMEMap + Name EventName + RawBody []byte + Stamp int + Type EventType + UId string + func NewEventFromReader(r *bufio.Reader) (*Event, error) + func (e *Event) GetTextBody() string + func (e Event) Get(header string) string + func (e Event) String() string + type EventName int + const ADD_SCHEDULE + const ALL + const API + const BACKGROUND_JOB + const CALL_DETAIL + const CALL_SECURE + const CALL_SETUP_REQ + const CALL_SETUP_RESULT + const CALL_UPDATE + const CHANNEL_ANSWER + const CHANNEL_APPLICATION + const CHANNEL_BRIDGE + const CHANNEL_CALLSTATE + const CHANNEL_CREATE + const CHANNEL_DATA + const CHANNEL_DESTROY + const CHANNEL_EXECUTE + const CHANNEL_EXECUTE_COMPLETE + const CHANNEL_HANGUP + const CHANNEL_HANGUP_COMPLETE + const CHANNEL_HOLD + const CHANNEL_ORIGINATE + const CHANNEL_OUTGOING + const CHANNEL_PARK + const CHANNEL_PROGRESS + const CHANNEL_PROGRESS_MEDIA + const CHANNEL_STATE + const CHANNEL_UNBRIDGE + const CHANNEL_UNHOLD + const CHANNEL_UNPARK + const CHANNEL_UUID + const CLIENT_DISCONNECTED + const CLONE + const CODEC + const COMMAND + const CONFERENCE_DATA + const CONFERENCE_DATA_QUERY + const CUSTOM + const DEL_SCHEDULE + const DETECTED_SPEECH + const DETECTED_TONE + const DEVICE_STATE + const DTMF + const EXE_SCHEDULE + const FAILURE + const GENERAL + const HEARTBEAT + const INBOUND_CHAN + const LOG + const MEDIA_BUG_START + const MEDIA_BUG_STOP + const MESSAGE + const MESSAGE_QUERY + const MESSAGE_WAITING + const MODULE_LOAD + const MODULE_UNLOAD + const NAT + const NOTALK + const NOTIFY + const NOTIFY_IN + const OUTBOUND_CHAN + const PHONE_FEATURE + const PHONE_FEATURE_SUBSCRIBE + const PLAYBACK_START + const PLAYBACK_STOP + const PRESENCE_IN + const PRESENCE_OUT + const PRESENCE_PROBE + const PRIVATE_COMMAND + const PUBLISH + const RECORD_START + const RECORD_STOP + const RECV_INFO + const RECV_MESSAGE + const RECV_RTCP_MESSAGE + const RELOADXML + const REQUEST_PARAMS + const RE_SCHEDULE + const ROSTER + const SEND_INFO + const SEND_MESSAGE + const SERVER_DISCONNECTED + const SESSION_CRASH + const SESSION_HEARTBEAT + const SHUTDOWN + const SOCKET_DATA + const STARTUP + const TALK + const TRAP + const UNPUBLISH + func EventNameString(s string) (EventName, error) + func (i EventName) String() string + type EventType int + const EventApiResponse + const EventAuth + const EventCommandReply + const EventConnect + const EventDisconnect + const EventError + const EventGeneric + const EventState + type MIMEMap struct + IsEscaped bool + Map textproto.MIMEHeader + func (m MIMEMap) Get(key string) string + func (m MIMEMap) String() string