forked from abourget/ari
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodels.go
95 lines (78 loc) · 1.56 KB
/
models.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
package ari
import "fmt"
type Variable struct {
Value string
}
type CallerID struct {
Name string
Number string
}
func (c *CallerID) String() string {
return fmt.Sprintf("%s <%s>", c.Name, c.Number)
}
type Sound struct {
Formats []FormatLangPair
ID string
Text string
}
type DialplanCEP struct {
Context string
Exten string
Priority int
}
type Dialplan struct {
Context string `json:"context"`
Exten string `json:"extension"`
Priority int `json:"priority"`
Label string `json:"label"`
}
type FormatLangPair struct {
Format string
Language string
}
type AsteriskInfo struct {
Build *BuildInfo
Config *ConfigInfo
Status *StatusInfo
System *SystemInfo
}
type BuildInfo struct {
Date string
Kernel string
Machine string
Options string
Os string
User string
}
type ConfigInfo struct {
DefaultLanguage string `json:"default_language"`
MaxChannels int64 `json:"max_channels"`
MaxLoad float64 `json:"max_load"`
MaxOpenFiles int64 `json:"max_open_files"`
Name string
SetID SetID
}
type SetID struct {
Group string
User string
}
type StatusInfo struct {
LastReloadTime *Time `json:"last_reload_time"`
StartupTime *Time `json:"startup_time"`
}
type SystemInfo struct {
EntityID string `json:"entity_id"`
Version string
}
type DeviceState struct {
State string
Name string
}
type Endpoint struct {
Technology string `json:"technology"`
Resource string `json:"resource"`
State string `json:"state"`
}
type Peer struct {
PeerStatus string `json:"peer_status"`
}