Documentation ¶
Index ¶
Constants ¶
View Source
const ( // CustomMetadataKeyLimit defines the key count limit for custom metadata. CustomMetadataKeyLimit = 64 // CustomMetadataKeySizeLimit defines the key size limit in bytes for // custom metadata. CustomMetadataKeySizeLimit = 128 // CustomMetadataValueSizeLimit defines the value size limit in bytes for // custom metadata. CustomMetadataValueSizeLimit = 512 )
Variables ¶
View Source
var ( // ErrPathNotFound is raised when given secret path doesn't exists. ErrPathNotFound = errors.New("path not found") // ErrSecretNotReadable is raised when trying to read a secret and hit a // permission error. ErrSecretNotReadable = errors.New("secret not readable") // ErrNoData is raised when gievn secret path doesn't contains data. ErrNoData = errors.New("no data") // ErrCustomMetadataDisabled is raised when trying to write a custom // metadata with globally disabled feature. ErrCustomMetadataDisabled = errors.New("custom metadata is disabled") )
View Source
var VaultMetadataDataKey = "www.vaultproject.io/kv/metadata"
VaultMetadataDataKey represents the secret data key used to store metadata.
Functions ¶
Types ¶
type Option ¶
type Option func(opts *Options)
Option defines the functional option pattern.
func WithContext ¶
WithContext adds given context to all queries.
func WithVaultMetatadata ¶
WithVaultMetatadata enable/disable the custom metadata storage strategy (requires Vault >=1.9).
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
Options defiens the default option value.
type SecretLister ¶
SecretLister repesents secret key listing feature contract.
type SecretMetadata ¶
type SecretMetadata map[string]interface{}
SecretMetadata is secret data attached metadata.
type SecretReader ¶
type SecretReader interface { Read(ctx context.Context, path string) (SecretData, SecretMetadata, error) ReadVersion(ctx context.Context, path string, version uint32) (SecretData, SecretMetadata, error) }
SecretReader represents secret reader feature contract.
type SecretWriter ¶
type SecretWriter interface { Write(ctx context.Context, path string, secrets SecretData) error WriteWithMeta(ctx context.Context, path string, secrets SecretData, meta SecretMetadata) error }
SecretWriter represents secret writer feature contract.
type Service ¶
type Service interface { SecretLister SecretReader SecretWriter }
Service declares vault service contract.
Click to show internal directories.
Click to hide internal directories.