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") // 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 ¶ added in v0.2.0
type Option func(opts *Options)
Option defines the functional option pattern.
func WithVaultMetatadata ¶ added in v0.2.0
WithVaultMetatadata enable/disable the custom metadata storage strategy (requires Vault >=1.9).
type Options ¶ added in v0.2.0
type Options struct {
// contains filtered or unexported fields
}
Options defiens the default option value.
type SecretData ¶ added in v0.1.10
type SecretData map[string]interface{}
SecretData is a secret body
type SecretLister ¶
SecretLister repesents secret key listing feature contract.
type SecretMetadata ¶ added in v0.1.10
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.