vault

package
v0.0.0-...-9b598c7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KindTmp = "tmp"
	KindAws = "aws"

	DefaultRegion = "us-east-1"
)

Variables

View Source
var NotFound = fmt.Errorf("not found")
View Source
var OwnerResourceTagKey = "owner-resource"

Functions

func ConfigProviders

func ConfigProviders() di.Option

func NewAwsVaultService

func NewAwsVaultService(vaultConfig *Config) (*awsVaultService, error)

func ServiceProviders

func ServiceProviders() di.Option

Types

type Config

type Config struct {
	// Used for OSD Cluster creation with OCM
	Kind                string `json:"kind"`
	AccessKey           string `json:"access_key"`
	AccessKeyFile       string `json:"access_key_file"`
	SecretAccessKey     string `json:"secret_access_key"`
	SecretAccessKeyFile string `json:"secret_access_key_file"`
	SecretPrefix        string `json:"secret_prefix"`
	SecretPrefixEnable  bool   `json:"secret_prefix_enable"`
	Region              string `json:"region"`
}

func NewConfig

func NewConfig() *Config

func (*Config) AddFlags

func (c *Config) AddFlags(fs *pflag.FlagSet)

func (*Config) ReadFiles

func (c *Config) ReadFiles() error

func (*Config) Validate

func (c *Config) Validate(env *environments.Env) error

type Counters

type Counters struct {
	Deletes int64
	Inserts int64
	Updates int64
	Gets    int64
	Misses  int64
}

type TmpVaultService

type TmpVaultService struct {
	// contains filtered or unexported fields
}

func NewTmpVaultService

func NewTmpVaultService() (*TmpVaultService, error)

func (*TmpVaultService) Counters

func (k *TmpVaultService) Counters() Counters

func (*TmpVaultService) DeleteSecretString

func (k *TmpVaultService) DeleteSecretString(name string) error

func (*TmpVaultService) ForEachSecret

func (k *TmpVaultService) ForEachSecret(f func(name string, owningResource string) bool) error

func (*TmpVaultService) GetSecretString

func (k *TmpVaultService) GetSecretString(name string) (string, error)

func (*TmpVaultService) Kind

func (k *TmpVaultService) Kind() string

func (*TmpVaultService) ResetCounters

func (k *TmpVaultService) ResetCounters()

func (*TmpVaultService) SetSecretString

func (k *TmpVaultService) SetSecretString(name string, value string, owningResource string) error

type VaultService

type VaultService interface {
	SetSecretString(name string, value string, owningResource string) error
	GetSecretString(name string) (string, error)
	DeleteSecretString(name string) error
	ForEachSecret(f func(name string, owningResource string) bool) error
	Kind() string
}

func NewVaultService

func NewVaultService(vaultConfig *Config) (VaultService, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL