aringo

package module
v0.0.0-...-47cdb11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2016 License: MIT Imports: 11 Imported by: 0

README

aringo

Asterisk ARI connector

Documentation

Index

Constants

View Source
const (
	HTTP_POST   = "POST"
	HTTP_GET    = "GET"
	HTTP_DELETE = "DELETE"
)

Variables

View Source
var (
	ErrZeroConnectAttempts = errors.New("ZERO_CONNECT_ATTEMPTS")
)

Functions

func Fib

func Fib() func() time.Duration

successive Fibonacci numbers.

func NewErrUnexpectedReplyCode

func NewErrUnexpectedReplyCode(statusCode int) error

Types

type ARInGO

type ARInGO struct {
	// contains filtered or unexported fields
}

ARInGO represents one ARI connection/application

func NewARInGO

func NewARInGO(wsUrl, wsOrigin, username, password, userAgent string,
	evChannel chan map[string]interface{}, errChannel chan error, connectAttempts, reconnects int) (ari *ARInGO, err error)

func (*ARInGO) Call

func (ari *ARInGO) Call(method, reqUrl string, data url.Values) (reply map[string]interface{}, err error)

Call represents one REST call to Asterisk using httpClient call If there is a reply from Asterisk it should be in form map[string]interface{}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL