Documentation
¶
Index ¶
Constants ¶
const ( KeyAppID = "githubAppID" KeyAppInstallationID = "githubAppInstallationID" KeyAppPrivateKey = "githubAppPrivateKey" KeyAppBaseURL = "githubAppBaseURL" AccessTokenUsername = "x-access-token" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppToken ¶
AppToken contains a GitHub App installation token and its expiry.
func (*AppToken) GetDuration ¶
GetDuration returns the duration until the token expires.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an authentication provider for GitHub Apps.
func (*Client) GetToken ¶
GetToken returns the token that can be used to authenticate as a GitHub App installation. Ref: https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-as-a-github-app-installation
type OptFunc ¶
type OptFunc func(*Client)
OptFunc enables specifying options for the provider.
func WithAppData ¶
WithAppData configures the client using data from a map
func WithCache ¶
func WithCache(cache *cache.TokenCache, kind, name, namespace, operation string) OptFunc
WithCache sets the token cache and the object involved in the operation for recording cache events.
func WithProxyURL ¶
WithProxyURL sets the proxy URL to use with the transport.
func WithTLSConfig ¶ added in v0.35.0
WithTLSConfig sets the tls config to use with the transport.