Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAppToken ¶
func GetAppToken(credentials config.GithubAppCredentials) (string, error)
GetAppToken takes a Github App ID and Client Secret in PEM format as inputs, and returns an access token that can be used with the Github API.
Types ¶
type OrgClient ¶
type OrgClient struct {
// contains filtered or unexported fields
}
OrgClient is used for making administrative changes to a given Github org.
func NewOrgClient ¶
func NewOrgClient(credentials config.GithubAppCredentials, org string) *OrgClient
NewOrgClient constructs a new OrgClient using the supplied credentials.
type PATClient ¶
type PATClient struct {
// contains filtered or unexported fields
}
PATClient represents an http.Client that can be logged into Github, retaining any session cookies, and used for listing, creating, and deleting PATs.
func NewPATClient ¶
func NewPATClient(credentials config.LoginCredentials) *PATClient
NewPATClient constructs a new PATClient and returns it.
type RepoClient ¶
type RepoClient struct {
// contains filtered or unexported fields
}
RepoClient is used for manipulating secrets and environments in Github repositories.
func NewRepoClient ¶
func NewRepoClient(token string, org string) *RepoClient
NewRepoClient constructs a new RepoClient with the specified credentials.
func (*RepoClient) SetEnvSecret ¶
func (rc *RepoClient) SetEnvSecret(ctx context.Context, repo string, track config.Track, secretName, secretValue string) error
SetEnvSecret sets a secret in the specified environment for the specified repo. If the environment does not exist, it is created.