secrets

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(path string) ([]byte, bool, error)

func Encrypt

func Encrypt(inputPath, outputPath string) error

func GeneratePGPSopsYaml added in v0.0.17

func GeneratePGPSopsYaml(keyPair KeyPair) error

func ImportPGPKeypair added in v0.0.17

func ImportPGPKeypair(keyPair KeyPair) error

func RemovePGPKeypairs added in v0.0.17

func RemovePGPKeypairs(fingerprints []string) error

func ViewCmd

func ViewCmd(filename string) *exec.Cmd

Types

type CreationRule added in v0.0.17

type CreationRule struct {
	PGP string `yaml:"pgp"`
}

type ErrNoSecretsFile

type ErrNoSecretsFile struct {
	Path string
}

func (ErrNoSecretsFile) Error

func (err ErrNoSecretsFile) Error() string

type ErrSecretsAlreadyEncrypted

type ErrSecretsAlreadyEncrypted struct {
	Path string
}

func (ErrSecretsAlreadyEncrypted) Error

func (err ErrSecretsAlreadyEncrypted) Error() string

type ErrSecretsFailure

type ErrSecretsFailure struct {
	Path string
	Err  error
}

func (ErrSecretsFailure) Error

func (err ErrSecretsFailure) Error() string

type KeyPair added in v0.0.17

type KeyPair struct {
	Public      string `json:"public_key"`
	Private     string `json:"private_key"`
	Fingerprint string `json:"fingerprint"`
}

func Init added in v0.0.17

func Init(email, name, desc string) (KeyPair, error)

type SopsYaml added in v0.0.17

type SopsYaml struct {
	CreationRules []CreationRule `yaml:"creation_rules"`
}

func LoadPGPSopsYaml added in v0.0.17

func LoadPGPSopsYaml() (SopsYaml, error)

Jump to

Keyboard shortcuts

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