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 New ¶
func New(app App, owner, repository string, options ...option) sidecred.SecretStore
New creates a new sidecred.SecretStore using Github repository secrets.
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 ¶
func WithSecretTemplate(t string) option
WithSecretTemplate sets the secret name template when instanciating a new store.
Types ¶
type ActionsAPI ¶
type ActionsAPI interface { GetPublicKey(ctx context.Context, owner, repo string) (*github.PublicKey, *github.Response, error) CreateOrUpdateSecret(ctx context.Context, owner, repo string, eSecret *github.EncryptedSecret) (*github.Response, error) GetSecret(ctx context.Context, owner, repo, name string) (*github.Secret, *github.Response, error) DeleteSecret(ctx context.Context, owner, repo, name string) (*github.Response, error) }
ActionsAPI wraps the Github actions API.
Click to show internal directories.
Click to hide internal directories.