secretstore

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2023 License: Apache-2.0, BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrSecretStoreNotFound indicates that the named secret store
	// doesn't exist.
	ErrSecretStoreNotFound = errors.New("secret store not found")

	// ErrInvalidSecretStoreName indicates that the given secret store
	// name is invalid.
	ErrInvalidSecretStoreName = errors.New("invalid secret store name")

	// ErrSecretNotFound indicates that the named secret doesn't exist
	// within this store.
	ErrSecretNotFound = errors.New("secret not found")

	// ErrInvalidSecretName indicates that the given secret name is
	// invalid.
	ErrInvalidSecretName = errors.New("invalid secret name")

	// ErrUnexpected indicates than an unexpected error occurred.
	ErrUnexpected = errors.New("unexpected error")
)

Functions

This section is empty.

Types

type Secret

type Secret struct {
	// contains filtered or unexported fields
}

Secret represents a secret in a store

func (*Secret) Plaintext

func (s *Secret) Plaintext() ([]byte, error)

Plaintext decrypts and returns the secret value as a byte slice.

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store represents a Fastly Secret Store

func Open

func Open(name string) (*Store, error)

Open returns a handle to the named secret store, if it exists. It will return ErrSecretStoreNotFound if it doesn't exist.

func (*Store) Get

func (st *Store) Get(name string) (*Secret, error)

Get returns a handle to the named secret within the store, if it exists. It will return ErrSecretNotFound if it doesn't exist.

Jump to

Keyboard shortcuts

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