Help us shape the future of Go! Take the 2026 Go Developer Survey

secret

package
v0.1.61 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 14 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 InvalidateKeeper added in v0.1.29

func InvalidateKeeper()

InvalidateKeeper drops the cached keeper so a KMSConnection change takes effect immediately instead of after the cache TTL.

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