secrets

package
v0.0.0-...-b0bff92 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Version describes the secret format.
	Version = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateParams

type CreateParams struct {
	ProviderLabel  string
	Version        int
	Type           secrets.SecretType
	Owner          string
	Path           string
	RotateInterval time.Duration
	Status         secrets.SecretStatus
	Description    string
	Tags           map[string]string
	Params         map[string]interface{}
	Data           map[string]string
}

CreateParams are used to create a secret.

type Filter

type Filter struct {
}

Filter is used when querying secrets.

type ProviderConfig

type ProviderConfig map[string]interface{}

ProviderConfig is used when constructing a secrets provider. TODO(wallyworld) - use a schema

type SecretsService

type SecretsService interface {
	// CreateSecret creates a new secret and returns a URL for accessing the secret value.
	CreateSecret(ctx context.Context, URL *secrets.URL, p CreateParams) (*secrets.SecretMetadata, error)

	// UpdateSecret updates a given secret with a new secret value.
	UpdateSecret(ctx context.Context, URL *secrets.URL, p UpdateParams) (*secrets.SecretMetadata, error)

	// DeleteSecret deletes the specified secret.
	DeleteSecret(ctx context.Context, URL *secrets.URL) error

	// GetSecret returns the metadata for the specified secret.
	GetSecret(ctx context.Context, URL *secrets.URL) (*secrets.SecretMetadata, error)

	// GetSecretValue returns the value of the specified secret.
	GetSecretValue(ctx context.Context, URL *secrets.URL) (secrets.SecretValue, error)

	// ListSecrets returns secret metadata using the specified filter.
	ListSecrets(ctx context.Context, filter Filter) ([]*secrets.SecretMetadata, error)
}

SecretsService instances provide a backend for storing secrets values.

type UpdateParams

type UpdateParams struct {
	RotateInterval *time.Duration
	Status         *secrets.SecretStatus
	Description    *string
	Tags           *map[string]string
	Params         map[string]interface{}
	Data           map[string]string
}

UpdateParams are used to update a secret.

Directories

Path Synopsis
juju/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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