Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoAuth error = errors.New("not authenticated")
ErrNoAuth indicates that no user is authenticated with GitHub
Functions ¶
Types ¶
type ExchangeGitHubCodeReq ¶
type ExchangeGitHubCodeReq 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"` }
ExchangeGitHubCodeReq holds the parameters required to make a GitHub API request to exchange a temporary GitHub code for a longer lasting GitHub token
func NewExchangeGitHubCodeReq ¶
func NewExchangeGitHubCodeReq(cfg *config.Config, code string) ExchangeGitHubCodeReq
NewExchangeGitHubCodeReq creates a new ExchangeGitHubCodeReq. Most of the fields can be filled by passing an config.Config object
func (ExchangeGitHubCodeReq) Exchange ¶
func (r ExchangeGitHubCodeReq) Exchange() (string, error)
Exchange exchanges a temporary GitHub code for a longer lasting GitHub token
Click to show internal directories.
Click to hide internal directories.