cmd

package
v0.0.0-...-98b6286 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: GPL-3.0 Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cmd

type Cmd struct {
	ID      string
	Command string
	// contains filtered or unexported fields
}

func New

func New(command string, id string, p *proxy.Proxy) (c *Cmd)

func (*Cmd) CallAttendedTransfer

func (c *Cmd) CallAttendedTransfer(params map[string]interface{})

func (*Cmd) CallBlindTransfer

func (c *Cmd) CallBlindTransfer(params map[string]interface{})

func (*Cmd) CallEnd

func (c *Cmd) CallEnd(params map[string]interface{})

func (*Cmd) CallHold

func (c *Cmd) CallHold(params map[string]interface{})

func (*Cmd) CallStart

func (c *Cmd) CallStart(params map[string]interface{})

func (*Cmd) CallUnhold

func (c *Cmd) CallUnhold(params map[string]interface{})

func (*Cmd) Echo

func (c *Cmd) Echo(params map[string]interface{})

func (*Cmd) Notify

func (c *Cmd) Notify(ce *CmdEvent)

Notify an arbitrary event

func (*Cmd) NotifyEnd

func (c *Cmd) NotifyEnd()

Notify the termination of the command handling

func (*Cmd) NotifyError

func (c *Cmd) NotifyError(err error)

Notify an existing error - closes the channel

func (*Cmd) NotifyEvent

func (c *Cmd) NotifyEvent(name string, event interface{})

Notify an event

func (*Cmd) NotifyNewError

func (c *Cmd) NotifyNewError(err string)

Notify a new error - closes the channel

func (*Cmd) Run

func (c *Cmd) Run(params map[string]interface{}) (err error)

func (*Cmd) RunSync

func (c *Cmd) RunSync(params map[string]interface{}) error

func (*Cmd) Test

func (c *Cmd) Test(params map[string]interface{})

func (*Cmd) Wait

func (c *Cmd) Wait() chan *CmdEvent

type CmdEvent

type CmdEvent struct {
	Error  error
	Name   string
	Params interface{}
}

func NewError

func NewError(err error) (c *CmdEvent)

func NewEvent

func NewEvent(name string, event interface{}) (c *CmdEvent)

func (*CmdEvent) HasParams

func (c *CmdEvent) HasParams() bool

func (*CmdEvent) IsError

func (c *CmdEvent) IsError() bool

func (*CmdEvent) String

func (c *CmdEvent) String() string

type Notify

type Notify func(cmd *Cmd, notify interface{})

Jump to

Keyboard shortcuts

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