Documentation
¶
Index ¶
- func InstallationTokenOptions(repoName string) (*github.InstallationTokenOptions, error)
- func ParsePrivateKey(privateKey string) (*rsa.PrivateKey, error)
- type Client
- func (c *Client) CreateJWT(now time.Time) (string, error)
- func (c *Client) Enabled() bool
- func (c *Client) NewGitHubClient(ctx context.Context, baseURL string) (*github.Client, error)
- func (c *Client) ResolveInstallationToken(ctx context.Context, config *InstallationTokenConfig, repoName string) (string, error)
- func (c *Client) ValidateBaseURL(baseURL string) (*url.URL, error)
- type Config
- type InstallationTokenConfig
- type OAuthClient
- func (c *OAuthClient) AuthorizationURL(state string) (string, error)
- func (c *OAuthClient) Enabled() bool
- func (c *OAuthClient) ExchangeCode(ctx context.Context, code string) (*oauth2.Token, error)
- func (c *OAuthClient) GetAuthenticatedUser(ctx context.Context, token *oauth2.Token) (*github.User, error)
- func (c *OAuthClient) NewUserClient(ctx context.Context, token *oauth2.Token) (*github.Client, error)
- type OAuthConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InstallationTokenOptions ¶
func InstallationTokenOptions(repoName string) (*github.InstallationTokenOptions, error)
func ParsePrivateKey ¶
func ParsePrivateKey(privateKey string) (*rsa.PrivateKey, error)
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) NewGitHubClient ¶
func (*Client) ResolveInstallationToken ¶
type InstallationTokenConfig ¶
type OAuthClient ¶
type OAuthClient struct {
// contains filtered or unexported fields
}
func NewOAuthClient ¶
func NewOAuthClient(conf *OAuthConfig) (*OAuthClient, error)
func (*OAuthClient) AuthorizationURL ¶
func (c *OAuthClient) AuthorizationURL(state string) (string, error)
func (*OAuthClient) Enabled ¶
func (c *OAuthClient) Enabled() bool
func (*OAuthClient) ExchangeCode ¶
func (*OAuthClient) GetAuthenticatedUser ¶
func (*OAuthClient) NewUserClient ¶
Click to show internal directories.
Click to hide internal directories.