Documentation ¶
Overview ¶
Package github implements a sidecred.SecretStore on top of Github secrets.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewActionsStore ¶ added in v0.14.0
func NewActionsStore(app App, options ...Option) sidecred.SecretStore
func NewDependabotStore ¶ added in v0.14.0
func NewDependabotStore(app App, options ...Option) sidecred.SecretStore
Types ¶
type ActionsAPI ¶
type ActionsAPI interface { GetRepoPublicKey(ctx context.Context, owner, repo string) (*github.PublicKey, *github.Response, error) CreateOrUpdateRepoSecret( ctx context.Context, owner, repo string, eSecret *github.EncryptedSecret, ) (*github.Response, error) GetRepoSecret(ctx context.Context, owner, repo, name string) (*github.Secret, *github.Response, error) DeleteRepoSecret(ctx context.Context, owner, repo, name string) (*github.Response, error) }
ActionsAPI wraps the Github actions API.
type App ¶
type App interface { CreateInstallationToken(owner string, repositories []string, permissions *githubapp.Permissions) ( *githubapp.Token, error, ) }
App is the interface that needs to be satisfied by the Github App implementation.
type Option ¶ added in v0.14.0
type Option func(*store)
func WithActionsClientFactory ¶
func WithActionsClientFactory(f func(token string) ActionsAPI) Option
WithActionsClientFactory sets the function used to create new installation clients, and can be used to return test fakes.
func WithSecretTemplate ¶
WithSecretTemplate sets the secret name template when instantiating a new store.
Click to show internal directories.
Click to hide internal directories.