-
Notifications
You must be signed in to change notification settings - Fork 0
/
general.go
57 lines (48 loc) · 1.08 KB
/
general.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
package chayns
type config struct {
locationID int
tappID int
secret string
}
type Client struct {
c config
}
func NewClient(location int) *Client {
return &Client{
c: config{
locationID: location,
},
}
}
func (c *Client) SetLocation(location int) *Client {
c.c.locationID = location
return c
}
func (c *Client) SetTapp(tapp int) *Client {
c.c.tappID = tapp
return c
}
func (c *Client) SetSecret(secret string) *Client {
c.c.secret = secret
return c
}
type respError struct {
Message string `json:"message,omitempty"`
Error string `json:"errorGuid,omitempty"`
}
type UAC struct {
Name string `json:"name"`
ShowName string `json:"showName"`
UserGroupID int `json:"userGroupId"`
CountMember int `json:"CountMember"`
TappID int `json:"tappId"`
}
type Device struct {
SysName string `json:"sysName"`
SysVersion string `json:"sysVersion"`
LastRequest string `json:"lastRequest"`
DeviceToken string `json:"deviceToken"`
UDID string `json:"udid"`
DeviceID int `json:"deviceId"`
AppVersion int `json:"appVersion"`
}