secret

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// KMSConnection is the connection to the key management service
	// that's used to encrypt and decrypt secrets.
	KMSConnection string
)

Functions

func KeeperFromConnection

func KeeperFromConnection(ctx context.Context, connectionString string) (*secrets.Keeper, error)

Types

type Ciphertext

type Ciphertext []byte

func Encrypt

func Encrypt(ctx context.Context, sensitive Sensitive) (Ciphertext, error)

func ParseCiphertext

func ParseCiphertext(s string) (Ciphertext, error)

func (Ciphertext) MarshalJSON

func (t Ciphertext) MarshalJSON() ([]byte, error)

func (Ciphertext) MarshalText

func (t Ciphertext) MarshalText() ([]byte, error)

func (Ciphertext) String

func (t Ciphertext) String() string

type Sensitive

type Sensitive []byte

func Decrypt

func Decrypt(ctx context.Context, ciphertext Ciphertext) (Sensitive, error)

func (*Sensitive) Clear

func (t *Sensitive) Clear()

func (Sensitive) MarshalJSON

func (t Sensitive) MarshalJSON() ([]byte, error)

func (Sensitive) MarshalText

func (t Sensitive) MarshalText() ([]byte, error)

func (Sensitive) PlainText

func (t Sensitive) PlainText() string

func (Sensitive) String

func (t Sensitive) String() string

Jump to

Keyboard shortcuts

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