model

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNeedUnlock = errors.New("no age identity in the keyring can decrypt this file")

Functions

func ReadCiphertext

func ReadCiphertext(root string, sf SecretFile) ([]byte, error)

Types

type Entry

type Entry struct {
	Key   string
	Value string
}

type Keyring

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

func NewKeyring

func NewKeyring() *Keyring

func (*Keyring) DecryptFile

func (k *Keyring) DecryptFile(ciphertext []byte) ([]Entry, error)

func (*Keyring) Empty

func (k *Keyring) Empty() bool

func (*Keyring) Unlock

func (k *Keyring) Unlock(secret string) error

type SecretFile

type SecretFile struct {
	Abs string
	Rel string
}

func DiscoverSecretFiles

func DiscoverSecretFiles(root string) ([]SecretFile, error)

Jump to

Keyboard shortcuts

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