Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithWriteSecrets ¶
func WithWriteSecrets(f func(WriteSecrets) error, opts ...Option) error
Types ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Options to specify when reading secrets.
func RequireGithubToken ¶
func RequireGithubToken() Option
Assert that secrets contain a github token
type ReadSecrets ¶
type ReadSecrets interface { GetLekkoUsername() string GetLekkoToken() string HasLekkoToken() bool GetLekkoTeam() string HasLekkoAPIKey() bool GetLekkoAPIKey() string GetGithubToken() string GetGithubUser() string HasGithubToken() bool GetUsername() string GetToken() string }
func NewSecretsFromEnv ¶ added in v0.3.26
func NewSecretsFromEnv() ReadSecrets
func NewSecretsOrFail ¶
func NewSecretsOrFail(opts ...Option) ReadSecrets
type WriteSecrets ¶
type WriteSecrets interface { ReadSecrets SetLekkoUsername(username string) SetLekkoToken(token string) SetLekkoTeam(team string) SetGithubToken(token string) SetGithubUser(user string) SetLekkoAPIKey(apikey string) }
WriteSecrets holds all the user-specific information that needs to exist for the cli to work, but should not live in a shared config repo. For instance, it holds the github auth token. The secrets are backed by the filesystem under the user's home directory, so these secrets don't need to be fetched as part of every cli command.
Click to show internal directories.
Click to hide internal directories.