Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ExchangeGitHubCodeRequest ¶
type ExchangeGitHubCodeRequest struct { // ClientID is the GitHub app's Client ID ClientID string `json:"client_id"` // ClientSecret is the GitHub app's client secret ClientSecret string `json:"client_secret"` // Code is the temporary GitHub authentication code Code string `json:"code"` // State is a value used to prevent cross site request forgery State string `json:"state"` }
ExchangeGitHubCodeRequest holds the parameters required to make a GitHub API request to exchange a temporary GitHub code for a longer lasting GitHub token
func NewExchangeGitHubCodeRequest ¶
func NewExchangeGitHubCodeRequest(cfg config.Config, code, state string) ExchangeGitHubCodeRequest
NewExchangeGitHubCodeRequest creates a new ExchangeGitHubCodeRequest. Most of the fields can be filled by passing an config.Config object
func (ExchangeGitHubCodeRequest) Do ¶
func (r ExchangeGitHubCodeRequest) Do() (string, error)
Exchange exchanges a temporary GitHub code for a longer lasting GitHub token
type GetRepositoryRequest ¶
type GetRepositoryRequest struct {
// contains filtered or unexported fields
}
GetRepositoryRequest are the parameters for a get repository GitHub API request
func NewGetRepositoryRequest ¶
func NewGetRepositoryRequest(ctx context.Context, client *github.Client, owner, name string) GetRepositoryRequest
NewGetRepositoryRequest creates a new GetRepositoryRequest
func (GetRepositoryRequest) Do ¶
func (r GetRepositoryRequest) Do() (*github.Repository, error)
GetRepository makes a get repository GitHub API request
type IdentifyAuthTokenRequest ¶
type IdentifyAuthTokenRequest struct {
// contains filtered or unexported fields
}
IdentifyAuthTokenRequest holds the parameters of a GitHub API request to identify the owner of a GitHub authentication token
func NewIdentifyAuthTokenRequest ¶
func NewIdentifyAuthTokenRequest(ctx context.Context, authToken string) IdentifyAuthTokenRequest
NewIdentifyAuthTokenRequest creates a new IdentifyAuthTokenRequest
func (IdentifyAuthTokenRequest) Do ¶
func (r IdentifyAuthTokenRequest) Do() (string, error)
Identify returns the user ID of the GitHub user who owns the provided GH auth token
type ListIssuesRequest ¶
type ListIssuesRequest struct {
// contains filtered or unexported fields
}
ListIssuesRequest holds the parameters for a list issues GitHub API request
func NewListIssuesRequest ¶
func NewListIssuesRequest(ctx context.Context, client *github.Client, owner, name string) ListIssuesRequest
NewListIssuesRequest creates a new ListIssuesRequest