-
Notifications
You must be signed in to change notification settings - Fork 0
/
model.go
62 lines (53 loc) · 1.14 KB
/
model.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
package nfon
type method string
type response struct {
Href string `json:"href"`
Offset int `json:"offset"`
Total int `json:"total"`
Size int `json:"size"`
Links []links `json:"links"`
Data []data `json:"data"`
Items []struct {
Href string `json:"href"`
Links []links `json:"links"`
Data []data `json:"data"`
} `json:"items"`
}
type Response struct {
Href string
Offset int
Total int
Size int
Links map[string]string
Data map[string]any
Items []Items
}
type Items struct {
Href string
Links map[string]string
Data map[string]any
}
type Request struct {
client *Client
Links []links `json:"links,omitempty"`
Data []data `json:"data,omitempty"`
}
type Error struct {
Detail string `json:"detail"`
Title string `json:"title"`
DescribedBy string `json:"described_by"`
Errors []Errors `json:"errors"`
}
type Errors struct {
Message string `json:"message"`
Path string `json:"path"`
Value string `json:"value"`
}
type data struct {
Name string `json:"name"`
Value any `json:"value"`
}
type links struct {
Rel string `json:"rel"`
Href string `json:"href"`
}