Versions in this module Expand all Collapse all v0 v0.1.2 Nov 26, 2024 v0.1.1 Nov 7, 2021 Changes in this version type RepoService + func (s *RepoService) DownloadTarArchive(ctx context.Context, ref string, w io.Writer) (*Response, error) + func (s *RepoService) DownloadZipArchive(ctx context.Context, ref string, w io.Writer) (*Response, error) v0.1.0 Oct 26, 2021 Changes in this version + type AuthError struct + func (e *AuthError) Error() string + func (e *AuthError) Unwrap() error + type Branch struct + Commit Commit + Name string + Protected bool + type Client struct + Search *SearchService + Users *UserService + func NewClient(accessToken string) *Client + func NewEnterpriseClient(apiURL, uploadURL, downloadURL, accessToken string) (*Client, error) + func (c *Client) Do(req *http.Request, body interface{}) (*Response, error) + func (c *Client) EnsureScopes(ctx context.Context, scopes ...Scope) error + func (c *Client) NewDownloadRequest(ctx context.Context, url string) (*http.Request, error) + func (c *Client) NewPageRequest(ctx context.Context, method, url string, pageSize, pageNo int, ...) (*http.Request, error) + func (c *Client) NewRequest(ctx context.Context, method, url string, body interface{}) (*http.Request, error) + func (c *Client) NewUploadRequest(ctx context.Context, url, filepath string) (*http.Request, io.Closer, error) + func (c *Client) Repo(owner, repo string) *RepoService + type Commit struct + Author User + Commit RawCommit + Committer User + HTMLURL string + Parents []Hash + SHA string + URL string + type CreatePullParams struct + Base string + Body string + Draft bool + Head string + Title string + type Epoch int64 + func (e Epoch) String() string + func (e Epoch) Time() time.Time + type Event struct + Actor User + CommitID string + CommitURL string + CreatedAt time.Time + Event string + ID int + URL string + type Hash struct + SHA string + URL string + type Issue struct + Body string + ClosedAt *time.Time + CreatedAt time.Time + HTMLURL string + ID int + Labels []Label + LabelsURL string + Locked bool + Milestone *Milestone + Number int + PullURLs *PullURLs + State string + Title string + URL string + UpdatedAt time.Time + User User + type IssueService struct + func (s *IssueService) Events(ctx context.Context, number, pageSize, pageNo int) ([]Event, *Response, error) + func (s *IssueService) List(ctx context.Context, pageSize, pageNo int, filter IssuesFilter) ([]Issue, *Response, error) + type IssuesFilter struct + Since time.Time + State string + type Label struct + Color string + Default bool + Description string + ID int + Name string + URL string + type Milestone struct + ClosedAt *time.Time + ClosedIssues int + CreatedAt time.Time + Creator User + Description string + DueOn *time.Time + HTMLURL string + ID int + LabelsURL string + Number int + OpenIssues int + State string + Title string + URL string + UpdatedAt time.Time + type NotFoundError struct + func (e *NotFoundError) Error() string + func (e *NotFoundError) Unwrap() error + type Pages struct + First int + Last int + Next int + Prev int + type Permission string + const PermissionAdmin + const PermissionMaintain + const PermissionNone + const PermissionRead + const PermissionTriage + const PermissionWrite + type Pull struct + Base PullBranch + Body string + ClosedAt *time.Time + CommitsURL string + CreatedAt time.Time + DiffURL string + Draft bool + HTMLURL string + Head PullBranch + ID int + IssueURL string + Labels []Label + Locked bool + MergeCommitSHA string + Mergeable *bool + Merged bool + MergedAt *time.Time + MergedBy *User + Milestone *Milestone + Number int + PatchURL string + Rebaseable *bool + State string + StatusesURL string + Title string + URL string + UpdatedAt time.Time + User User + type PullBranch struct + Label string + Ref string + Repo Repository + SHA string + User User + type PullService struct + func (s *PullService) Create(ctx context.Context, params CreatePullParams) (*Pull, *Response, error) + func (s *PullService) Get(ctx context.Context, number int) (*Pull, *Response, error) + func (s *PullService) List(ctx context.Context, pageSize, pageNo int, filter PullsFilter) ([]Pull, *Response, error) + func (s *PullService) Update(ctx context.Context, number int, params UpdatePullParams) (*Pull, *Response, error) + type PullURLs struct + DiffURL string + HTMLURL string + PatchURL string + URL string + type PullsFilter struct + State string + type Qualifier string + const QualifierArchivedFalse + const QualifierArchivedTrue + const QualifierDraftFalse + const QualifierDraftTrue + const QualifierInBody + const QualifierInComments + const QualifierInDescription + const QualifierInEmail + const QualifierInLogin + const QualifierInName + const QualifierInREADME + const QualifierInTitle + const QualifierIsClosed + const QualifierIsInternal + const QualifierIsIssue + const QualifierIsLocked + const QualifierIsMerged + const QualifierIsOpen + const QualifierIsPR + const QualifierIsPrivate + const QualifierIsPublic + const QualifierIsUnlocked + const QualifierIsUnmerged + const QualifierNoAssignee + const QualifierNoLabel + const QualifierNoMilestone + const QualifierNoProject + const QualifierStateClosed + const QualifierStateOpen + const QualifierStatusFailure + const QualifierStatusPending + const QualifierStatusSuccess + const QualifierTypeIssue + const QualifierTypeOrg + const QualifierTypePR + const QualifierTypeUser + func QualifierAssignee(username string) Qualifier + func QualifierAuthor(username string) Qualifier + func QualifierAuthorApp(username string) Qualifier + func QualifierBase(branch string) Qualifier + func QualifierClosedAfter(t time.Time) Qualifier + func QualifierClosedBefore(t time.Time) Qualifier + func QualifierClosedBetween(from, to time.Time) Qualifier + func QualifierClosedOn(t time.Time) Qualifier + func QualifierClosedOnOrAfter(t time.Time) Qualifier + func QualifierClosedOnOrBefore(t time.Time) Qualifier + func QualifierCreatedAfter(t time.Time) Qualifier + func QualifierCreatedBefore(t time.Time) Qualifier + func QualifierCreatedBetween(from, to time.Time) Qualifier + func QualifierCreatedOn(t time.Time) Qualifier + func QualifierCreatedOnOrAfter(t time.Time) Qualifier + func QualifierCreatedOnOrBefore(t time.Time) Qualifier + func QualifierHead(branch string) Qualifier + func QualifierLabel(label string) Qualifier + func QualifierLanguage(language string) Qualifier + func QualifierMergedAfter(t time.Time) Qualifier + func QualifierMergedBefore(t time.Time) Qualifier + func QualifierMergedBetween(from, to time.Time) Qualifier + func QualifierMergedOn(t time.Time) Qualifier + func QualifierMergedOnOrAfter(t time.Time) Qualifier + func QualifierMergedOnOrBefore(t time.Time) Qualifier + func QualifierMilestone(milestone string) Qualifier + func QualifierOrg(orgname string) Qualifier + func QualifierProject(projectBoard string) Qualifier + func QualifierRepo(repoOwner, repoName string) Qualifier + func QualifierRepoProject(repoOwner, repoName, projectBoard string) Qualifier + func QualifierTopic(topic string) Qualifier + func QualifierUpdatedAfter(t time.Time) Qualifier + func QualifierUpdatedBefore(t time.Time) Qualifier + func QualifierUpdatedBetween(from, to time.Time) Qualifier + func QualifierUpdatedOn(t time.Time) Qualifier + func QualifierUpdatedOnOrAfter(t time.Time) Qualifier + func QualifierUpdatedOnOrBefore(t time.Time) Qualifier + func QualifierUser(username string) Qualifier + type Rate struct + Limit int + Remaining int + Reset Epoch + Resource string + Used int + type RateLimitAbuseError struct + Rate Rate + RetryAfter time.Duration + func (e *RateLimitAbuseError) Error() string + func (e *RateLimitAbuseError) Unwrap() error + type RateLimitError struct + Rate Rate + Request *http.Request + func (e *RateLimitError) Error() string + func (e *RateLimitError) Unwrap() error + type RawCommit struct + Author Signature + Committer Signature + Message string + Tree Hash + URL string + type Release struct + Assets []ReleaseAsset + AssetsURL string + Author User + Body string + CreatedAt time.Time + Draft bool + HTMLURL string + ID int + Name string + Prerelease bool + PublishedAt time.Time + TagName string + TarballURL string + Target string + URL string + UploadURL string + ZipballURL string + type ReleaseAsset struct + ContentType string + CreatedAt time.Time + DownloadCount int + DownloadURL string + ID int + Label string + Name string + Size int + State string + URL string + UpdatedAt time.Time + Uploader User + type ReleaseParams struct + Body string + Draft bool + Name string + Prerelease bool + TagName string + Target string + type ReleaseService struct + func (s *ReleaseService) Create(ctx context.Context, params ReleaseParams) (*Release, *Response, error) + func (s *ReleaseService) Delete(ctx context.Context, id int) (*Response, error) + func (s *ReleaseService) DownloadAsset(ctx context.Context, tag, assetName string, w io.Writer) (*Response, error) + func (s *ReleaseService) DownloadTarArchive(ctx context.Context, ref string, w io.Writer) (*Response, error) + func (s *ReleaseService) DownloadZipArchive(ctx context.Context, ref string, w io.Writer) (*Response, error) + func (s *ReleaseService) Get(ctx context.Context, id int) (*Release, *Response, error) + func (s *ReleaseService) GetByTag(ctx context.Context, tag string) (*Release, *Response, error) + func (s *ReleaseService) Latest(ctx context.Context) (*Release, *Response, error) + func (s *ReleaseService) List(ctx context.Context, pageSize, pageNo int) ([]Release, *Response, error) + func (s *ReleaseService) Update(ctx context.Context, id int, params ReleaseParams) (*Release, *Response, error) + func (s *ReleaseService) UploadAsset(ctx context.Context, id int, assetFile, assetLabel string) (*ReleaseAsset, *Response, error) + type RepoService struct + Issues *IssueService + Pulls *PullService + Releases *ReleaseService + func (s *RepoService) Branch(ctx context.Context, name string) (*Branch, *Response, error) + func (s *RepoService) BranchProtection(ctx context.Context, branch string, enabled bool) (*Response, error) + func (s *RepoService) Commit(ctx context.Context, ref string) (*Commit, *Response, error) + func (s *RepoService) Commits(ctx context.Context, pageSize, pageNo int) ([]Commit, *Response, error) + func (s *RepoService) Get(ctx context.Context) (*Repository, *Response, error) + func (s *RepoService) Permission(ctx context.Context, username string) (Permission, *Response, error) + func (s *RepoService) Tags(ctx context.Context, pageSize, pageNo int) ([]Tag, *Response, error) + type Repository struct + Archived bool + CreatedAt time.Time + DefaultBranch string + Description string + Disabled bool + Fork bool + FullName string + HTMLURL string + ID int + Name string + Owner User + Private bool + PushedAt time.Time + Topics []string + URL string + UpdatedAt time.Time + type Response struct + Pages Pages + Rate Rate + type ResponseError struct + DocumentationURL string + Message string + Response *http.Response + func (e *ResponseError) Error() string + type Scope string + const ScopeAdminGPGKey + const ScopeAdminOrg + const ScopeAdminOrgHook + const ScopeAdminPublicKey + const ScopeAdminRepoHook + const ScopeDeletePackages + const ScopeDeleteRepo + const ScopeGist + const ScopeNotifications + const ScopePublicRepo + const ScopeReadDiscussion + const ScopeReadGPGKey + const ScopeReadOrg + const ScopeReadPackages + const ScopeReadPublicKey + const ScopeReadRepoHook + const ScopeReadUser + const ScopeRepo + const ScopeRepoDeployment + const ScopeRepoInvite + const ScopeRepoStatus + const ScopeSecurityEvents + const ScopeUser + const ScopeUserEmail + const ScopeUserFollow + const ScopeWorkflow + const ScopeWriteDiscussion + const ScopeWriteGPGKey + const ScopeWriteOrg + const ScopeWritePackages + const ScopeWritePublicKey + const ScopeWriteRepoHook + type SearchIssuesResult struct + IncompleteResults bool + Items []Issue + TotalCount int + type SearchQuery struct + func (q *SearchQuery) ExcludeKeywords(keywords ...string) + func (q *SearchQuery) ExcludeQualifiers(qualifiers ...Qualifier) + func (q *SearchQuery) IncludeKeywords(keywords ...string) + func (q *SearchQuery) IncludeQualifiers(qualifiers ...Qualifier) + func (q *SearchQuery) String() string + type SearchReposResult struct + IncompleteResults bool + Items []Repository + TotalCount int + type SearchResultOrder string + const AscOrder + const DefaultOrder + const DescOrder + type SearchResultSort string + const SortByComments + const SortByCreated + const SortByDefault + const SortByFollowers + const SortByForks + const SortByInteractions + const SortByJoined + const SortByReactions + const SortByRepositories + const SortByStars + const SortByUpdated + type SearchService struct + func (s *SearchService) SearchIssues(ctx context.Context, pageSize, pageNo int, sort SearchResultSort, ...) (*SearchIssuesResult, *Response, error) + func (s *SearchService) SearchRepos(ctx context.Context, pageSize, pageNo int, sort SearchResultSort, ...) (*SearchReposResult, *Response, error) + func (s *SearchService) SearchUsers(ctx context.Context, pageSize, pageNo int, sort SearchResultSort, ...) (*SearchUsersResult, *Response, error) + type SearchUsersResult struct + IncompleteResults bool + Items []User + TotalCount int + type Signature struct + Email string + Name string + Time time.Time + type Tag struct + Commit Hash + Name string + type UpdatePullParams struct + Base string + Body string + State string + Title string + type User struct + AvatarURL string + CreatedAt time.Time + Email string + GravatarID string + HTMLURL string + ID int + Login string + Name string + OrgsURL string + Type string + URL string + UpdatedAt time.Time + type UserService struct + func (s *UserService) Get(ctx context.Context, username string) (*User, *Response, error) + func (s *UserService) User(ctx context.Context) (*User, *Response, error)