Versions in this module Expand all Collapse all v0 v0.1.2 Jan 2, 2021 v0.1.1 Jan 1, 2021 Changes in this version type RepoService + func (s *RepoService) DownloadTarArchive(ctx context.Context, ref, outFile string) (*Response, error) + func (s *RepoService) DownloadZipArchive(ctx context.Context, ref, outFile string) (*Response, error) v0.1.0 Nov 24, 2020 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 + Users *UsersService + 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 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 IssuesParams 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 PullURLs struct + DiffURL string + HTMLURL string + PatchURL string + URL string + type PullsParams struct + State string + type Rate struct + Limit int + Remaining int + Reset Epoch + 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 RepoService struct + 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) CreateRelease(ctx context.Context, params ReleaseParams) (*Release, *Response, error) + func (s *RepoService) DownloadReleaseAsset(ctx context.Context, releaseTag, assetName, outFile string) (*Response, error) + func (s *RepoService) Events(ctx context.Context, number, pageSize, pageNo int) ([]Event, *Response, error) + func (s *RepoService) Get(ctx context.Context) (*Repository, *Response, error) + func (s *RepoService) Issues(ctx context.Context, pageSize, pageNo int, params IssuesParams) ([]Issue, *Response, error) + func (s *RepoService) LatestRelease(ctx context.Context) (*Release, *Response, error) + func (s *RepoService) Permission(ctx context.Context, username string) (Permission, *Response, error) + func (s *RepoService) Pull(ctx context.Context, number int) (*Pull, *Response, error) + func (s *RepoService) Pulls(ctx context.Context, pageSize, pageNo int, params PullsParams) ([]Pull, *Response, error) + func (s *RepoService) Tags(ctx context.Context, pageSize, pageNo int) ([]Tag, *Response, error) + func (s *RepoService) UpdateRelease(ctx context.Context, releaseID int, params ReleaseParams) (*Release, *Response, error) + func (s *RepoService) UploadReleaseAsset(ctx context.Context, releaseID int, assetFile, assetLabel string) (*ReleaseAsset, *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 Signature struct + Email string + Name string + Time time.Time + type Tag struct + Commit Hash + Name 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 UsersService struct + func (s *UsersService) Get(ctx context.Context, username string) (*User, *Response, error) + func (s *UsersService) User(ctx context.Context) (*User, *Response, error)