Documentation ¶
Overview ¶
Package github implements a sidecred.Provider for Github access tokens and deploy keys. It also implements a client for Github Apps, which is used to create the supported credentials.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithDeployKeyRotationInterval ¶
WithDeployKeyRotationInterval sets the interval at which deploy keys should be rotated.
func WithReposClientFactory ¶
func WithReposClientFactory(f func(token string) RepositoriesAPI) option
WithReposClientFactory sets the function used to create new installation clients, and can be used to return test fakes.
Types ¶
type AccessTokenRequestConfig ¶
type AccessTokenRequestConfig struct {
Owner string `json:"owner"`
}
AccessTokenRequestConfig ...
type AppsAPI ¶
type AppsAPI interface { ListInstallations(ctx context.Context, opt *github.ListOptions) ([]*github.Installation, *github.Response, error) CreateInstallationToken(ctx context.Context, id int64, opt *github.InstallationTokenOptions) (*github.InstallationToken, *github.Response, error) }
AppsAPI wraps the Github Apps API.
type DeployKeyRequestConfig ¶
type DeployKeyRequestConfig struct { Owner string `json:"owner"` Repository string `json:"repository"` Title string `json:"title"` ReadOnly bool `json:"read_only"` }
DeployKeyRequestConfig ...
type RepositoriesAPI ¶
type RepositoriesAPI interface { ListKeys(ctx context.Context, owner string, repo string, opt *github.ListOptions) ([]*github.Key, *github.Response, error) CreateKey(ctx context.Context, owner string, repo string, key *github.Key) (*github.Key, *github.Response, error) DeleteKey(ctx context.Context, owner string, repo string, id int64) (*github.Response, error) }
RepositoriesAPI wraps the Github repositories API.
Click to show internal directories.
Click to hide internal directories.