-
-
Notifications
You must be signed in to change notification settings - Fork 33
/
types.go
77 lines (69 loc) · 2.09 KB
/
types.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
package sourcehut
import "time"
type Repositories struct {
Next string `json:"next"`
Results []Repository `json:"results"`
Total int `json:"total"`
ResultsPerPage int `json:"results_per_page"`
}
type Repository struct {
ID int `json:"id"`
Created time.Time `json:"created"`
Updated time.Time `json:"updated"`
Name string `json:"name"`
Owner struct {
CanonicalName string `json:"canonical_name"`
Name string `json:"name"`
} `json:"owner"`
Description string `json:"description"`
Visibility string `json:"visibility"`
}
type Refs struct {
Next string `json:"next"`
Results []Ref `json:"results"`
Total int `json:"total"`
ResultsPerPage int `json:"results_per_page"`
}
type Ref struct {
Target string `json:"target"`
Name string `json:"name"`
Artifacts []interface{} `json:"artifacts"`
}
type User struct {
CanonicalName string `json:"canonical_name"`
Name string `json:"name"`
Email string `json:"email"`
URL interface{} `json:"url"`
Location interface{} `json:"location"`
Bio interface{} `json:"bio"`
}
type Commits struct {
Next interface{} `json:"next"`
Results []Results `json:"results"`
Total int `json:"total"`
ResultsPerPage int `json:"results_per_page"`
}
type Author struct {
Email string `json:"email"`
Name string `json:"name"`
}
type Committer struct {
Email string `json:"email"`
Name string `json:"name"`
}
type Results struct {
ID string `json:"id"`
ShortID string `json:"short_id"`
Author Author `json:"author"`
Committer Committer `json:"committer"`
Timestamp time.Time `json:"timestamp"`
Message string `json:"message"`
Tree string `json:"tree"`
Parents []string `json:"parents"`
Signature interface{} `json:"signature"`
}
type PostRepo struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
Visibility string `json:"visibility,omitempty"`
}