Documentation ¶
Index ¶
- Constants
- type App
- type Authorization
- type AuthorizationParams
- type Client
- func (c *Client) AuthenticatedUser() (*User, error)
- func (c *Client) Authorizations() ([]Authorization, error)
- func (c *Client) CreatePullRequest(repo Repo, params PullRequestParams) (*PullRequest, error)
- func (c *Client) CreatePullRequestForIssue(repo Repo, params PullRequestForIssueParams) (*PullRequest, error)
- func (c *Client) CreateRepository(name string, params *Params) (*Repository, error)
- func (c *Client) CreatedAuthorization(params AuthorizationParams) (*Authorization, error)
- func (c *Client) Fork(repo Repo, params *Params) (*Repository, error)
- func (c *Client) PullRequest(repo Repo, number string) (*PullRequest, error)
- func (c *Client) Repository(repo Repo) (*Repository, error)
- func (c *Client) Statuses(repo Repo, sha string) ([]Status, error)
- func (c *Client) User(login string) (*User, error)
- func (c *Client) WithLogin(login, password string) *Client
- func (c *Client) WithToken(token string) *Client
- type Commit
- type Organization
- type Params
- type PullRequest
- type PullRequestForIssueParams
- type PullRequestParams
- type Repo
- type Repository
- type Status
- type User
Constants ¶
View Source
const ( GitHubAPIURL string = "https://" + GitHubAPIHost GitHubAPIHost string = "api.github.com" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authorization ¶
type AuthorizationParams ¶
type Client ¶
type Client struct { Login string Password string Token string // contains filtered or unexported fields }
func (*Client) AuthenticatedUser ¶
func (*Client) Authorizations ¶
func (c *Client) Authorizations() ([]Authorization, error)
func (*Client) CreatePullRequest ¶
func (c *Client) CreatePullRequest(repo Repo, params PullRequestParams) (*PullRequest, error)
func (*Client) CreatePullRequestForIssue ¶
func (c *Client) CreatePullRequestForIssue(repo Repo, params PullRequestForIssueParams) (*PullRequest, error)
func (*Client) CreateRepository ¶
func (c *Client) CreateRepository(name string, params *Params) (*Repository, error)
func (*Client) CreatedAuthorization ¶
func (c *Client) CreatedAuthorization(params AuthorizationParams) (*Authorization, error)
func (*Client) PullRequest ¶
func (c *Client) PullRequest(repo Repo, number string) (*PullRequest, error)
func (*Client) Repository ¶
func (c *Client) Repository(repo Repo) (*Repository, error)
type Commit ¶
type Commit struct { Label string `json:"label"` Ref string `json:"ref"` Sha string `json:"sha"` User User `json:"user"` Repo Repository `json:"repo"` }
type Organization ¶
type Organization User
type PullRequest ¶
type PullRequest struct { URL string `json:"url"` Id int `json:"id"` HTMLURL string `json:"html_url"` DiffURL string `json:"diff_url"` PatchURL string `json:"patch_url"` IssueURL string `json:"issue_url"` Number int `json:"number"` State string `json:"state"` Title string `json:"title"` User User `json:"user"` Body string `json:"body"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` ClosedAt *time.Time `json:"closed_at"` MergedAt *time.Time `json:"merged_at"` MergedCommitSha string `json:"merged_commit_sha"` Assignee *User `json:"assignee"` CommitsUrl string `json:"commits_url"` ReviewCommentsUrl string `json:"review_comments_url"` ReviewCommentUrl string `json:"review_comment_url"` CommentsUrl string `json:"comments_url"` Head Commit `json:"head"` Base Commit `json:"base"` Merged bool `json:"merged"` MergedBy User `json:"merged_by"` Comments int `json:"comments"` ReviewComments int `json:"review_comments"` Commits int `json:"commits"` Additions int `json:"additions"` Deletions int `json:"deletions"` ChangedFiles int `json:"changed_files"` }
type PullRequestParams ¶
type Repository ¶
type Repository struct { ID int `json:"id"` Owner User `json:"owner"` Name string `json:"name"` FullName string `json:"full_name"` Description string `json:"description"` Private bool `json:"private"` Fork bool `json:"fork"` URL string `json:"url"` HTMLURL string `json:"html_url"` CloneURL string `json:"clone_url"` GitURL string `json:"git_url"` SshURL string `json:"ssh_url"` SvnURL string `json:"svn_url"` MirrorURL string `json:"mirror_url"` Homepage string `json:"homepage"` Language string `json:"language"` Forks int `json:"forks"` ForksCount int `json:"forks_count"` Watchers int `json:"watchers"` WatchersCount int `json:"watchers_count"` Size int `json:"size"` MasterBranch string `json:"master_branch"` OpenIssues int `json:"open_issues"` PushedAt time.Time `json:"pushed_at"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` Organization *Organization `json:"organization"` Parent *Repository `json:"parent"` Source *Repository `json:"source"` HasIssues bool `json:"has_issues"` HasWiki bool `json:"has_wiki"` HasDownloads bool `json:"has_downloads"` }
type User ¶
type User struct { Login string `json:"login"` ID int `json:"id"` AvatarURL string `json:"avatar_url"` GravatarID string `json:"gravatar_id"` URL string `json:"url"` Name string `json:"name"` Company string `json:"company"` Blog string `json:"blog"` Location string `json:"location"` Email string `json:"email"` Hireable bool `json:"hireable"` Bio string `json:"bio"` PublicRepos int `json:"public_repos"` PublicGists int `json:"jsonpublic_gists"` Followers int `json:"followers"` Following int `json:"following"` HTMLURL string `json:"html_url"` CreatedAt time.Time `json:"created_at"` Type string `json:"type"` }
Click to show internal directories.
Click to hide internal directories.