Versions in this module Expand all Collapse all v1 v1.0.3 May 25, 2023 v1.0.2 May 23, 2023 v1.0.1 May 16, 2023 v1.0.0 May 6, 2023 Changes in this version + func ACall(subject string, method string, req interface{}, opts ...*AsyncCallOption) error + func AService() xctrl.XNodeService + func AsyncService() xctrl.XNodeService + func Call(topic string, req *Request, timeout time.Duration) (*nats.Message, error) + func ContextWithID(id string) context.Context + func DelChannel(uuid string) error + func DoResultCallback(msg *Message) + func EnableApp(topic string) error + func EnableEvent(topic string, queue string) error + func EnableNodeStatus() error + func EnableRequest(topic string) error + func EnableResult(topic string) error + func ExecAPI(hostname string, cmd string, args ...string) (string, error) + func GetChannelState(uuid string) string + func GetNodeList() map[string]*xctrl.Node + func Hostname(uuid string) string + func Init(h Handler, trace bool, addrs string) error + func Node(hostname string) *xctrl.Node + func NodeAddress(nodeUUID string) string + func Publish(topic string, msg []byte, opts ...nats.PublishOption) error + func PublishJSON(topic string, obj interface{}, opts ...nats.PublishOption) error + func RawMessage(data []byte) *json.RawMessage + func Respond(topic string, resp *Response, opts ...nats.PublishOption) error + func Service() xctrl.XNodeService + func ServiceList() ([]*registry.Service, error) + func Subscribe(topic string, cb nats.EventCallback, queue string) (nats.Subscriber, error) + func ToRawMessage(vPoint interface{}) *json.RawMessage + func Transfer(ctrlID string, channel *xctrl.ChannelEvent) error + func TranslateMethod(method string) string + func UUID() string + func WithAddress(nodeUUID string) client.CallOption + func WithAddressNot() client.CallOption + func XCall(topic string, method string, params interface{}, timeout time.Duration) (*nats.Message, error) + type AsyncCallOption struct + func ACallOption() *AsyncCallOption + func (opt *AsyncCallOption) WithCallback(f ResultCallbackFunc) *AsyncCallOption + func (opt *AsyncCallOption) WithData(data interface{}) *AsyncCallOption + type Channel struct + CtrlUuid string + func FindChannel(condition string, argument string) []*Channel + func NewChannel(channel_uuid string) *Channel + func ReadChannel(uuid string) (*Channel, error) + func WriteChannel(uuid string, channel *Channel) *Channel + func (channel *Channel) AI(req *xctrl.AIRequest) *xctrl.AIResponse + func (channel *Channel) Accept(takeover bool) *xctrl.Response + func (channel *Channel) Answer() *xctrl.Response + func (channel *Channel) Bridge(req *xctrl.BridgeRequest, async bool) *xctrl.Response + func (channel *Channel) Broadcast(req *xctrl.BroadcastRequest) *xctrl.Response + func (channel *Channel) Callcenter(req *xctrl.CallcenterRequest) *xctrl.CallcenterResponse + func (channel *Channel) ChannelBridge(req *xctrl.ChannelBridgeRequest) *xctrl.Response + func (channel *Channel) Conference(req *xctrl.ConferenceRequest) *xctrl.ConferenceResponse + func (channel *Channel) Consult(req *xctrl.ConsultRequest) *xctrl.Response + func (channel *Channel) DetectFace(req *xctrl.DetectFaceRequest) *xctrl.Response + func (channel *Channel) DetectSpeech(req *xctrl.DetectRequest, async bool) *xctrl.DetectResponse + func (channel *Channel) Dial(req *xctrl.DialRequest) *xctrl.DialResponse + func (channel *Channel) FIFO(req *xctrl.FIFORequest) *xctrl.FIFOResponse + func (channel *Channel) FullCtrlUuid() string + func (channel *Channel) GetChannelData(req *xctrl.GetChannelDataRequest) *xctrl.ChannelDataResponse + func (channel *Channel) GetChannelEvent() *xctrl.ChannelEvent + func (channel *Channel) GetStates() *xctrl.StateResponse + func (channel *Channel) GetVar(req *xctrl.GetVarRequest) *xctrl.VarResponse + func (channel *Channel) GetVariable(key string) string + func (channel *Channel) Hangup(cause string, flag xctrl.HangupRequest_HangupFlag) *xctrl.Response + func (channel *Channel) Hold(req *xctrl.HoldRequest) *xctrl.Response + func (channel *Channel) HttAPI(req *xctrl.HttAPIRequest) *xctrl.HttAPIResponse + func (channel *Channel) Intercept(req *xctrl.InterceptRequest) *xctrl.Response + func (channel *Channel) Lua(req *xctrl.LuaRequest) *xctrl.LuaResponse + func (channel *Channel) Marshal() []byte + func (channel *Channel) NativeAPI(req *xctrl.NativeRequest) *xctrl.NativeResponse + func (channel *Channel) NativeApp(req *xctrl.NativeRequest) *xctrl.NativeResponse + func (channel *Channel) NativeJSAPI(req *xctrl.NativeJSRequest) *xctrl.NativeJSResponse + func (channel *Channel) NodeAddress() client.CallOption + func (channel *Channel) Play(req *xctrl.PlayRequest) *xctrl.Response + func (channel *Channel) PlayWithTimeout(req *xctrl.PlayRequest, timeout time.Duration) *xctrl.Response + func (channel *Channel) ReadDTMF(req *xctrl.DTMFRequest) *xctrl.DTMFResponse + func (channel *Channel) ReadDigits(req *xctrl.DigitsRequest) *xctrl.DigitsResponse + func (channel *Channel) Ready() bool + func (channel *Channel) Record(req *xctrl.RecordRequest) *xctrl.RecordResponse + func (channel *Channel) RingBackDetection(req *xctrl.RingBackDetectionRequest, async bool) *xctrl.Response + func (channel *Channel) Save() *Channel + func (channel *Channel) SendDTMF(dtmf string) *xctrl.Response + func (channel *Channel) SetMute(req *xctrl.MuteRequest) *xctrl.Response + func (channel *Channel) SetVar(req *xctrl.SetVarRequest) *xctrl.Response + func (channel *Channel) SetVariable(key, value string) error + func (channel *Channel) SetVariables(varKv map[string]string) error + func (channel *Channel) Stop() *xctrl.Response + func (channel *Channel) String() string + func (channel *Channel) Subscribe(topic string, cb nats.EventCallback, queue string) (nats.Subscriber, error) + func (channel *Channel) ThreeWay(req *xctrl.ThreeWayRequest) *xctrl.Response + func (channel *Channel) Transfer(req *xctrl.TransferRequest) *xctrl.Response + func (channel *Channel) UnBridge(req *xctrl.Request) *xctrl.Response + func (channel *Channel) UnBridge2(req *xctrl.Request) *xctrl.Response + type Ctrl struct + func (h *Ctrl) EnableApp(topic string) error + func (h *Ctrl) EnableEvent(topic string, queue string) error + func (h *Ctrl) EnableRequest(topic string) error + func (h *Ctrl) EnableResult(topic string) error + func (h *Ctrl) EnbaleNodeStatus() error + func (h *Ctrl) Subscribe(topic string, cb nats.EventCallback, queue string) (nats.Subscriber, error) + type EmptyHandler struct + func (h *EmptyHandler) App(context.Context, string, string, *Message) + func (h *EmptyHandler) Event(context.Context, string, *Request) + func (h *EmptyHandler) Request(context.Context, string, string, *Request) + func (h *EmptyHandler) Result(context.Context, string, *Result) + type Error struct + Code int + Data interface{} + Message string + func NewError(code int, message string) *Error + func ServerError(rpcerr error) *Error + func (e *Error) Error() string + type Handler interface + App func(context.Context, string, string, *Message) + Event func(context.Context, string, *Request) + Request func(context.Context, string, string, *Request) + Result func(context.Context, string, *Result) + type Message struct + Error *json.RawMessage + ID *json.RawMessage + Method string + Params *json.RawMessage + Result *json.RawMessage + Version string + func (m *Message) String() string + type Request struct + ID *json.RawMessage + Method string + Params *json.RawMessage + Version string + func (r *Request) Marshal() []byte + func (r *Request) RawMessage() *json.RawMessage + type Response struct + Error interface{} + ID *json.RawMessage + Result interface{} + Version string + type Result struct + Error *json.RawMessage + ID *json.RawMessage + Result *json.RawMessage + Version string + type ResultCallbackFunc func(msg *Message, data interface{}) + type XRequest struct + ID interface{} + Method string + Params interface{} + Version string