github

package
v0.0.0-...-cb90f35 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateGithubAppToken

func GenerateGithubAppToken(ctx context.Context, appId int, privateKeyPEM string, validity time.Duration) (appTokenString string, err error)

GenerateGithubToken generates a new github access token. The token is generated by signing a self created jwt with the private key shared with github once the app was created. The private key was initially generated by github.

func GenerateGithubInstallationTokenFromAppToken

func GenerateGithubInstallationTokenFromAppToken(ctx context.Context, installationId, appToken string) (installationTokenString string, err error)

GenerateGithubInstallationTokenFromAppToken requests a github installation token from github

the required appToken can be generated with the GenerateGithubAppToken function

func GenerateTokenForOrganization

func GenerateTokenForOrganization(ctx context.Context, orgLogin string) (installationToken string, err error)

GenerateTokenForOrganization look up a token for the organization

func GetAppUrl

func GetAppUrl() string

func GetGithubApiUrl

func GetGithubApiUrl() string

func GetInstallationTokenUrl

func GetInstallationTokenUrl(installationId string) string

func GetOrganizationUrl

func GetOrganizationUrl(orgLogin string) string

func GetRepositoryUrl

func GetRepositoryUrl(orgLogin string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL