-
Notifications
You must be signed in to change notification settings - Fork 6
/
gist_json.go
82 lines (73 loc) · 2.65 KB
/
gist_json.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
package GistJSON
type Response struct {
Url string `json:"url"`
ForksUrl string `json:"forks_url"`
CommitsUrl string `json:"commits_url"`
Id string `json:"id"`
GitPullUrl string `json:"git_pull_url"`
GitPushUrl string `json:"git_push_url"`
HtmlUrl string `json:"html_url"`
Files map[string]FileDetails `json:"files"`
Public bool `json:"public"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
Description string `json:"description"`
Comments int `json:"comments"`
User User `json:"user"`
CommentsUrl string `json:"comments_url"`
History []History `json:"history"`
}
type User struct {
Login string `json:"login"`
Id int64 `json:"id"`
AvatarUrl string `json:"avatar_url"`
GravatarId string `json:"gravatar_id"`
Url string `json:"url"`
HtmlUrl string `json:"html_url"`
FollowersUrl string `json:"followers_url"`
FollowingUrl string `json:"followings_url"`
GistsUrl string `json:"gists_url"`
StarredUrl string `json:"starred_url"`
SubscriptionsUrl string `json:"subscriptions_url"`
OrganizationsUrl string `json:"organizations_url"`
ReposUrl string `json:"repos_url"`
EventsUrl string `json:"events_url"`
ReceivedEventsUrl string `json:"received_events_url"`
TypeUrl string `json:"type_url"`
}
type Post struct {
Desc string `json:"description"`
Public bool `json:"public"`
Files map[string]File `json:"files"`
}
type Patch struct {
Desc string `json:"description"`
Files map[string]File `json:"files"`
}
type File struct {
Content string `json:"content"`
}
type FileDetails struct {
FileName string `json:"filename"`
Type string `json:"type"`
Language string `json:"language"`
RawUrl string `json:"raw_url"`
Size int `json:"size"`
Content string `json:"content"`
}
type History struct {
Url string `json:"url"`
Version string `json:"version"`
User User `json:"user"`
ChangeStatus ChangeStatus `json:"change_status"`
CommittedAt string `json:"committed_at"`
}
type ChangeStatus struct {
Deletions int `json:"deletions"`
Additions int `json:"additions"`
Total int `json:"total"`
}
type MessageResponse struct {
Message string `json:"message"`
DocumentationUrl string `json:"documentation_url"`
}