Versions in this module Expand all Collapse all v1 v1.0.1 Aug 5, 2022 v1.0.0 Aug 5, 2022 Changes in this version + var ContextAPIKey = contextKey("apikey") + var ContextAccessToken = contextKey("accesstoken") + var ContextBasicAuth = contextKey("basic") + var ContextOAuth2 = contextKey("token") + func CacheExpires(r *http.Response) time.Time + type APIClient struct + ApplicationsApi *ApplicationsApiService + AsteriskApi *AsteriskApiService + BridgesApi *BridgesApiService + ChannelsApi *ChannelsApiService + DeviceStatesApi *DeviceStatesApiService + EndpointsApi *EndpointsApiService + EventsApi *EventsApiService + MailboxesApi *MailboxesApiService + PlaybacksApi *PlaybacksApiService + RecordingsApi *RecordingsApiService + SoundsApi *SoundsApiService + func NewAPIClient(cfg *Configuration) *APIClient + func (c *APIClient) ChangeBasePath(path string) + type APIKey struct + Key string + Prefix string + type APIResponse struct + Message string + Method string + Operation string + Payload []byte + RequestURL string + func NewAPIResponse(r *http.Response) *APIResponse + func NewAPIResponseWithError(errorMessage string) *APIResponse + type Application struct + BridgeIds []string + ChannelIds []string + DeviceNames []string + EndpointIds []string + EventsAllowed []interface{} + EventsDisallowed []interface{} + Name string + type ApplicationMoveFailed struct + type ApplicationReplaced struct + type ApplicationsApiFilterOpts struct + Filter optional.Interface + type ApplicationsApiService service + func (a *ApplicationsApiService) Filter(ctx context.Context, applicationName string, ...) (Application, *http.Response, error) + func (a *ApplicationsApiService) Get(ctx context.Context, applicationName string) (Application, *http.Response, error) + func (a *ApplicationsApiService) List(ctx context.Context) ([]Application, *http.Response, error) + func (a *ApplicationsApiService) Subscribe(ctx context.Context, applicationName string, eventSource []string) (Application, *http.Response, error) + func (a *ApplicationsApiService) Unsubscribe(ctx context.Context, applicationName string, eventSource []string) (Application, *http.Response, error) + type AsteriskApiGetInfoOpts struct + Only optional.Interface + type AsteriskApiService service + func (a *AsteriskApiService) AddLog(ctx context.Context, logChannelName string, configuration string) (*http.Response, error) + func (a *AsteriskApiService) DeleteLog(ctx context.Context, logChannelName string) (*http.Response, error) + func (a *AsteriskApiService) DeleteObject(ctx context.Context, configClass string, objectType string, id string) (*http.Response, error) + func (a *AsteriskApiService) GetGlobalVar(ctx context.Context, variable string) (Variable, *http.Response, error) + func (a *AsteriskApiService) GetInfo(ctx context.Context, localVarOptionals *AsteriskApiGetInfoOpts) (AsteriskInfo, *http.Response, error) + func (a *AsteriskApiService) GetModule(ctx context.Context, moduleName string) (Module, *http.Response, error) + func (a *AsteriskApiService) GetObject(ctx context.Context, configClass string, objectType string, id string) ([]ConfigTuple, *http.Response, error) + func (a *AsteriskApiService) ListLogChannels(ctx context.Context) ([]LogChannel, *http.Response, error) + func (a *AsteriskApiService) ListModules(ctx context.Context) ([]Module, *http.Response, error) + func (a *AsteriskApiService) LoadModule(ctx context.Context, moduleName string) (*http.Response, error) + func (a *AsteriskApiService) Ping(ctx context.Context) (AsteriskPing, *http.Response, error) + func (a *AsteriskApiService) ReloadModule(ctx context.Context, moduleName string) (*http.Response, error) + func (a *AsteriskApiService) RotateLog(ctx context.Context, logChannelName string) (*http.Response, error) + func (a *AsteriskApiService) SetGlobalVar(ctx context.Context, variable string, ...) (*http.Response, error) + func (a *AsteriskApiService) UnloadModule(ctx context.Context, moduleName string) (*http.Response, error) + func (a *AsteriskApiService) UpdateObject(ctx context.Context, configClass string, objectType string, id string, ...) ([]ConfigTuple, *http.Response, error) + type AsteriskApiSetGlobalVarOpts struct + Value optional.String + type AsteriskApiUpdateObjectOpts struct + Fields optional.Interface + type AsteriskInfo struct + Build *BuildInfo + Config *ConfigInfo + Status *StatusInfo + System *SystemInfo + type AsteriskPing struct + AsteriskId string + Ping string + Timestamp string + type BasicAuth struct + Password string + UserName string + type Binary struct + type Bridge struct + BridgeClass string + BridgeType string + Channels []string + Creationtime string + Creator string + Id string + Name string + Technology string + VideoMode string + VideoSourceId string + type BridgeAttendedTransfer struct + type BridgeBlindTransfer struct + type BridgeCreated struct + type BridgeDestroyed struct + type BridgeMerged struct + type BridgeVideoSourceChanged struct + type BridgesApiAddChannelOpts struct + AbsorbDTMF optional.Bool + InhibitConnectedLineUpdates optional.Bool + Mute optional.Bool + Role optional.String + type BridgesApiCreateOpts struct + BridgeId optional.String + Name optional.String + Type_ optional.String + type BridgesApiCreateWithIdOpts struct + Name optional.String + Type_ optional.String + type BridgesApiPlayOpts struct + Lang optional.String + Offsetms optional.Int32 + PlaybackId optional.String + Skipms optional.Int32 + type BridgesApiPlayWithIdOpts struct + Lang optional.String + Offsetms optional.Int32 + Skipms optional.Int32 + type BridgesApiRecordOpts struct + Beep optional.Bool + IfExists optional.String + MaxDurationSeconds optional.Int32 + MaxSilenceSeconds optional.Int32 + TerminateOn optional.String + type BridgesApiService service + func (a *BridgesApiService) AddChannel(ctx context.Context, bridgeId string, channel []string, ...) (*http.Response, error) + func (a *BridgesApiService) ClearVideoSource(ctx context.Context, bridgeId string) (*http.Response, error) + func (a *BridgesApiService) Create(ctx context.Context, localVarOptionals *BridgesApiCreateOpts) (Bridge, *http.Response, error) + func (a *BridgesApiService) CreateWithId(ctx context.Context, bridgeId string, ...) (Bridge, *http.Response, error) + func (a *BridgesApiService) Destroy(ctx context.Context, bridgeId string) (*http.Response, error) + func (a *BridgesApiService) Getbridge(ctx context.Context, bridgeId string) (Bridge, *http.Response, error) + func (a *BridgesApiService) Listbridges(ctx context.Context) ([]Bridge, *http.Response, error) + func (a *BridgesApiService) Play(ctx context.Context, bridgeId string, media []string, ...) (Playback, *http.Response, error) + func (a *BridgesApiService) PlayWithId(ctx context.Context, bridgeId string, playbackId string, media []string, ...) (Playback, *http.Response, error) + func (a *BridgesApiService) Record(ctx context.Context, bridgeId string, name string, format string, ...) (LiveRecording, *http.Response, error) + func (a *BridgesApiService) RemoveChannel(ctx context.Context, bridgeId string, channel []string) (*http.Response, error) + func (a *BridgesApiService) SetVideoSource(ctx context.Context, bridgeId string, channelId string) (*http.Response, error) + func (a *BridgesApiService) StartMoh(ctx context.Context, bridgeId string, ...) (*http.Response, error) + func (a *BridgesApiService) StopMoh(ctx context.Context, bridgeId string) (*http.Response, error) + type BridgesApiStartMohOpts struct + MohClass optional.String + type BuildInfo struct + Date string + Kernel string + Machine string + Options string + Os string + User string + type CallerId struct + Name string + Number string + type Channel struct + Accountcode string + Caller *CallerId + Channelvars interface{} + Connected *CallerId + Creationtime string + Dialplan *DialplanCep + Id string + Language string + Name string + State string + type ChannelCallerId struct + type ChannelConnectedLine struct + type ChannelCreated struct + type ChannelDestroyed struct + type ChannelDialplan struct + type ChannelDtmfReceived struct + type ChannelEnteredBridge struct + type ChannelHangupRequest struct + type ChannelHold struct + type ChannelLeftBridge struct + type ChannelStateChange struct + type ChannelTalkingFinished struct + type ChannelTalkingStarted struct + type ChannelUnhold struct + type ChannelUserevent struct + type ChannelVarset struct + type ChannelsApiAddMohOpts struct + MohClass optional.String + type ChannelsApiContinueInDialplanOpts struct + Context optional.String + Extension optional.String + Label optional.String + Priority optional.Int32 + type ChannelsApiCreatechannelOpts struct + AppArgs optional.String + ChannelId optional.String + Formats optional.String + Originator optional.String + OtherChannelId optional.String + Variables optional.Interface + type ChannelsApiDialOpts struct + Caller optional.String + Timeout optional.Int32 + type ChannelsApiExternalMediaOpts struct + ChannelId optional.String + ConnectionType optional.String + Data optional.String + Direction optional.String + Encapsulation optional.String + Transport optional.String + Variables optional.Interface + type ChannelsApiHangupOpts struct + Reason optional.String + ReasonCode optional.String + type ChannelsApiMoveOpts struct + AppArgs optional.String + type ChannelsApiMuteOpts struct + Direction optional.String + type ChannelsApiOriginateOpts struct + App optional.String + AppArgs optional.String + CallerId optional.String + ChannelId optional.String + Context optional.String + Extension optional.String + Formats optional.String + Label optional.String + Originator optional.String + OtherChannelId optional.String + Priority optional.Int64 + Timeout optional.Int32 + Variables optional.Interface + type ChannelsApiOriginateWithIdOpts struct + App optional.String + AppArgs optional.String + CallerId optional.String + Context optional.String + Extension optional.String + Formats optional.String + Label optional.String + Originator optional.String + OtherChannelId optional.String + Priority optional.Int64 + Timeout optional.Int32 + Variables optional.Interface + type ChannelsApiPlaySoundWithIdOpts struct + Lang optional.String + Offsetms optional.Int32 + Skipms optional.Int32 + type ChannelsApiPlaysoundOpts struct + Lang optional.String + Offsetms optional.Int32 + PlaybackId optional.String + Skipms optional.Int32 + type ChannelsApiRecordchannelOpts struct + Beep optional.Bool + IfExists optional.String + MaxDurationSeconds optional.Int32 + MaxSilenceSeconds optional.Int32 + TerminateOn optional.String + type ChannelsApiSendDTMFOpts struct + After optional.Int32 + Before optional.Int32 + Between optional.Int32 + Dtmf optional.String + Duration optional.Int32 + type ChannelsApiService service + func (a *ChannelsApiService) AddMoh(ctx context.Context, channelId string, ...) (*http.Response, error) + func (a *ChannelsApiService) Answer(ctx context.Context, channelId string) (*http.Response, error) + func (a *ChannelsApiService) ContinueInDialplan(ctx context.Context, channelId string, ...) (*http.Response, error) + func (a *ChannelsApiService) Createchannel(ctx context.Context, endpoint string, app string, ...) (Channel, *http.Response, error) + func (a *ChannelsApiService) Deletemoh(ctx context.Context, channelId string) (*http.Response, error) + func (a *ChannelsApiService) Dial(ctx context.Context, channelId string, localVarOptionals *ChannelsApiDialOpts) (*http.Response, error) + func (a *ChannelsApiService) ExternalMedia(ctx context.Context, app string, externalHost string, format string, ...) (Channel, *http.Response, error) + func (a *ChannelsApiService) GetChannelVar(ctx context.Context, channelId string, variable string) (Variable, *http.Response, error) + func (a *ChannelsApiService) Getchannel(ctx context.Context, channelId string) (Channel, *http.Response, error) + func (a *ChannelsApiService) Hangup(ctx context.Context, channelId string, ...) (*http.Response, error) + func (a *ChannelsApiService) Hold(ctx context.Context, channelId string) (*http.Response, error) + func (a *ChannelsApiService) Listchannels(ctx context.Context) ([]Channel, *http.Response, error) + func (a *ChannelsApiService) Move(ctx context.Context, channelId string, app string, ...) (*http.Response, error) + func (a *ChannelsApiService) Mute(ctx context.Context, channelId string, localVarOptionals *ChannelsApiMuteOpts) (*http.Response, error) + func (a *ChannelsApiService) Originate(ctx context.Context, endpoint string, ...) (Channel, *http.Response, error) + func (a *ChannelsApiService) OriginateWithId(ctx context.Context, channelId string, endpoint string, ...) (Channel, *http.Response, error) + func (a *ChannelsApiService) PlaySoundWithId(ctx context.Context, channelId string, playbackId string, media []string, ...) (Playback, *http.Response, error) + func (a *ChannelsApiService) Playsound(ctx context.Context, channelId string, media []string, ...) (Playback, *http.Response, error) + func (a *ChannelsApiService) Recordchannel(ctx context.Context, channelId string, name string, format string, ...) (LiveRecording, *http.Response, error) + func (a *ChannelsApiService) Redirect(ctx context.Context, channelId string, endpoint string) (*http.Response, error) + func (a *ChannelsApiService) Ring(ctx context.Context, channelId string) (*http.Response, error) + func (a *ChannelsApiService) RingStop(ctx context.Context, channelId string) (*http.Response, error) + func (a *ChannelsApiService) Rtpstatistics(ctx context.Context, channelId string) (RtPstat, *http.Response, error) + func (a *ChannelsApiService) SendDTMF(ctx context.Context, channelId string, ...) (*http.Response, error) + func (a *ChannelsApiService) SetChannelVar(ctx context.Context, channelId string, variable string, ...) (*http.Response, error) + func (a *ChannelsApiService) SnoopChannel(ctx context.Context, channelId string, app string, ...) (Channel, *http.Response, error) + func (a *ChannelsApiService) SnoopChannelWithId(ctx context.Context, channelId string, snoopId string, app string, ...) (Channel, *http.Response, error) + func (a *ChannelsApiService) StartSilence(ctx context.Context, channelId string) (*http.Response, error) + func (a *ChannelsApiService) StopSilence(ctx context.Context, channelId string) (*http.Response, error) + func (a *ChannelsApiService) Unhold(ctx context.Context, channelId string) (*http.Response, error) + func (a *ChannelsApiService) Unmute(ctx context.Context, channelId string, ...) (*http.Response, error) + type ChannelsApiSetChannelVarOpts struct + Value optional.String + type ChannelsApiSnoopChannelOpts struct + AppArgs optional.String + SnoopId optional.String + Spy optional.String + Whisper optional.String + type ChannelsApiSnoopChannelWithIdOpts struct + AppArgs optional.String + Spy optional.String + Whisper optional.String + type ChannelsApiUnmuteOpts struct + Direction optional.String + type ConfigInfo struct + DefaultLanguage string + MaxChannels int32 + MaxLoad float64 + MaxOpenFiles int32 + Name string + Setid *SetId + type ConfigTuple struct + Attribute string + Value string + type Configuration struct + BasePath string + DefaultHeader map[string]string + HTTPClient *http.Client + Host string + Scheme string + UserAgent string + func NewConfiguration() *Configuration + func (c *Configuration) AddDefaultHeader(key string, value string) + type ContactInfo struct + Aor string + ContactStatus string + RoundtripUsec string + Uri string + type ContactStatusChange struct + type Containers struct + type DeviceState struct + Name string + State string + type DeviceStateChanged struct + type DeviceStatesApiService service + func (a *DeviceStatesApiService) Delete(ctx context.Context, deviceName string) (*http.Response, error) + func (a *DeviceStatesApiService) Getdevicestate(ctx context.Context, deviceName string) (DeviceState, *http.Response, error) + func (a *DeviceStatesApiService) ListDeviceStates(ctx context.Context) ([]DeviceState, *http.Response, error) + func (a *DeviceStatesApiService) Update(ctx context.Context, deviceName string, deviceState string) (*http.Response, error) + type Dial struct + type Dialed struct + type DialplanCep struct + AppData string + AppName string + Context string + Exten string + Priority int64 + type Endpoint struct + ChannelIds []string + Resource string + State string + Technology string + type EndpointStateChange struct + type EndpointsApiSendMessageOpts struct + Body optional.String + Variables optional.Interface + type EndpointsApiSendMessageToEndpointOpts struct + Body optional.String + Variables optional.Interface + type EndpointsApiService service + func (a *EndpointsApiService) Getendpoint(ctx context.Context, tech string, resource string) (Endpoint, *http.Response, error) + func (a *EndpointsApiService) ListByTech(ctx context.Context, tech string) ([]Endpoint, *http.Response, error) + func (a *EndpointsApiService) Listendpoints(ctx context.Context) ([]Endpoint, *http.Response, error) + func (a *EndpointsApiService) SendMessage(ctx context.Context, to string, from string, ...) (*http.Response, error) + func (a *EndpointsApiService) SendMessageToEndpoint(ctx context.Context, tech string, resource string, from string, ...) (*http.Response, error) + type Event struct + AsteriskId string + Type_ string + type EventsApiEventWebsocketOpts struct + SubscribeAll optional.Bool + type EventsApiService service + func (a *EventsApiService) EventWebsocket(ctx context.Context, app []string, ...) (Message, *http.Response, error) + func (a *EventsApiService) UserEvent(ctx context.Context, eventName string, application string, ...) (*http.Response, error) + type EventsApiUserEventOpts struct + Source optional.Interface + Variables optional.Interface + type FormatLangPair struct + Format string + Language string + type GenericSwaggerError struct + func (e GenericSwaggerError) Body() []byte + func (e GenericSwaggerError) Error() string + func (e GenericSwaggerError) Model() interface{} + type LiveRecording struct + Cause string + Duration int32 + Format string + Name string + SilenceDuration int32 + State string + TalkingDuration int32 + TargetUri string + type LogChannel struct + Channel string + Configuration string + Status string + Type_ string + type Mailbox struct + Name string + NewMessages int32 + OldMessages int32 + type MailboxesApiService service + func (a *MailboxesApiService) Deletemailbox(ctx context.Context, mailboxName string) (*http.Response, error) + func (a *MailboxesApiService) Getmailbox(ctx context.Context, mailboxName string) (Mailbox, *http.Response, error) + func (a *MailboxesApiService) Listmailboxes(ctx context.Context) ([]Mailbox, *http.Response, error) + func (a *MailboxesApiService) Updatemailbox(ctx context.Context, mailboxName string, oldMessages int32, newMessages int32) (*http.Response, error) + type Message struct + AsteriskId string + Type_ string + type MissingParams struct + AsteriskId string + Type_ string + type Module struct + Description string + Name string + Status string + SupportLevel string + UseCount int32 + type Peer struct + Address string + Cause string + PeerStatus string + Port string + Time string + type PeerStatusChange struct + type Playback struct + Id string + Language string + MediaUri string + NextMediaUri string + State string + TargetUri string + type PlaybackContinuing struct + type PlaybackFinished struct + type PlaybackStarted struct + type PlaybacksApiService service + func (a *PlaybacksApiService) Control(ctx context.Context, playbackId string, operation string) (*http.Response, error) + func (a *PlaybacksApiService) Getplayback(ctx context.Context, playbackId string) (Playback, *http.Response, error) + func (a *PlaybacksApiService) Stop(ctx context.Context, playbackId string) (*http.Response, error) + type RecordingFailed struct + type RecordingFinished struct + type RecordingStarted struct + type RecordingsApiService service + func (a *RecordingsApiService) Cancel(ctx context.Context, recordingName string) (*http.Response, error) + func (a *RecordingsApiService) CopyStored(ctx context.Context, recordingName string, destinationRecordingName string) (StoredRecording, *http.Response, error) + func (a *RecordingsApiService) DeleteStored(ctx context.Context, recordingName string) (*http.Response, error) + func (a *RecordingsApiService) GetLive(ctx context.Context, recordingName string) (LiveRecording, *http.Response, error) + func (a *RecordingsApiService) GetStored(ctx context.Context, recordingName string) (StoredRecording, *http.Response, error) + func (a *RecordingsApiService) GetStoredFile(ctx context.Context, recordingName string) (string, *http.Response, error) + func (a *RecordingsApiService) ListStored(ctx context.Context) ([]StoredRecording, *http.Response, error) + func (a *RecordingsApiService) Muterecording(ctx context.Context, recordingName string) (*http.Response, error) + func (a *RecordingsApiService) Pause(ctx context.Context, recordingName string) (*http.Response, error) + func (a *RecordingsApiService) Stoprecording(ctx context.Context, recordingName string) (*http.Response, error) + func (a *RecordingsApiService) Unmuterecording(ctx context.Context, recordingName string) (*http.Response, error) + func (a *RecordingsApiService) Unpause(ctx context.Context, recordingName string) (*http.Response, error) + type RtPstat struct + ChannelUniqueid string + LocalMaxjitter float64 + LocalMaxrxploss float64 + LocalMinjitter float64 + LocalMinrxploss float64 + LocalNormdevjitter float64 + LocalNormdevrxploss float64 + LocalSsrc int32 + LocalStdevjitter float64 + LocalStdevrxploss float64 + Maxrtt float64 + Minrtt float64 + Normdevrtt float64 + RemoteMaxjitter float64 + RemoteMaxrxploss float64 + RemoteMinjitter float64 + RemoteMinrxploss float64 + RemoteNormdevjitter float64 + RemoteNormdevrxploss float64 + RemoteSsrc int32 + RemoteStdevjitter float64 + RemoteStdevrxploss float64 + Rtt float64 + Rxcount int32 + Rxjitter float64 + Rxoctetcount int32 + Rxploss int32 + Stdevrtt float64 + Txcount int32 + Txjitter float64 + Txoctetcount int32 + Txploss int32 + type SetId struct + Group string + User string + type Sound struct + Formats []FormatLangPair + Id string + Text string + type SoundsApiListsoundsOpts struct + Format optional.String + Lang optional.String + type SoundsApiService service + func (a *SoundsApiService) Getsound(ctx context.Context, soundId string) (Sound, *http.Response, error) + func (a *SoundsApiService) Listsounds(ctx context.Context, localVarOptionals *SoundsApiListsoundsOpts) ([]Sound, *http.Response, error) + type StasisEnd struct + type StasisStart struct + type StatusInfo struct + LastReloadTime string + StartupTime string + type StoredRecording struct + Format string + Name string + type SystemInfo struct + EntityId string + Version string + type TextMessage struct + Body string + From string + To string + Variables interface{} + type TextMessageReceived struct + type Variable struct + Value string