-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathmeta.go
49 lines (43 loc) · 1.22 KB
/
meta.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
package cachet
// Meta can contain extra information such as the current paging attributes or links to other pages.
// Some responses will contain a meta object.
//
// Docs: https://docs.cachethq.io/docs/meta
type Meta struct {
Pagination Pagination `json:"pagination"`
}
// Pagination will contain detail information about pages.
//
// Docs: https://docs.cachethq.io/docs/meta
type Pagination struct {
Total int `json:"total"`
Count int `json:"count"`
PerPage int `json:"per_page"`
CurrentPage int `json:"current_page"`
TotalPages int `json:"total_pages"`
Links Links `json:"links"`
}
// Links will contain urls about the next and previous page.
//
// Docs: https://docs.cachethq.io/docs/meta
type Links struct {
NextPage string `json:"next_page"`
PreviousPage string `json:"previous_page"`
}
// MetaVersion ...
type MetaVersion struct {
OnLatest bool `json:"on_latest"`
Latest Latest `json:"latest"`
}
// Latest ...
type Latest struct {
TagName string `json:"tag_name"`
Prelease bool `json:"prelease"`
Draft bool `json:"draft"`
}
// SortOrdering ...
type SortOrdering struct {
Sort string `json:"sort"`
Order string `json:"order"`
PerPage int `json:"per_page"`
}