Documentation
¶
Index ¶
- Constants
- type ArchiveStatus
- type AuthStyle
- type Branch
- type BranchCommitDetail
- type BranchProtection
- type BranchProtectionRule
- type Client
- func (c *Client) AddIssueLabels(ctx context.Context, owner, repo string, number int, labels []string) error
- func (c *Client) AddPullRequestLabels(ctx context.Context, owner, repo string, number int, labels []string) error
- func (c *Client) ArchiveRepository(ctx context.Context, owner, repo string) error
- func (c *Client) AssignPullRequestReviewers(ctx context.Context, owner, repo string, number int, assignees string) error
- func (c *Client) AssignPullRequestTesters(ctx context.Context, owner, repo string, number int, testers string) error
- func (c *Client) CloseIssue(ctx context.Context, owner, repo string, number int) (*Issue, error)
- func (c *Client) ClosePullRequest(ctx context.Context, owner, repo string, number int) (*PullRequest, error)
- func (c *Client) CompareCommits(ctx context.Context, owner, repo, base, head string) (*CommitComparison, error)
- func (c *Client) CreateBranch(ctx context.Context, owner, repo string, opts CreateBranchOptions) (*Branch, error)
- func (c *Client) CreateBranchProtection(ctx context.Context, owner, repo string, opts CreateBranchProtectionOptions) (*BranchProtectionRule, error)
- func (c *Client) CreateFile(ctx context.Context, owner, repo, path string, opts CreateFileOptions) (*FileResult, error)
- func (c *Client) CreateIssue(ctx context.Context, owner, repo string, opts CreateIssueOptions) (*Issue, error)
- func (c *Client) CreateIssueComment(ctx context.Context, owner, repo string, number int, body string) (*IssueComment, error)
- func (c *Client) CreateIssueLabel(ctx context.Context, owner, repo string, name, color string) (*Label, error)
- func (c *Client) CreateMilestone(ctx context.Context, owner, repo string, title, description string) (*Milestone, error)
- func (c *Client) CreateMilestoneWithOptions(ctx context.Context, owner, repo string, opts CreateMilestoneOptions) (*Milestone, error)
- func (c *Client) CreateOrgRepository(ctx context.Context, org string, opts CreateOrgRepoOptions) (*Repository, error)
- func (c *Client) CreatePullRequest(ctx context.Context, owner, repo string, opts CreatePullRequestOptions) (*PullRequest, error)
- func (c *Client) CreatePullRequestComment(ctx context.Context, owner, repo string, number int, body, path string, ...) (*PullRequestComment, error)
- func (c *Client) CreatePullRequestInlineComment(ctx context.Context, owner, repo string, number int, ...) (*PullRequestComment, error)
- func (c *Client) CreatePullRequestReview(ctx context.Context, owner, repo string, number int, body, event string) (*PullRequestReview, error)
- func (c *Client) CreateRelease(ctx context.Context, owner, repo string, opts CreateReleaseOptions) (*Release, error)
- func (c *Client) CreateRepository(ctx context.Context, opts CreateRepositoryOptions) (*Repository, error)
- func (c *Client) CreateSSHKey(ctx context.Context, opts CreateSSHKeyOptions) (*SSHKey, error)
- func (c *Client) CreateWebhook(ctx context.Context, owner, repo string, opts CreateWebhookOptions) (*Webhook, error)
- func (c *Client) DeleteBranch(ctx context.Context, owner, repo, branch string) error
- func (c *Client) DeleteBranchProtection(ctx context.Context, owner, repo, name string) error
- func (c *Client) DeleteFile(ctx context.Context, owner, repo, path string, opts DeleteFileOptions) (*FileResult, error)
- func (c *Client) DeleteIssueComment(ctx context.Context, owner, repo string, commentID int64) error
- func (c *Client) DeleteIssueLabel(ctx context.Context, owner, repo string, name string) error
- func (c *Client) DeleteMilestone(ctx context.Context, owner, repo string, number int) error
- func (c *Client) DeletePullRequestComment(ctx context.Context, owner, repo string, commentID string) error
- func (c *Client) DeleteRelease(ctx context.Context, owner, repo string, tagName string) error
- func (c *Client) DeleteRepository(ctx context.Context, owner, repo string) error
- func (c *Client) DeleteSSHKey(ctx context.Context, id int64) error
- func (c *Client) DeleteTag(ctx context.Context, owner, repo, tagName string) error
- func (c *Client) DeleteWebhook(ctx context.Context, owner, repo string, hookID int64) error
- func (c *Client) ExitOrganization(ctx context.Context, org string) error
- func (c *Client) ForkRepository(ctx context.Context, owner, repo string, opts *CreateRepositoryOptions) (*Repository, error)
- func (c *Client) GetArchiveStatus(ctx context.Context, owner, repo string) (*ArchiveStatus, error)
- func (c *Client) GetBlob(ctx context.Context, owner, repo, sha string) (*GitBlob, error)
- func (c *Client) GetBranch(ctx context.Context, owner, repo, branch string) (*Branch, error)
- func (c *Client) GetCommit(ctx context.Context, owner, repo, sha string) (*Commit, error)
- func (c *Client) GetContributorStatistics(ctx context.Context, owner, repo string) ([]*ContributorStatistic, error)
- func (c *Client) GetCurrentUser(ctx context.Context) (*User, error)
- func (c *Client) GetCustomizedRoles(ctx context.Context, owner, repo string) ([]*CustomizedRole, error)
- func (c *Client) GetDownloadStatistics(ctx context.Context, owner, repo string) ([]*DownloadStatistic, error)
- func (c *Client) GetEnterpriseIssue(ctx context.Context, enterprise string, number int) (*Issue, error)
- func (c *Client) GetEnterpriseIssueLinkedPRs(ctx context.Context, enterprise string, number int) ([]*PullRequest, error)
- func (c *Client) GetEnterpriseMember(ctx context.Context, enterprise, username string) (*EnterpriseMember, error)
- func (c *Client) GetIssue(ctx context.Context, owner, repo string, number int) (*Issue, error)
- func (c *Client) GetIssueComment(ctx context.Context, owner, repo string, commentID int64) (*IssueComment, error)
- func (c *Client) GetIssueLinkedPRs(ctx context.Context, owner, repo string, number int) ([]*PullRequest, error)
- func (c *Client) GetIssueOperateLogs(ctx context.Context, owner, repo string, number int) ([]*IssueOperateLog, error)
- func (c *Client) GetLanguages(ctx context.Context, owner, repo string) (Language, error)
- func (c *Client) GetMilestone(ctx context.Context, owner, repo string, number int) (*Milestone, error)
- func (c *Client) GetNamespace(ctx context.Context, path string) (*Namespace, error)
- func (c *Client) GetOrgInfo(ctx context.Context, org string) (*Organization, error)
- func (c *Client) GetOrgIssueExtendSettings(ctx context.Context, org string) ([]*IssueExtendSetting, error)
- func (c *Client) GetOrgMemberDetail(ctx context.Context, org, username string) (*OrgMemberDetail, error)
- func (c *Client) GetOrganization(ctx context.Context, org string) (*Organization, error)
- func (c *Client) GetPRSettings(ctx context.Context, owner, repo string) (*PRSettings, error)
- func (c *Client) GetPullRequest(ctx context.Context, owner, repo string, number int) (*PullRequest, error)
- func (c *Client) GetPullRequestComment(ctx context.Context, owner, repo string, commentID int64) (*PullRequestComment, error)
- func (c *Client) GetPullRequestLinkedIssues(ctx context.Context, owner, repo string, number int, opts ListOptions) ([]*Issue, error)
- func (c *Client) GetPullRequestOperateLogs(ctx context.Context, owner, repo string, number int) ([]*PROperateLog, error)
- func (c *Client) GetPushConfig(ctx context.Context, owner, repo string) (*PushConfig, error)
- func (c *Client) GetRateLimit(ctx context.Context) (*RateLimit, error)
- func (c *Client) GetRawFile(ctx context.Context, owner, repo, path, ref string) ([]byte, error)
- func (c *Client) GetRepoSettings(ctx context.Context, owner, repo string) (*RepoSettings, error)
- func (c *Client) GetRepository(ctx context.Context, owner, repo string) (*Repository, error)
- func (c *Client) GetRepositoryContent(ctx context.Context, owner, repo, path, ref string) (*RepositoryContent, error)
- func (c *Client) GetSSHKey(ctx context.Context, id int64) (*SSHKey, error)
- func (c *Client) GetTree(ctx context.Context, owner, repo, sha string, recursive bool) (*GitTree, error)
- func (c *Client) GetUser(ctx context.Context, username string) (*User, error)
- func (c *Client) GetUserEvents(ctx context.Context, username, year, next string) (*UserEventsResponse, error)
- func (c *Client) GetUserMembership(ctx context.Context, org string) (*UserMembership, error)
- func (c *Client) GetWebhook(ctx context.Context, owner, repo string, hookID int64) (*Webhook, error)
- func (c *Client) HandlePullRequestReview(ctx context.Context, owner, repo string, number int, force bool) error
- func (c *Client) HandlePullRequestTest(ctx context.Context, owner, repo string, number int, force bool) error
- func (c *Client) InviteOrgMember(ctx context.Context, org, username string, opts InviteMemberOptions) (*User, error)
- func (c *Client) IsPullRequestMerged(ctx context.Context, owner, repo string, number int) (bool, error)
- func (c *Client) IsRepositoryStarred(ctx context.Context, owner, repo string) (bool, error)
- func (c *Client) ListBranchProtections(ctx context.Context, owner, repo string) ([]*BranchProtectionRule, error)
- func (c *Client) ListBranches(ctx context.Context, owner, repo string) ([]*Branch, error)
- func (c *Client) ListCommits(ctx context.Context, owner, repo string, opts ListCommitsOptions) ([]*Commit, error)
- func (c *Client) ListContributors(ctx context.Context, owner, repo string) ([]*Contributor, error)
- func (c *Client) ListEmails(ctx context.Context) ([]*Email, error)
- func (c *Client) ListEnterpriseIssueComments(ctx context.Context, enterprise string, number int, opts ListOptions) ([]*IssueComment, error)
- func (c *Client) ListEnterpriseIssueLabels(ctx context.Context, enterprise string, issueID int64) ([]*Label, error)
- func (c *Client) ListEnterpriseIssues(ctx context.Context, enterprise string, opts ListUserIssuesOptions) ([]*Issue, error)
- func (c *Client) ListEnterpriseLabels(ctx context.Context, enterprise string) ([]*EnterpriseLabel, error)
- func (c *Client) ListEnterpriseMembers(ctx context.Context, enterprise, role string, opts ListOptions) ([]*EnterpriseMember, error)
- func (c *Client) ListEnterprisePullRequests(ctx context.Context, enterprise string, opts ListEnterprisePRsOptions) ([]*PullRequest, error)
- func (c *Client) ListFiles(ctx context.Context, owner, repo string) ([]*FileListEntry, error)
- func (c *Client) ListForks(ctx context.Context, owner, repo string, opts ListOptions) ([]*Repository, error)
- func (c *Client) ListIssueComments(ctx context.Context, owner, repo string, number int) ([]*IssueComment, error)
- func (c *Client) ListIssueLabels(ctx context.Context, owner, repo string) ([]*Label, error)
- func (c *Client) ListIssues(ctx context.Context, owner, repo string, opts ListIssuesOptions) ([]*Issue, error)
- func (c *Client) ListMilestones(ctx context.Context, owner, repo string) ([]*Milestone, error)
- func (c *Client) ListMilestonesWithOptions(ctx context.Context, owner, repo string, opts ListMilestonesOptions) ([]*Milestone, error)
- func (c *Client) ListNotifications(ctx context.Context) ([]*Notification, error)
- func (c *Client) ListOrgFollowers(ctx context.Context, org string, opts ListOptions) ([]*OrgFollowers, error)
- func (c *Client) ListOrgIssues(ctx context.Context, org string, opts ListUserIssuesOptions) ([]*Issue, error)
- func (c *Client) ListOrgMembers(ctx context.Context, org, role string, opts ListOptions) ([]*OrgMember, error)
- func (c *Client) ListOrgPullRequests(ctx context.Context, org string, opts ListEnterprisePRsOptions) ([]*PullRequest, error)
- func (c *Client) ListOrgRepositories(ctx context.Context, org, repoType string, opts ListOptions) ([]*Repository, error)
- func (c *Client) ListOrganizationMembers(ctx context.Context, org string) ([]*Member, error)
- func (c *Client) ListOrganizations(ctx context.Context) ([]*Organization, error)
- func (c *Client) ListOrganizationsWithOptions(ctx context.Context, admin bool, opts ListOptions) ([]*Organization, error)
- func (c *Client) ListPullRequestComments(ctx context.Context, owner, repo string, number int) ([]*PullRequestComment, error)
- func (c *Client) ListPullRequestCommits(ctx context.Context, owner, repo string, number int) ([]*Commit, error)
- func (c *Client) ListPullRequestFiles(ctx context.Context, owner, repo string, number int) ([]*PullRequestFile, error)
- func (c *Client) ListPullRequestLabels(ctx context.Context, owner, repo string, number int) ([]*Label, error)
- func (c *Client) ListPullRequestReviews(ctx context.Context, owner, repo string, number int) ([]*PullRequestReview, error)
- func (c *Client) ListPullRequests(ctx context.Context, owner, repo string, opts ListPullRequestsOptions) ([]*PullRequest, error)
- func (c *Client) ListReleases(ctx context.Context, owner, repo string) ([]*Release, error)
- func (c *Client) ListRepoAllIssueComments(ctx context.Context, owner, repo string, opts ListOptions) ([]*IssueComment, error)
- func (c *Client) ListRepoEvents(ctx context.Context, owner, repo string, opts ListOptions) ([]*RepoEvent, error)
- func (c *Client) ListRepositories(ctx context.Context, opts ListRepositoriesOptions) ([]*Repository, error)
- func (c *Client) ListRepositoryContents(ctx context.Context, owner, repo, path, ref string) ([]*RepositoryContent, error)
- func (c *Client) ListSSHKeys(ctx context.Context, opts ListOptions) ([]*SSHKey, error)
- func (c *Client) ListStargazers(ctx context.Context, owner, repo string, opts ListOptions) ([]*User, error)
- func (c *Client) ListStarredRepositories(ctx context.Context, opts ListStarredReposOptions) ([]*Repository, error)
- func (c *Client) ListTags(ctx context.Context, owner, repo string) ([]*Tag, error)
- func (c *Client) ListUserIssues(ctx context.Context, opts ListUserIssuesOptions) ([]*Issue, error)
- func (c *Client) ListUserOrganizations(ctx context.Context, username string, opts ListOptions) ([]*Organization, error)
- func (c *Client) ListWatchers(ctx context.Context, owner, repo string, opts ListOptions) ([]*User, error)
- func (c *Client) ListWebhooks(ctx context.Context, owner, repo string) ([]*Webhook, error)
- func (c *Client) MergePullRequest(ctx context.Context, owner, repo string, number int, ...) error
- func (c *Client) ParseIssueEvent(payload []byte) (*IssueWebhookEvent, error)
- func (c *Client) ParseNoteEvent(payload []byte) (*NoteWebhookEvent, error)
- func (c *Client) ParsePullRequestEvent(payload []byte) (*PullRequestWebhookEvent, error)
- func (c *Client) ParsePushEvent(payload []byte) (*PushEvent, error)
- func (c *Client) ParseTagPushEvent(payload []byte) (*TagPushEvent, error)
- func (c *Client) RemoveAllIssueLabels(ctx context.Context, owner, repo string, number int) error
- func (c *Client) RemoveIssueLabel(ctx context.Context, owner, repo string, number int, name string) error
- func (c *Client) RemoveOrgMember(ctx context.Context, org, username string) error
- func (c *Client) RemovePullRequestLabel(ctx context.Context, owner, repo string, number int, name string) error
- func (c *Client) ReopenIssue(ctx context.Context, owner, repo string, number int) (*Issue, error)
- func (c *Client) ReopenPullRequest(ctx context.Context, owner, repo string, number int) (*PullRequest, error)
- func (c *Client) ReplaceIssueLabels(ctx context.Context, owner, repo string, number int, labels []string) error
- func (c *Client) ReplacePullRequestLabels(ctx context.Context, owner, repo string, number int, labels []string) error
- func (c *Client) ResetPullRequestReviewStatus(ctx context.Context, owner, repo string, number int, resetAll bool) error
- func (c *Client) ResetPullRequestTestStatus(ctx context.Context, owner, repo string, number int, resetAll bool) error
- func (c *Client) SearchIssues(ctx context.Context, opts SearchIssuesOptions) ([]*SearchIssueResult, error)
- func (c *Client) SearchRepositories(ctx context.Context, opts SearchRepositoriesOptions) ([]*SearchRepositoryResult, error)
- func (c *Client) SearchUsers(ctx context.Context, opts SearchUsersOptions) ([]*SearchUserResult, error)
- func (c *Client) SetAuthStyle(style AuthStyle)
- func (c *Client) SetHTTPClient(client *http.Client)
- func (c *Client) SetModuleSetting(ctx context.Context, owner, repo string, setting ModuleSetting) error
- func (c *Client) StarRepository(ctx context.Context, owner, repo string) error
- func (c *Client) TestWebhook(ctx context.Context, owner, repo string, hookID int64) error
- func (c *Client) TransferRepository(ctx context.Context, owner, repo string, opts TransferRepoOptions) error
- func (c *Client) TransferToOrg(ctx context.Context, org, repo, newOwner string) error
- func (c *Client) UnassignPullRequestReviewers(ctx context.Context, owner, repo string, number int, assignees string) error
- func (c *Client) UnstarRepository(ctx context.Context, owner, repo string) error
- func (c *Client) UpdateBranchProtection(ctx context.Context, owner, repo, wildcard string, ...) error
- func (c *Client) UpdateEnterpriseMember(ctx context.Context, enterprise, username string, ...) (*EnterpriseMember, error)
- func (c *Client) UpdateFile(ctx context.Context, owner, repo, path string, opts UpdateFileOptions) (*FileResult, error)
- func (c *Client) UpdateIssue(ctx context.Context, owner, repo string, number int, opts UpdateIssueOptions) (*Issue, error)
- func (c *Client) UpdateIssueComment(ctx context.Context, owner, repo string, commentID int64, body string) (*IssueComment, error)
- func (c *Client) UpdateIssueLabel(ctx context.Context, owner, repo, originalName string, opts UpdateLabelOptions) (*Label, error)
- func (c *Client) UpdateMilestone(ctx context.Context, owner, repo string, number int, ...) (*Milestone, error)
- func (c *Client) UpdateOrgRepoStatus(ctx context.Context, org, repo, status string) error
- func (c *Client) UpdateOrganization(ctx context.Context, org string, opts UpdateOrgOptions) (*Organization, error)
- func (c *Client) UpdatePRSettings(ctx context.Context, owner, repo string, settings *PRSettings) error
- func (c *Client) UpdatePullRequest(ctx context.Context, owner, repo string, number int, ...) (*PullRequest, error)
- func (c *Client) UpdatePullRequestComment(ctx context.Context, owner, repo string, commentID string, body string) (*PullRequestComment, error)
- func (c *Client) UpdatePushConfig(ctx context.Context, owner, repo string, config *PushConfig) error
- func (c *Client) UpdateRepoMember(ctx context.Context, owner, repo, username string, opts UpdateMemberOptions) error
- func (c *Client) UpdateRepoSettings(ctx context.Context, owner, repo string, opts *RepoSettings) (*RepoSettings, error)
- func (c *Client) UpdateRepository(ctx context.Context, owner, repo string, opts UpdateRepositoryOptions) (*Repository, error)
- func (c *Client) UpdateReviewerConfig(ctx context.Context, owner, repo string, config ReviewerConfig) error
- func (c *Client) UpdateWebhook(ctx context.Context, owner, repo string, hookID int64, ...) (*Webhook, error)
- func (c *Client) UploadFile(ctx context.Context, owner, repo string, filePath string) (*FileUploadResult, error)
- func (c *Client) UploadImage(ctx context.Context, owner, repo string, filePath string) (*FileUploadResult, error)
- type Commit
- type CommitAuthor
- type CommitComparison
- type Contributor
- type ContributorStatistic
- type CreateBranchOptions
- type CreateBranchProtectionOptions
- type CreateFileOptions
- type CreateIssueOptions
- type CreateMilestoneOptions
- type CreateOrgRepoOptions
- type CreatePullRequestInlineCommentOptions
- type CreatePullRequestOptions
- type CreateReleaseOptions
- type CreateRepositoryOptions
- type CreateSSHKeyOptions
- type CreateWebhookOptions
- type CustomizedRole
- type DeleteFileOptions
- type DownloadStatistic
- type Email
- type EnterpriseLabel
- type EnterpriseMember
- type Error
- type FileListEntry
- type FileResult
- type FileUploadResult
- type FlexInt
- type FlexString
- type GitBlob
- type GitTree
- type GitTreeEntry
- type InviteMemberOptions
- type Issue
- type IssueComment
- type IssueExtendSetting
- type IssueOperateLog
- type IssueState
- type IssueWebhookEvent
- type Label
- type Language
- type ListBranchProtectionOptions
- type ListCommitsOptions
- type ListEnterprisePRsOptions
- type ListIssuesOptions
- type ListMilestonesOptions
- type ListOptions
- type ListPullRequestsOptions
- type ListRepositoriesOptions
- type ListStarredReposOptions
- type ListUserIssuesOptions
- type Member
- type MergePullRequestOptions
- type Milestone
- type ModuleSetting
- type Namespace
- type NoteWebhookEvent
- type Notification
- type NullableTime
- type OAuthClient
- func (o *OAuthClient) AuthorizeURL(scope, state string) string
- func (o *OAuthClient) ExchangeToken(ctx context.Context, code string) (*OAuthToken, error)
- func (o *OAuthClient) RefreshToken(ctx context.Context, refreshToken string) (*OAuthToken, error)
- func (o *OAuthClient) SetBaseURL(baseURL string)
- type OAuthToken
- type OrgFollowers
- type OrgMember
- type OrgMemberDetail
- type Organization
- type PROperateLog
- type PRSettings
- type PullRequest
- type PullRequestBranch
- type PullRequestComment
- type PullRequestFile
- type PullRequestReview
- type PullRequestState
- type PullRequestWebhookEvent
- type PushConfig
- type PushEvent
- type RateLimit
- type Release
- type RepoEvent
- type RepoSettings
- type Repository
- type RepositoryContent
- type ReviewerConfig
- type SSHKey
- type SearchIssueResult
- type SearchIssuesOptions
- type SearchOptions
- type SearchRepositoriesOptions
- type SearchRepositoryResult
- type SearchResult
- type SearchUserResult
- type SearchUsersOptions
- type Star
- type Tag
- type TagPushEvent
- type Timestamp
- type TransferRepoOptions
- type UpdateBranchProtectionOptions
- type UpdateEnterpriseMemberOptions
- type UpdateFileOptions
- type UpdateIssueOptions
- type UpdateLabelOptions
- type UpdateMemberOptions
- type UpdateMilestoneOptions
- type UpdateOrgOptions
- type UpdatePullRequestOptions
- type UpdateRepositoryOptions
- type UpdateWebhookOptions
- type User
- type UserEvent
- type UserEventsResponse
- type UserMembership
- type Webhook
- type WebhookEvent
Constants ¶
View Source
const (
DefaultBaseURL = "https://api.gitcode.com/api/v5"
)
View Source
const (
DefaultOAuthBaseURL = "https://gitcode.com"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArchiveStatus ¶
type ArchiveStatus struct {
Archived bool `json:"archived"`
}
type Branch ¶
type Branch struct {
Name string `json:"name"`
Commit *BranchCommitDetail `json:"commit"`
DefaultBranch bool `json:"default_branch,omitempty"`
Protected bool `json:"protected"`
}
type BranchCommitDetail ¶
type BranchCommitDetail struct {
SHA string `json:"sha"`
URL string `json:"url"`
Commit *struct {
Author *CommitAuthor `json:"author"`
Committer *CommitAuthor `json:"committer"`
Message string `json:"message"`
} `json:"commit"`
}
type BranchProtection ¶
type BranchProtectionRule ¶
type BranchProtectionRule struct {
ID int64 `json:"id"`
RepositoryID int64 `json:"repository_id"`
Name string `json:"name"`
RequiredStatusChecks bool `json:"required_status_checks"`
RequiredApprovingReviews int `json:"required_approving_reviews"`
AllowForcePushes bool `json:"allow_force_pushes"`
AllowDeletions bool `json:"allow_deletions"`
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClientFromOAuthToken ¶
func NewClientFromOAuthToken(token *OAuthToken) *Client
func NewClientWithBaseURL ¶
func (*Client) AddIssueLabels ¶
func (*Client) AddPullRequestLabels ¶
func (*Client) ArchiveRepository ¶
func (*Client) AssignPullRequestReviewers ¶
func (*Client) AssignPullRequestTesters ¶
func (*Client) CloseIssue ¶
func (*Client) ClosePullRequest ¶
func (*Client) CompareCommits ¶
func (*Client) CreateBranch ¶
func (*Client) CreateBranchProtection ¶
func (c *Client) CreateBranchProtection(ctx context.Context, owner, repo string, opts CreateBranchProtectionOptions) (*BranchProtectionRule, error)
func (*Client) CreateFile ¶
func (c *Client) CreateFile(ctx context.Context, owner, repo, path string, opts CreateFileOptions) (*FileResult, error)
func (*Client) CreateIssue ¶
func (*Client) CreateIssueComment ¶
func (*Client) CreateIssueLabel ¶
func (*Client) CreateMilestone ¶
func (*Client) CreateMilestoneWithOptions ¶
func (*Client) CreateOrgRepository ¶
func (c *Client) CreateOrgRepository(ctx context.Context, org string, opts CreateOrgRepoOptions) (*Repository, error)
func (*Client) CreatePullRequest ¶
func (c *Client) CreatePullRequest(ctx context.Context, owner, repo string, opts CreatePullRequestOptions) (*PullRequest, error)
func (*Client) CreatePullRequestComment ¶
func (*Client) CreatePullRequestInlineComment ¶
func (c *Client) CreatePullRequestInlineComment(ctx context.Context, owner, repo string, number int, opts CreatePullRequestInlineCommentOptions) (*PullRequestComment, error)
func (*Client) CreatePullRequestReview ¶
func (*Client) CreateRelease ¶
func (*Client) CreateRepository ¶
func (c *Client) CreateRepository(ctx context.Context, opts CreateRepositoryOptions) (*Repository, error)
func (*Client) CreateSSHKey ¶
func (*Client) CreateWebhook ¶
func (*Client) DeleteBranch ¶
func (*Client) DeleteBranchProtection ¶
func (*Client) DeleteFile ¶
func (c *Client) DeleteFile(ctx context.Context, owner, repo, path string, opts DeleteFileOptions) (*FileResult, error)
func (*Client) DeleteIssueComment ¶
func (*Client) DeleteIssueLabel ¶
func (*Client) DeleteMilestone ¶
func (*Client) DeletePullRequestComment ¶
func (*Client) DeleteRelease ¶
func (*Client) DeleteRepository ¶
func (*Client) DeleteWebhook ¶
func (*Client) ExitOrganization ¶
func (*Client) ForkRepository ¶
func (c *Client) ForkRepository(ctx context.Context, owner, repo string, opts *CreateRepositoryOptions) (*Repository, error)
func (*Client) GetArchiveStatus ¶
func (*Client) GetContributorStatistics ¶
func (*Client) GetCustomizedRoles ¶
func (*Client) GetDownloadStatistics ¶
func (*Client) GetEnterpriseIssue ¶
func (*Client) GetEnterpriseIssueLinkedPRs ¶
func (*Client) GetEnterpriseMember ¶
func (*Client) GetIssueComment ¶
func (*Client) GetIssueLinkedPRs ¶
func (*Client) GetIssueOperateLogs ¶
func (*Client) GetLanguages ¶
func (*Client) GetMilestone ¶
func (*Client) GetNamespace ¶
func (*Client) GetOrgInfo ¶
func (*Client) GetOrgIssueExtendSettings ¶
func (*Client) GetOrgMemberDetail ¶
func (*Client) GetOrganization ¶
func (*Client) GetPRSettings ¶
func (*Client) GetPullRequest ¶
func (*Client) GetPullRequestComment ¶
func (*Client) GetPullRequestLinkedIssues ¶
func (*Client) GetPullRequestOperateLogs ¶
func (*Client) GetPushConfig ¶
func (*Client) GetRateLimit ¶
func (*Client) GetRawFile ¶
func (*Client) GetRepoSettings ¶
func (*Client) GetRepository ¶
func (*Client) GetRepositoryContent ¶
func (*Client) GetUserEvents ¶
func (*Client) GetUserMembership ¶
func (*Client) GetWebhook ¶
func (*Client) HandlePullRequestReview ¶
func (*Client) HandlePullRequestTest ¶
func (*Client) InviteOrgMember ¶
func (*Client) IsPullRequestMerged ¶
func (*Client) IsRepositoryStarred ¶
func (*Client) ListBranchProtections ¶
func (*Client) ListBranches ¶
func (*Client) ListCommits ¶
func (*Client) ListContributors ¶
func (*Client) ListEnterpriseIssueComments ¶
func (c *Client) ListEnterpriseIssueComments(ctx context.Context, enterprise string, number int, opts ListOptions) ([]*IssueComment, error)
func (*Client) ListEnterpriseIssueLabels ¶
func (*Client) ListEnterpriseIssues ¶
func (*Client) ListEnterpriseLabels ¶
func (*Client) ListEnterpriseMembers ¶
func (c *Client) ListEnterpriseMembers(ctx context.Context, enterprise, role string, opts ListOptions) ([]*EnterpriseMember, error)
func (*Client) ListEnterprisePullRequests ¶
func (c *Client) ListEnterprisePullRequests(ctx context.Context, enterprise string, opts ListEnterprisePRsOptions) ([]*PullRequest, error)
func (*Client) ListForks ¶
func (c *Client) ListForks(ctx context.Context, owner, repo string, opts ListOptions) ([]*Repository, error)
func (*Client) ListIssueComments ¶
func (*Client) ListIssueLabels ¶
func (*Client) ListIssues ¶
func (*Client) ListMilestones ¶
func (*Client) ListMilestonesWithOptions ¶
func (*Client) ListNotifications ¶
func (c *Client) ListNotifications(ctx context.Context) ([]*Notification, error)
func (*Client) ListOrgFollowers ¶
func (c *Client) ListOrgFollowers(ctx context.Context, org string, opts ListOptions) ([]*OrgFollowers, error)
func (*Client) ListOrgIssues ¶
func (*Client) ListOrgMembers ¶
func (*Client) ListOrgPullRequests ¶
func (c *Client) ListOrgPullRequests(ctx context.Context, org string, opts ListEnterprisePRsOptions) ([]*PullRequest, error)
func (*Client) ListOrgRepositories ¶
func (c *Client) ListOrgRepositories(ctx context.Context, org, repoType string, opts ListOptions) ([]*Repository, error)
func (*Client) ListOrganizationMembers ¶
func (*Client) ListOrganizations ¶
func (c *Client) ListOrganizations(ctx context.Context) ([]*Organization, error)
func (*Client) ListOrganizationsWithOptions ¶
func (c *Client) ListOrganizationsWithOptions(ctx context.Context, admin bool, opts ListOptions) ([]*Organization, error)
func (*Client) ListPullRequestComments ¶
func (*Client) ListPullRequestCommits ¶
func (*Client) ListPullRequestFiles ¶
func (*Client) ListPullRequestLabels ¶
func (*Client) ListPullRequestReviews ¶
func (*Client) ListPullRequests ¶
func (c *Client) ListPullRequests(ctx context.Context, owner, repo string, opts ListPullRequestsOptions) ([]*PullRequest, error)
func (*Client) ListReleases ¶
func (*Client) ListRepoAllIssueComments ¶
func (c *Client) ListRepoAllIssueComments(ctx context.Context, owner, repo string, opts ListOptions) ([]*IssueComment, error)
func (*Client) ListRepoEvents ¶
func (*Client) ListRepositories ¶
func (c *Client) ListRepositories(ctx context.Context, opts ListRepositoriesOptions) ([]*Repository, error)
func (*Client) ListRepositoryContents ¶
func (*Client) ListSSHKeys ¶
func (*Client) ListStargazers ¶
func (*Client) ListStarredRepositories ¶
func (c *Client) ListStarredRepositories(ctx context.Context, opts ListStarredReposOptions) ([]*Repository, error)
func (*Client) ListUserIssues ¶
func (*Client) ListUserOrganizations ¶
func (c *Client) ListUserOrganizations(ctx context.Context, username string, opts ListOptions) ([]*Organization, error)
func (*Client) ListWatchers ¶
func (*Client) ListWebhooks ¶
func (*Client) MergePullRequest ¶
func (*Client) ParseIssueEvent ¶
func (c *Client) ParseIssueEvent(payload []byte) (*IssueWebhookEvent, error)
func (*Client) ParseNoteEvent ¶
func (c *Client) ParseNoteEvent(payload []byte) (*NoteWebhookEvent, error)
func (*Client) ParsePullRequestEvent ¶
func (c *Client) ParsePullRequestEvent(payload []byte) (*PullRequestWebhookEvent, error)
func (*Client) ParseTagPushEvent ¶
func (c *Client) ParseTagPushEvent(payload []byte) (*TagPushEvent, error)
func (*Client) RemoveAllIssueLabels ¶
func (*Client) RemoveIssueLabel ¶
func (*Client) RemoveOrgMember ¶
func (*Client) RemovePullRequestLabel ¶
func (*Client) ReopenIssue ¶
func (*Client) ReopenPullRequest ¶
func (*Client) ReplaceIssueLabels ¶
func (*Client) ReplacePullRequestLabels ¶
func (*Client) ResetPullRequestReviewStatus ¶
func (*Client) ResetPullRequestTestStatus ¶
func (*Client) SearchIssues ¶
func (c *Client) SearchIssues(ctx context.Context, opts SearchIssuesOptions) ([]*SearchIssueResult, error)
func (*Client) SearchRepositories ¶
func (c *Client) SearchRepositories(ctx context.Context, opts SearchRepositoriesOptions) ([]*SearchRepositoryResult, error)
func (*Client) SearchUsers ¶
func (c *Client) SearchUsers(ctx context.Context, opts SearchUsersOptions) ([]*SearchUserResult, error)
func (*Client) SetAuthStyle ¶
func (*Client) SetHTTPClient ¶
func (*Client) SetModuleSetting ¶
func (*Client) StarRepository ¶
func (*Client) TestWebhook ¶
func (*Client) TransferRepository ¶
func (*Client) TransferToOrg ¶
func (*Client) UnassignPullRequestReviewers ¶
func (*Client) UnstarRepository ¶
func (*Client) UpdateBranchProtection ¶
func (*Client) UpdateEnterpriseMember ¶
func (c *Client) UpdateEnterpriseMember(ctx context.Context, enterprise, username string, opts UpdateEnterpriseMemberOptions) (*EnterpriseMember, error)
func (*Client) UpdateFile ¶
func (c *Client) UpdateFile(ctx context.Context, owner, repo, path string, opts UpdateFileOptions) (*FileResult, error)
func (*Client) UpdateIssue ¶
func (*Client) UpdateIssueComment ¶
func (*Client) UpdateIssueLabel ¶
func (*Client) UpdateMilestone ¶
func (*Client) UpdateOrgRepoStatus ¶
func (*Client) UpdateOrganization ¶
func (c *Client) UpdateOrganization(ctx context.Context, org string, opts UpdateOrgOptions) (*Organization, error)
func (*Client) UpdatePRSettings ¶
func (*Client) UpdatePullRequest ¶
func (c *Client) UpdatePullRequest(ctx context.Context, owner, repo string, number int, opts UpdatePullRequestOptions) (*PullRequest, error)
func (*Client) UpdatePullRequestComment ¶
func (*Client) UpdatePushConfig ¶
func (*Client) UpdateRepoMember ¶
func (*Client) UpdateRepoSettings ¶
func (c *Client) UpdateRepoSettings(ctx context.Context, owner, repo string, opts *RepoSettings) (*RepoSettings, error)
func (*Client) UpdateRepository ¶
func (c *Client) UpdateRepository(ctx context.Context, owner, repo string, opts UpdateRepositoryOptions) (*Repository, error)
func (*Client) UpdateReviewerConfig ¶
func (*Client) UpdateWebhook ¶
func (*Client) UploadFile ¶
func (*Client) UploadImage ¶
type CommitAuthor ¶
type CommitComparison ¶
type CommitComparison struct {
TotalCommits int `json:"total_commits"`
AheadBy int `json:"ahead_by"`
BehindBy int `json:"behind_by"`
Commits []*Commit `json:"commits"`
Files []*PullRequestFile `json:"files"`
}
type Contributor ¶
type ContributorStatistic ¶
type CreateBranchOptions ¶
type CreateFileOptions ¶
type CreateIssueOptions ¶
type CreateIssueOptions struct {
Title string `json:"title"`
Body string `json:"body,omitempty"`
Assignee string `json:"assignee,omitempty"`
Assignees []string `json:"assignees,omitempty"`
Milestone int64 `json:"milestone,omitempty"`
Labels []string `json:"labels,omitempty"`
}
func (CreateIssueOptions) MarshalJSON ¶
func (o CreateIssueOptions) MarshalJSON() ([]byte, error)
type CreateMilestoneOptions ¶
type CreateOrgRepoOptions ¶
type CreateOrgRepoOptions struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
Homepage string `json:"homepage,omitempty"`
HasIssues *bool `json:"has_issues,omitempty"`
HasWiki *bool `json:"has_wiki,omitempty"`
CanComment *bool `json:"can_comment,omitempty"`
Public *int `json:"public,omitempty"`
Private *bool `json:"private,omitempty"`
AutoInit *bool `json:"auto_init,omitempty"`
GitignoreTemplate string `json:"gitignore_template,omitempty"`
LicenseTemplate string `json:"license_template,omitempty"`
Path string `json:"path,omitempty"`
DefaultBranch string `json:"default_branch,omitempty"`
}
type CreateReleaseOptions ¶
type CreateRepositoryOptions ¶
type CreateSSHKeyOptions ¶
type CreateWebhookOptions ¶
type CustomizedRole ¶
type DeleteFileOptions ¶
type DownloadStatistic ¶
type EnterpriseLabel ¶
type EnterpriseMember ¶
type Error ¶
type FileListEntry ¶
type FileResult ¶
type FileResult struct {
Content *RepositoryContent `json:"content"`
Commit *Commit `json:"commit"`
}
type FileUploadResult ¶
type FileUploadResult struct {
FilePath string `json:"file_path"`
}
type FlexString ¶
type FlexString string
func (*FlexString) UnmarshalJSON ¶
func (fs *FlexString) UnmarshalJSON(data []byte) error
type GitTree ¶
type GitTree struct {
SHA string `json:"sha"`
URL string `json:"url"`
Truncated bool `json:"truncated"`
Tree []*GitTreeEntry `json:"tree"`
}
type GitTreeEntry ¶
type InviteMemberOptions ¶
type Issue ¶
type Issue struct {
ID int64 `json:"id"`
Number FlexInt `json:"number"`
Title string `json:"title"`
Body string `json:"body"`
State IssueState `json:"state"`
User *User `json:"user"`
Author *User `json:"author"`
Assignees []*User `json:"assignees"`
Labels []*Label `json:"labels"`
Milestone *Milestone `json:"milestone"`
HTMLURL string `json:"html_url"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
ClosedAt *time.Time `json:"closed_at"`
}
type IssueComment ¶
type IssueExtendSetting ¶
type IssueExtendSetting struct {
TypeName string `json:"type_name"`
TypeID int `json:"type_id"`
TypeDesc string `json:"type_desc"`
Status []*struct {
StatusName string `json:"status_name"`
StatusID int `json:"status_id"`
StatusDesc string `json:"status_desc"`
GitcodeIssueStatus int `json:"gitcode_issue_status"`
} `json:"status"`
}
type IssueOperateLog ¶
type IssueState ¶
type IssueState string
const ( IssueStateOpen IssueState = "open" IssueStateClosed IssueState = "closed" )
type IssueWebhookEvent ¶
type IssueWebhookEvent struct {
Action string `json:"action"`
Issue *Issue `json:"issue"`
Repository *Repository `json:"repository"`
Sender *User `json:"sender"`
}
type ListBranchProtectionOptions ¶
type ListBranchProtectionOptions struct {
ListOptions
}
type ListCommitsOptions ¶
type ListCommitsOptions struct {
ListOptions
Branch string `json:"branch,omitempty"`
Since string `json:"since,omitempty"`
Until string `json:"until,omitempty"`
}
type ListEnterprisePRsOptions ¶
type ListEnterprisePRsOptions struct {
ListOptions
State string `json:"state,omitempty"`
IssueNumber int `json:"issue_number,omitempty"`
Sort string `json:"sort,omitempty"`
Direction string `json:"direction,omitempty"`
}
type ListIssuesOptions ¶
type ListIssuesOptions struct {
ListOptions
State IssueState `json:"state,omitempty"`
Assignee string `json:"assignee,omitempty"`
Creator string `json:"creator,omitempty"`
Milestone string `json:"milestone,omitempty"`
Labels string `json:"labels,omitempty"`
Sort string `json:"sort,omitempty"`
Direction string `json:"direction,omitempty"`
Since string `json:"since,omitempty"`
}
type ListMilestonesOptions ¶
type ListMilestonesOptions struct {
ListOptions
State string `json:"state,omitempty"`
Sort string `json:"sort,omitempty"`
Direction string `json:"direction,omitempty"`
}
type ListOptions ¶
type ListPullRequestsOptions ¶
type ListPullRequestsOptions struct {
ListOptions
State PullRequestState `json:"state,omitempty"`
Sort string `json:"sort,omitempty"`
Direction string `json:"direction,omitempty"`
Head string `json:"head,omitempty"`
Base string `json:"base,omitempty"`
}
type ListRepositoriesOptions ¶
type ListRepositoriesOptions struct {
ListOptions
Owner string `json:"owner,omitempty"`
Type string `json:"type,omitempty"`
Sort string `json:"sort,omitempty"`
}
type ListStarredReposOptions ¶
type ListStarredReposOptions struct {
ListOptions
Sort string `json:"sort,omitempty"`
Direction string `json:"direction,omitempty"`
}
type ListUserIssuesOptions ¶
type MergePullRequestOptions ¶
type ModuleSetting ¶
type NoteWebhookEvent ¶
type Notification ¶
type NullableTime ¶
func (*NullableTime) UnmarshalJSON ¶
func (nt *NullableTime) UnmarshalJSON(data []byte) error
type OAuthClient ¶
type OAuthClient struct {
// contains filtered or unexported fields
}
func NewOAuthClient ¶
func NewOAuthClient(clientID, clientSecret, redirectURI string) *OAuthClient
func (*OAuthClient) AuthorizeURL ¶
func (o *OAuthClient) AuthorizeURL(scope, state string) string
func (*OAuthClient) ExchangeToken ¶
func (o *OAuthClient) ExchangeToken(ctx context.Context, code string) (*OAuthToken, error)
func (*OAuthClient) RefreshToken ¶
func (o *OAuthClient) RefreshToken(ctx context.Context, refreshToken string) (*OAuthToken, error)
func (*OAuthClient) SetBaseURL ¶
func (o *OAuthClient) SetBaseURL(baseURL string)
type OAuthToken ¶
type OrgFollowers ¶
type OrgMemberDetail ¶
type Organization ¶
type PROperateLog ¶
type PRSettings ¶
type PullRequest ¶
type PullRequest struct {
ID int64 `json:"id"`
Number int `json:"number"`
IID int `json:"iid,omitempty"`
Title string `json:"title"`
Body string `json:"body"`
Description string `json:"description,omitempty"`
State PullRequestState `json:"state"`
User *User `json:"user"`
Author *User `json:"author"`
Head *PullRequestBranch `json:"head"`
Base *PullRequestBranch `json:"base"`
Merged bool `json:"merged"`
Mergeable *bool `json:"mergeable"`
HTMLURL string `json:"html_url"`
DiffURL string `json:"diff_url,omitempty"`
PatchURL string `json:"patch_url,omitempty"`
Draft bool `json:"draft,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
ClosedAt NullableTime `json:"closed_at,omitempty"`
MergedAt NullableTime `json:"merged_at,omitempty"`
}
type PullRequestBranch ¶
type PullRequestComment ¶
type PullRequestComment struct {
ID FlexString `json:"id"`
Body string `json:"body"`
User *User `json:"user"`
Author *User `json:"author"`
Path string `json:"path"`
Position int `json:"position"`
Line int `json:"line"`
Side string `json:"side"`
CommitID string `json:"commit_id"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type PullRequestFile ¶
type PullRequestReview ¶
type PullRequestState ¶
type PullRequestState string
const ( PullRequestStateOpen PullRequestState = "open" PullRequestStateOpened PullRequestState = "opened" PullRequestStateClosed PullRequestState = "closed" PullRequestStateMerged PullRequestState = "merged" )
type PullRequestWebhookEvent ¶
type PullRequestWebhookEvent struct {
Action string `json:"action"`
Number int `json:"number"`
PullRequest *PullRequest `json:"pull_request"`
Repository *Repository `json:"repository"`
Sender *User `json:"sender"`
}
type PushConfig ¶
type Release ¶
type Release struct {
ID int64 `json:"id"`
TagName string `json:"tag_name"`
TargetCommitish string `json:"target_commitish,omitempty"`
Name string `json:"name"`
Body string `json:"body"`
HTMLURL string `json:"html_url,omitempty"`
Draft bool `json:"draft"`
Prerelease bool `json:"prerelease"`
CreatedAt time.Time `json:"created_at"`
PublishedAt time.Time `json:"published_at,omitempty"`
}
type RepoSettings ¶
type Repository ¶
type Repository struct {
ID int64 `json:"id"`
FullName string `json:"full_name"`
Name string `json:"name"`
Path string `json:"path,omitempty"`
Owner *User `json:"owner"`
Namespace *struct {
ID int64 `json:"id"`
Name string `json:"name"`
Path string `json:"path"`
} `json:"namespace,omitempty"`
Description string `json:"description"`
CloneURL string `json:"http_url_to_repo"`
SSHURL string `json:"ssh_url_to_repo"`
HTMLURL string `json:"web_url"`
DefaultBranch string `json:"default_branch"`
Private bool `json:"private"`
Public bool `json:"public,omitempty"`
Fork bool `json:"fork"`
StarsCount int `json:"stargazers_count"`
ForksCount int `json:"forks_count"`
WatchersCount int `json:"watchers_count"`
OpenIssuesCount int `json:"open_issues_count"`
Language string `json:"language,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
PushedAt *time.Time `json:"pushed_at,omitempty"`
}
type RepositoryContent ¶
type RepositoryContent struct {
Name string `json:"name"`
Path string `json:"path"`
Size int64 `json:"size"`
Type string `json:"type"`
Content string `json:"content,omitempty"`
Encoding string `json:"encoding,omitempty"`
SHA string `json:"sha"`
Links struct {
Self string `json:"self"`
Git string `json:"git"`
} `json:"_links"`
}
type ReviewerConfig ¶
type SearchIssueResult ¶
type SearchIssueResult struct {
ID int64 `json:"id"`
HTMLURL string `json:"html_url"`
Number string `json:"number"`
State string `json:"state"`
Title string `json:"title"`
Body string `json:"body"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Labels []*Label `json:"labels"`
Priority int `json:"priority"`
Comments int `json:"comments"`
Repository *struct {
ID int64 `json:"id"`
FullName string `json:"full_name"`
HumanName string `json:"human_name"`
Path string `json:"path"`
Name string `json:"name"`
URL string `json:"url"`
Owner *User `json:"owner"`
} `json:"repository"`
}
type SearchIssuesOptions ¶
type SearchOptions ¶
type SearchOptions struct {
ListOptions
Query string `json:"q"`
Order string `json:"order,omitempty"`
}
type SearchRepositoryResult ¶
type SearchRepositoryResult struct {
ID int64 `json:"id"`
FullName string `json:"full_name"`
HumanName string `json:"human_name"`
Path string `json:"path"`
Name string `json:"name"`
Description string `json:"description"`
SSHURLToRepo string `json:"ssh_url_to_repo"`
HTTPURLToRepo string `json:"http_url_to_repo"`
WebURL string `json:"web_url"`
ForksCount int `json:"forks_count"`
StargazersCount int `json:"stargazers_count"`
WatchersCount int `json:"watchers_count"`
DefaultBranch string `json:"default_branch"`
OpenIssuesCount int `json:"open_issues_count"`
Private bool `json:"private"`
Public bool `json:"public"`
Fork bool `json:"fork"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
PushedAt string `json:"pushed_at"`
Owner *User `json:"owner"`
Namespace *struct {
ID int64 `json:"id"`
Type string `json:"type"`
Name string `json:"name"`
Path string `json:"path"`
HTMLURL string `json:"html_url"`
} `json:"namespace"`
}
type SearchResult ¶
type SearchResult struct {
TotalCount int `json:"total_count"`
Items []*Repository `json:"items"`
}
type SearchUserResult ¶
type SearchUsersOptions ¶
type SearchUsersOptions struct {
ListOptions
Query string `json:"q"`
Sort string `json:"sort,omitempty"`
Order string `json:"order,omitempty"`
}
type TagPushEvent ¶
type TagPushEvent struct {
Ref string `json:"ref"`
Before string `json:"before"`
After string `json:"after"`
Repository *Repository `json:"repository"`
Sender *User `json:"sender"`
}
type Timestamp ¶
func (*Timestamp) UnmarshalJSON ¶
type TransferRepoOptions ¶
type TransferRepoOptions struct {
NewOwner string `json:"new_owner"`
}
type UpdateEnterpriseMemberOptions ¶
type UpdateEnterpriseMemberOptions struct {
Role string `json:"role"`
}
type UpdateFileOptions ¶
type UpdateIssueOptions ¶
type UpdateIssueOptions struct {
Title string `json:"title,omitempty"`
Body string `json:"body,omitempty"`
State IssueState `json:"state,omitempty"`
StateEvent string `json:"state_event,omitempty"`
Assignee string `json:"assignee,omitempty"`
Assignees []string `json:"assignees,omitempty"`
Milestone int64 `json:"milestone,omitempty"`
Labels []string `json:"labels,omitempty"`
}
type UpdateLabelOptions ¶
type UpdateMemberOptions ¶
type UpdateMemberOptions struct {
Permission string `json:"permission"`
}
type UpdateMilestoneOptions ¶
type UpdateOrgOptions ¶
type UpdatePullRequestOptions ¶
type UpdatePullRequestOptions struct {
Title string `json:"title,omitempty"`
Body string `json:"body,omitempty"`
State PullRequestState `json:"state,omitempty"`
StateEvent string `json:"state_event,omitempty"`
Base string `json:"base,omitempty"`
}
type UpdateRepositoryOptions ¶
type UpdateWebhookOptions ¶
type UserEvent ¶
type UserEvent struct {
Action int `json:"action"`
ActionName string `json:"action_name"`
AuthorID int64 `json:"author_id"`
AuthorUsername string `json:"author_username"`
ProjectID int64 `json:"project_id"`
ProjectName string `json:"project_name"`
CreatedAt string `json:"created_at"`
PushData *struct {
CommitCount int `json:"commit_count"`
Action string `json:"action"`
RefType string `json:"ref_type"`
Ref string `json:"ref"`
CommitFrom string `json:"commit_from"`
CommitTo string `json:"commit_to"`
CommitTitle string `json:"commit_title"`
} `json:"push_data"`
}
type UserEventsResponse ¶
type UserMembership ¶
type UserMembership struct {
ID int64 `json:"id"`
Path string `json:"path"`
Name string `json:"name"`
URL string `json:"url"`
AvatarURL string `json:"avatar_url"`
User *User `json:"user"`
Active bool `json:"active"`
Role string `json:"role"`
Organization *struct {
ID int64 `json:"id"`
Login string `json:"login"`
Name string `json:"name"`
} `json:"organization"`
}
type Webhook ¶
type Webhook struct {
ID int64 `json:"id"`
URL string `json:"url"`
Events []string `json:"events"`
PushEvents bool `json:"push_events"`
TagPushEvents bool `json:"tag_push_events"`
IssuesEvents bool `json:"issues_events"`
MergeRequestsEvents bool `json:"merge_requests_events"`
NoteEvents bool `json:"note_events"`
Active bool `json:"active"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type WebhookEvent ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.