Documentation ¶
Index ¶
- Variables
- type VaultAuthMethod
- type VaultSecretStorage
- func (v *VaultSecretStorage) Delete(ctx context.Context, id secretstorage.SecretID) error
- func (v *VaultSecretStorage) Get(ctx context.Context, id secretstorage.SecretID) ([]byte, error)
- func (v *VaultSecretStorage) Initialize(ctx context.Context) error
- func (v *VaultSecretStorage) Store(ctx context.Context, id secretstorage.SecretID, bytes []byte) error
- type VaultStorageConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ( VaultError = errors.New("error in Vault") UnexpectedDataError = errors.New("unexpected data") )
View Source
var VaultUnknownAuthMethodError = errors.New("unknown Vault authentication method")
Functions ¶
This section is empty.
Types ¶
type VaultAuthMethod ¶
type VaultAuthMethod string
const ( VaultAuthMethodKubernetes VaultAuthMethod = "kubernetes" VaultAuthMethodApprole VaultAuthMethod = "approle" )
type VaultSecretStorage ¶
type VaultSecretStorage struct { // Config holds the configuration of the storage. After the Initialize method is called, no changes // to this configuration object are reflected even if Initialize is called again. Config *VaultStorageConfig // contains filtered or unexported fields }
func CreateTestVaultSecretStorage ¶
func CreateTestVaultSecretStorage(t vtesting.T) (*vault.TestCluster, *VaultSecretStorage)
func CreateTestVaultSecretStorageWithAuthAndMetrics ¶
func CreateTestVaultSecretStorageWithAuthAndMetrics(t vtesting.T, metricsRegistry *prometheus.Registry) (*vault.TestCluster, *VaultSecretStorage, string, string)
func (*VaultSecretStorage) Delete ¶
func (v *VaultSecretStorage) Delete(ctx context.Context, id secretstorage.SecretID) error
func (*VaultSecretStorage) Get ¶
func (v *VaultSecretStorage) Get(ctx context.Context, id secretstorage.SecretID) ([]byte, error)
func (*VaultSecretStorage) Initialize ¶
func (v *VaultSecretStorage) Initialize(ctx context.Context) error
func (*VaultSecretStorage) Store ¶
func (v *VaultSecretStorage) Store(ctx context.Context, id secretstorage.SecretID, bytes []byte) error
type VaultStorageConfig ¶
type VaultStorageConfig struct { Host string `validate:"required,https_only"` AuthType VaultAuthMethod Insecure bool Role string ServiceAccountTokenFilePath string RoleIdFilePath string SecretIdFilePath string MetricsRegisterer prometheus.Registerer DataPathPrefix string }
Click to show internal directories.
Click to hide internal directories.