Documentation ¶
Index ¶
- func GenerateGithubAppToken(ctx context.Context, appId int, privateKeyPEM string, validity time.Duration) (appTokenString string, err error)
- func GenerateGithubInstallationTokenFromAppToken(ctx context.Context, installationId, appToken string) (installationTokenString string, err error)
- func GenerateTokenForOrganization(ctx context.Context, orgLogin string) (installationToken string, err error)
- func GetAppUrl() string
- func GetGithubApiUrl() string
- func GetInstallationTokenUrl(installationId string) string
- func GetOrganizationUrl(orgLogin string) string
- func GetRepositoryUrl(orgLogin string) string
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 GetGithubApiUrl ¶
func GetGithubApiUrl() string
func GetInstallationTokenUrl ¶
func GetOrganizationUrl ¶
func GetRepositoryUrl ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.