driver

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: May 23, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package driver defines the interface for secret management service implementations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SecretConfig

type SecretConfig struct {
	Name        string
	Description string
	Tags        map[string]string
}

SecretConfig describes a secret to create.

type SecretInfo

type SecretInfo struct {
	ID          string
	Name        string
	ResourceID  string
	Description string
	CreatedAt   string
	UpdatedAt   string
	Tags        map[string]string
}

SecretInfo describes a secret.

type SecretVersion

type SecretVersion struct {
	VersionID string
	Value     []byte
	CreatedAt string
	Current   bool
}

SecretVersion represents a specific version of a secret value.

type Secrets

type Secrets interface {
	CreateSecret(ctx context.Context, config SecretConfig, value []byte) (*SecretInfo, error)
	DeleteSecret(ctx context.Context, name string) error
	GetSecret(ctx context.Context, name string) (*SecretInfo, error)
	ListSecrets(ctx context.Context) ([]SecretInfo, error)

	PutSecretValue(ctx context.Context, name string, value []byte) (*SecretVersion, error)
	GetSecretValue(ctx context.Context, name string, versionID string) (*SecretVersion, error)
	ListSecretVersions(ctx context.Context, name string) ([]SecretVersion, error)
}

Secrets is the interface that secret management provider implementations must satisfy.

Jump to

Keyboard shortcuts

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