key

package
v0.0.0-...-2ec00d9 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2025 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ApplicationKey is the key kind for ARI Application resources.
	ApplicationKey = "application"

	// BridgeKey is the key kind for the ARI Bridge resources.
	BridgeKey = "bridge"

	// ChannelKey is the key kind for the ARI Channel resource
	ChannelKey = "channel"

	// DeviceStateKey is the key kind for the ARI DeviceState resource
	DeviceStateKey = "devicestate"

	// EndpointKey is the key kind for the ARI Endpoint resource
	EndpointKey = "endpoint"

	// LiveRecordingKey is the key kind for the ARI LiveRecording resource
	LiveRecordingKey = "liverecording"

	// LoggingKey is the key kind for the ARI Logging resource
	LoggingKey = "logging"

	// MailboxKey is the key kind for the ARI Mailbox resource
	MailboxKey = "mailbox"

	// ModuleKey is the key kind for the ARI Module resource
	ModuleKey = "module"

	// PlaybackKey is the key kind for the ARI Playback resource
	PlaybackKey = "playback"

	// SoundKey is the key kind for the ARI Sound resource
	SoundKey = "sound"

	// StoredRecordingKey is the key kind for the ARI StoredRecording resource
	StoredRecordingKey = "storedrecording"

	// VariableKey is the key kind for the ARI Asterisk Variable resource
	VariableKey = "variable"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key struct {
	Kind string `json:"kind,omitempty"`
	ID   string `json:"id,omitempty"`
	Node string `json:"node,omitempty"`
	App  string `json:"app,omitempty"`
}

func NewKey

func NewKey(kind string, id string, opts ...KeyOptionFunc) *Key

NewKey builds a new key given the kind, identifier, and any optional arguments.

func NodeKey

func NodeKey(app, node string) *Key

NodeKey returns a key that is bound to the given application and node

func (*Key) GetApp

func (m *Key) GetApp() string

func (*Key) GetID

func (m *Key) GetID() string

func (*Key) GetKind

func (m *Key) GetKind() string

func (*Key) GetNode

func (m *Key) GetNode() string

func (*Key) New

func (k *Key) New(kind, id string) *Key

New returns a new key with the location information from the source key. This includes the App, the Node, and the Dialog. the `kind` and `id` parameters are optional. If kind is empty, the resulting key will not be typed. If id is empty, the key will not be unique.

type KeyOptionFunc

type KeyOptionFunc func(Key) Key

KeyOptionFunc is a functional argument alias for providing options for ARI keys

func WithApp

func WithApp(app string) KeyOptionFunc

WithApp sets the given node identifier on the key.

func WithNode

func WithNode(node string) KeyOptionFunc

WithNode sets the given node identifier on the key.

Jump to

Keyboard shortcuts

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