Documentation
¶
Index ¶
- func GetInstallationToken(baseURL string, uploadURL string, appID int64, installationID int64, ...) (string, time.Time, error)
- func NewClientFromBearerToken(baseURL string, uploadURL string, token string) (*github.Client, error)
- func NewClientFromInstallationToken(baseURL string, uploadURL string, token string) (*github.Client, error)
- func NewClientFromKeyPEM(baseURL string, uploadURL string, appID int64, installationID int64, ...) (*github.Client, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetInstallationToken ¶
func GetInstallationToken( baseURL string, uploadURL string, appID int64, installationID int64, keyPEM []byte, ) (string, time.Time, error)
GetInstallationToken returns an installation token and its expiry time for the given baseURL, uploadURL, appID, and installationID. It uses the provided ASCII-armored x509 certificate key to sign a JSON web token that is then exchanged for the installation token. If baseURL is the empty string, the client used in this process will be one for github.com. Otherwise, the client will be one for GitHub Enterprise.
func NewClientFromBearerToken ¶
func NewClientFromBearerToken( baseURL string, uploadURL string, token string, ) (*github.Client, error)
NewClientFromBearerToken returns a new github.Client for the given baseURL, uploadURL and bearer token. If baseURL is the empty string, the client will be for github.com. Otherwise, the client will be one for GitHub Enterprise.
func NewClientFromInstallationToken ¶
func NewClientFromInstallationToken( baseURL string, uploadURL string, token string, ) (*github.Client, error)
NewClientFromInstallationToken returns a new github.Client for the given baseURL, uploadURL and installation token. If baseURL is the empty string, the client will be for github.com. Otherwise, the client will be one for GitHub Enterprise.
func NewClientFromKeyPEM ¶
func NewClientFromKeyPEM( baseURL string, uploadURL string, appID int64, installationID int64, keyPEM []byte, ) (*github.Client, error)
NewClientFromKeyPEM returns a new github.Client for the given baseURL, uploadURL, appID, and installationID. It uses the provided ASCII-armored x509 certificate key to sign a JSON web token that is then exchanged for an installation token that will ultimately be used by the returned client. If baseURL is the empty string, the client will be for github.com. Otherwise, the client will be one for GitHub Enterprise.
Types ¶
This section is empty.