secrets

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

README

Secrets Management

TODO

Documentation

Index

Constants

View Source
const (
	CredType   = "CredType"
	TextSecret = "TextSecret"
)
View Source
const (
	LocalStoreProvider = "localStore"
)

Variables

This section is empty.

Functions

func AesDecrypt added in v0.0.9

func AesDecrypt(encrypted, key []byte) (message []byte, err error)

func AesDecryptStr added in v0.0.9

func AesDecryptStr(encrypted, key string) (message string, err error)

func AesEncrypt added in v0.0.9

func AesEncrypt(key, message []byte) (encrypted []byte, err error)

func AesEncryptStr added in v0.0.9

func AesEncryptStr(key, message string) (encrypted string, err error)

Types

type Credential added in v0.0.9

type Credential struct {
	Value       []byte
	LastUpdated time.Time
	Version     string
	MetaData    map[string]interface{}
}

func (*Credential) Str added in v0.0.9

func (c *Credential) Str() (s string)

Str function gets the Credential.Value field as string

func (*Credential) Type added in v0.0.9

func (c *Credential) Type() (s string)

Type Returns the type of the credential

type Manager added in v0.0.9

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

func GetManager added in v0.0.9

func GetManager() *Manager

func (*Manager) Register added in v0.0.9

func (m *Manager) Register(store Store)

func (*Manager) Store added in v0.0.9

func (m *Manager) Store(name string) (store Store)

type Store added in v0.0.9

type Store interface {
	Get(key string, ctx context.Context) (*Credential, error)
	Write(key string, credential *Credential, ctx context.Context) error
	Provider() string
}

func NewLocalStore added in v0.0.9

func NewLocalStore(storeFile, masterKey string) (s Store, err error)

Jump to

Keyboard shortcuts

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