Documentation
¶
Index ¶
- type Asset
- type Assignee
- type BasicEnterprise
- type BasicIssue
- type BasicLabel
- type BasicProgram
- type BasicPull
- type BasicUser
- type CommitAuthorInfo
- type CommitDetail
- type CommitParent
- type CommitTree
- type CompareCommit
- type CompareFile
- type CompareResult
- type DiffFile
- type EndpointConfig
- type FileContent
- type IssueComment
- type IssueTypeDetail
- type Namespace
- type Notification
- type NotificationResult
- type PagedResponse
- type PatchInfo
- type Project
- type PullComment
- type Reference
- type Release
- type SearchProject
- type Subject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicEnterprise ¶
type BasicIssue ¶
type BasicIssue struct {
Id int `json:"id"`
Number string `json:"number"`
Title string `json:"title"`
User BasicUser `json:"user"`
State string `json:"state"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
Body string `json:"body"`
Labels []BasicLabel `json:"labels"`
Assignee *BasicUser `json:"assignee"`
IssueType string `json:"issue_type"`
Program *BasicProgram `json:"program"`
HtmlUrl string `json:"html_url"`
}
BasicIssue 定义了 Issue 的基本结构
type BasicLabel ¶
type BasicProgram ¶
type BasicPull ¶
type BasicPull struct {
Id int `json:"id"`
Title string `json:"title"`
Url string `json:"html_url"`
Number int `json:"number"`
State string `json:"state"`
AssigneesNumber int `json:"assignees_number"`
TestersNumber int `json:"testers_number"`
Assignees []Assignee `json:"assignees"`
Testers []Assignee `json:"testers"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
ClosedAt string `json:"closed_at"`
MergedAt string `json:"merged_at"`
Creator BasicUser `json:"user"`
Head Reference `json:"head"`
Base Reference `json:"base"`
CanMergeCheck bool `json:"can_merge_check"`
Draft bool `json:"draft"`
IsConflict bool `json:"is_conflict"`
}
func (*BasicPull) UnmarshalJSON ¶ added in v0.1.17
type CommitAuthorInfo ¶ added in v0.1.15
type CommitAuthorInfo struct {
Name string `json:"name"`
Date string `json:"date"`
Email string `json:"email"`
}
CommitAuthorInfo is the author/committer info within a commit
type CommitDetail ¶ added in v0.1.15
type CommitDetail struct {
Author CommitAuthorInfo `json:"author"`
Committer CommitAuthorInfo `json:"committer"`
Message string `json:"message"`
Tree CommitTree `json:"tree"`
}
CommitDetail is the inner commit object
type CommitParent ¶ added in v0.1.15
CommitParent is a parent commit reference
type CommitTree ¶ added in v0.1.15
CommitTree is the tree reference within a commit
type CompareCommit ¶ added in v0.1.15
type CompareCommit struct {
Url string `json:"url"`
Sha string `json:"sha"`
HtmlUrl string `json:"html_url"`
CommentsUrl string `json:"comments_url"`
Commit CommitDetail `json:"commit"`
Author *BasicUser `json:"author"`
Committer *BasicUser `json:"committer"`
Parents []CommitParent `json:"parents"`
}
CompareCommit represents a commit entry in a comparison result
type CompareFile ¶ added in v0.1.15
type CompareFile struct {
Sha string `json:"sha"`
Filename string `json:"filename"`
Status string `json:"status"`
Additions int `json:"additions"`
Deletions int `json:"deletions"`
Changes int `json:"changes"`
BlobUrl string `json:"blob_url"`
RawUrl string `json:"raw_url"`
ContentUrl string `json:"content_url"`
Patch string `json:"patch"`
Truncated bool `json:"truncated"`
}
CompareFile represents a file change in a comparison result
type CompareResult ¶ added in v0.1.15
type CompareResult struct {
BaseCommit CompareCommit `json:"base_commit"`
MergeBaseCommit CompareCommit `json:"merge_base_commit"`
Commits []CompareCommit `json:"commits"`
Files []CompareFile `json:"files"`
Truncated bool `json:"truncated"`
}
CompareResult is the overall response for a branch/tag comparison
type DiffFile ¶ added in v0.1.12
type DiffFile struct {
Sha string `json:"sha"`
Filename string `json:"filename"`
Status *string `json:"status"`
Additions string `json:"additions"`
Deletions string `json:"deletions"`
BlobUrl string `json:"blob_url"`
RawUrl string `json:"raw_url"`
Patch PatchInfo `json:"patch"`
}
DiffFile defines the structure for a pull request diff file
type EndpointConfig ¶
type FileContent ¶
type IssueComment ¶
type IssueComment struct {
Id int `json:"id"`
Body string `json:"body"`
User BasicUser `json:"user"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
IssueComment defines the structure for an issue comment
type IssueTypeDetail ¶
type Notification ¶
type Notification struct {
Id int `json:"id"`
Content string `json:"content"`
Type string `json:"type"`
Unread bool `json:"unread"`
Mute bool `json:"mute"`
UpdatedAt string `json:"updated_at"`
Url string `json:"url"`
HtmlUrl string `json:"html_url"`
Actor BasicUser `json:"actor"`
Repository Project `json:"repository"`
Subject Subject `json:"subject"`
Namespaces []Namespace `json:"namespaces"`
}
type NotificationResult ¶
type NotificationResult struct {
TotalCount int `json:"total_count"`
List []Notification `json:"list"`
}
type PagedResponse ¶ added in v0.1.7
type PatchInfo ¶ added in v0.1.12
type PatchInfo struct {
Diff string `json:"diff"`
NewPath string `json:"new_path"`
OldPath string `json:"old_path"`
AMode string `json:"a_mode"`
BMode string `json:"b_mode"`
NewFile bool `json:"new_file"`
RenamedFile bool `json:"renamed_file"`
DeletedFile bool `json:"deleted_file"`
TooLarge bool `json:"too_large"`
}
PatchInfo defines the structure for patch information
type Project ¶
type Project struct {
Id int `json:"id"`
FullName string `json:"full_name"`
HumanName string `json:"human_name"`
Url string `json:"url"`
Namespace Namespace `json:"namespace"`
Owner BasicUser `json:"owner"`
Assigner BasicUser `json:"assigner"`
Description string `json:"description"`
Private bool `json:"private"`
Public bool `json:"public"`
Internal bool `json:"internal"`
Fork bool `json:"fork"`
SshUrl string `json:"ssh_url"`
Recommend bool `json:"recommend"`
Gvp bool `json:"gvp"`
StargazersCount int `json:"stargazers_count"`
ForksCount int `json:"forks_count"`
WatchersCount int `json:"watchers_count"`
DefaultBranch string `json:"default_branch"`
Members []string `json:"members"`
PushedAt string `json:"pushed_at"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
Permission map[string]bool `json:"permission"`
Status string `json:"status"`
Enterprise BasicEnterprise `json:"enterprise"`
}
type PullComment ¶
type PullComment struct {
Id int `json:"id"`
Body string `json:"body"`
User BasicUser `json:"user"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
CommentType string `json:"comment_type"`
CommentId string `json:"comment_id"`
PullUrl string `json:"pull_url"`
OriginalPosition string `json:"original_position"`
Path string `json:"path"`
Position string `json:"position"`
CommitId string `json:"commit_id"`
OriginalCommitId string `json:"original_commit_id"`
InReplyToId int `json:"in_reply_to_id"`
Url string `json:"url"`
}
PullComment defines the structure for a pull request comment
type Release ¶
type Release struct {
Id int `json:"id"`
Author BasicUser `json:"author"`
Name string `json:"name"`
Body string `json:"body"`
Prerelease bool `json:"prerelease"`
TagName string `json:"tag_name"`
TargetCommitish string `json:"target_commitish"`
CreatedAt string `json:"created_at"`
Assets []Asset `json:"assets"`
}
type SearchProject ¶ added in v0.1.7
type SearchProject struct {
Id int `json:"id"`
Name string `json:"name"`
Url string `json:"url"`
Description string `json:"description"`
Stars int `json:"stars"`
Forks int `json:"forks"`
Languages []string `json:"languages"`
LastPushAt string `json:"last_push_at"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}