Documentation ¶
Index ¶
- func ReadFromEnv(name string, censor *DynamicCensor) string
- func ReadFromFile(path string, censor *DynamicCensor) (string, error)
- type CLIOptions
- func (o *CLIOptions) Bind(fs *flag.FlagSet, getenv func(string) string, censor *DynamicCensor)
- func (o *CLIOptions) Complete(censor *DynamicCensor) error
- func (o *CLIOptions) NewClient(censor *DynamicCensor) (Client, error)
- func (o *CLIOptions) NewReadOnlyClient(censor *DynamicCensor) (ReadOnlyClient, error)
- func (o *CLIOptions) Validate() error
- type Client
- type DynamicCensor
- type ReadOnlyClient
- type SecretUsageComparer
- type VaultClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadFromEnv ¶
func ReadFromEnv(name string, censor *DynamicCensor) string
ReadFromEnv loads an environment variable and adds it to the censor list.
func ReadFromFile ¶
func ReadFromFile(path string, censor *DynamicCensor) (string, error)
ReadFromFile loads content from a file and adds it to the censor list.
Types ¶
type CLIOptions ¶
type CLIOptions struct { VaultTokenFile string VaultAddr string VaultPrefix string VaultRole string VaultToken string }
func (*CLIOptions) Bind ¶
func (o *CLIOptions) Bind(fs *flag.FlagSet, getenv func(string) string, censor *DynamicCensor)
func (*CLIOptions) Complete ¶
func (o *CLIOptions) Complete(censor *DynamicCensor) error
func (*CLIOptions) NewClient ¶
func (o *CLIOptions) NewClient(censor *DynamicCensor) (Client, error)
func (*CLIOptions) NewReadOnlyClient ¶
func (o *CLIOptions) NewReadOnlyClient(censor *DynamicCensor) (ReadOnlyClient, error)
func (*CLIOptions) Validate ¶
func (o *CLIOptions) Validate() error
type Client ¶
type Client interface { ReadOnlyClient SetFieldOnItem(itemName, fieldName string, fieldValue []byte) error UpdateNotesOnItem(itemName string, notes string) error }
func NewDryRunClient ¶
func NewVaultClient ¶
func NewVaultClient(upstream VaultClient, prefix string, censor *DynamicCensor) Client
type DynamicCensor ¶
type DynamicCensor struct { sync.RWMutex *secretutil.ReloadingCensorer // contains filtered or unexported fields }
DynamicCensor keeps a list of censored secrets that is dynamically updated. Used when the list of secrets to censor is updated during the execution of the program and cannot be determined in advance. Access to the list of secrets is internally synchronized.
func NewDynamicCensor ¶
func NewDynamicCensor() DynamicCensor
func (*DynamicCensor) AddSecrets ¶
func (c *DynamicCensor) AddSecrets(s ...string)
AddSecrets adds the content of one or more secrets to the censor list.
type ReadOnlyClient ¶
type SecretUsageComparer ¶
Click to show internal directories.
Click to hide internal directories.