Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Global = Config{}
Global is meant to ease access to global configuration, instead of passing it around.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Version bool `desc:"display current version"` ConfPath string `id:"confpath" desc:"path to config file"` LogLevel string `default:"warn" short:"l" desc:"log level (debug/info/warn/error)"` GracePeriod *Duration `desc:"time to wait for ongoing calls during shutdown" default:"60s"` PBX PBX Zammad Zammad }
Config holds the configurable options with their respective defaults.
type Duration ¶
Duration wraps time.Duration, adding UnmarshalText for config-parsing
func (*Duration) MarshalJSON ¶ added in v0.1.3
MarshalJSON returns a json-string representation of the duration
func (*Duration) UnmarshalText ¶
UnmarshalText parses the provided byte array into the duration receiver as text
type PBX ¶ added in v0.2.0
type PBX struct { URL string `desc:"URL to innovaphone PBX"` EndpointPath string `default:"/PBX0/user.soap" desc:"path on innovaphone PBX under which the API is accessible"` User string `desc:"user for authentication with the PBX"` Pass string `desc:"password for authentication with the PBX"` AppName string `default:"innovazammad" desc:"application name used when accessing PBX"` MonitorUser string `desc:"PBX user used for monitoring calls; usually a 'trunk line'"` FilterOnGroup string `desc:"only process calls for users in this group (if not provided, will submit all calls to Zammad)"` GroupCacheTime *Duration `` /* 163-byte string literal not displayed */ }
PBX holds PBX-specific configuration
type Zammad ¶ added in v0.2.0
type Zammad struct { EndpointURL string `desc:"URL to Zammad's 'CTI (generic)' endpoint"` TrunkPrefix string `` /* 143-byte string literal not displayed */ CountryCode int `default:"49" desc:"Country code to prepend to area-local phone numbers received from the PBX"` NumberPrefix string `` /* 161-byte string literal not displayed */ }
Zammad holds Zammad-specific configuration
Click to show internal directories.
Click to hide internal directories.