asterisk

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: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Asterisk

type Asterisk interface {

	// Info gets data about the asterisk system
	Info(key *key.Key) (*AsteriskInfo, error)
}

Asterisk represents a communication path for the Asterisk server for system-level resources

type AsteriskInfo

type AsteriskInfo struct {
	BuildInfo  BuildInfo  `json:"build"`
	ConfigInfo ConfigInfo `json:"config"`
	StatusInfo StatusInfo `json:"status"`
	SystemInfo SystemInfo `json:"system"`
}

AsteriskInfo describes a running asterisk system

type AsteriskVariables

type AsteriskVariables interface {

	// Get returns the value of the given variable; the ID field of the Key is the variable name
	Get(key *key.Key) (string, error)

	// Set sets the variable; the ID field of the Key is the variable name
	Set(key *key.Key, value string) error
}

AsteriskVariables is an interface to interact with Asterisk global variables

type BuildInfo

type BuildInfo struct {
	Date    string `json:"date"`
	Kernel  string `json:"kernel"`
	Machine string `json:"machine"`
	Options string `json:"options"`
	Os      string `json:"os"`
	User    string `json:"user"`
}

BuildInfo describes information about how Asterisk was built

type ConfigInfo

type ConfigInfo struct {
	DefaultLanguage string  `json:"default_language"`
	MaxChannels     int     `json:"max_channels,omitempty"` //omitempty denotes an optional field, meaning the field may not be present if no value is assigned.
	MaxLoad         float64 `json:"max_load,omitempty"`
	MaxOpenFiles    int     `json:"max_open_files,omitempty"`
	Name            string  `json:"name"`  // Asterisk system name
	SetID           SetID   `json:"setid"` // Effective user/group id under which Asterisk is running
}

ConfigInfo describes information about the Asterisk configuration

type SetID

type SetID struct {
	Group string `json:"group"` // group id (not name? why string?)
	User  string `json:"user"`  // user id (not name? why string?)
}

SetID describes a userid/groupid pair

type StatusInfo

type StatusInfo struct {
	LastReloadTime arioptions.DateTime `json:"last_reload_time"`
	StartupTime    arioptions.DateTime `json:"startup_time"`
}

StatusInfo describes the state of an Asterisk system

type SystemInfo

type SystemInfo struct {
	EntityID string `json:"entity_id"`
	Version  string `json:"version"`
}

SystemInfo describes information about the Asterisk system

Jump to

Keyboard shortcuts

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