Documentation ¶
Overview ¶
Package gami provites primitives for interacting with Asterisk AMI
Index ¶
- Variables
- func UnsecureTLS(c *AMIClient)
- func UseTLS(c *AMIClient)
- func UseTLSConfig(config *tls.Config) func(*AMIClient)
- type AMIClient
- func (client *AMIClient) Action(action string, params Params) (*AMIResponse, error)
- func (client *AMIClient) AsyncAction(action string, params Params) (<-chan *AMIResponse, error)
- func (client *AMIClient) Close()
- func (client *AMIClient) Login(username, password string) error
- func (client *AMIClient) NewConn() (err error)
- func (client *AMIClient) Reconnect() error
- func (client *AMIClient) Run()
- type AMIEvent
- type AMIResponse
- type Params
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotAMI = errors.New("Server not AMI interface")
Raise when not response expected protocol AMI
Functions ¶
func UnsecureTLS ¶
func UnsecureTLS(c *AMIClient)
func UseTLSConfig ¶
Types ¶
type AMIClient ¶
type AMIClient struct { // Events for client parse Events chan *AMIEvent // Error Raise on logic Error chan error //NetError a network error NetError chan error // contains filtered or unexported fields }
AMIClient a connection to AMI server
func (*AMIClient) Action ¶
func (client *AMIClient) Action(action string, params Params) (*AMIResponse, error)
Action send with params
func (*AMIClient) AsyncAction ¶
func (client *AMIClient) AsyncAction(action string, params Params) (<-chan *AMIResponse, error)
AsyncAction return chan for wait response of action with parameter *ActionID* this can be helpful for massive actions,
type AMIEvent ¶
type AMIEvent struct { //Identification of event Event: xxxx ID string Privilege []string // Params of arguments received Params map[string]string }
AMIEvent it's a representation of Event readed
type AMIResponse ¶
AMIResponse from action
Click to show internal directories.
Click to hide internal directories.