Documentation
¶
Index ¶
- type Config
- type GPG
- func (g *GPG) CreatePrivateKey(ctx context.Context) error
- func (g *GPG) CreatePrivateKeyBatch(ctx context.Context, name, email, passphrase string) error
- func (g *GPG) Decrypt(ctx context.Context, path string) ([]byte, error)
- func (g *GPG) Encrypt(ctx context.Context, path string, content []byte, recipients []string) error
- func (g *GPG) ExportPublicKey(ctx context.Context, id, filename string) error
- func (g *GPG) FindPrivateKeys(ctx context.Context, search ...string) (gpg.KeyList, error)
- func (g *GPG) FindPublicKeys(ctx context.Context, search ...string) (gpg.KeyList, error)
- func (g *GPG) GetRecipients(ctx context.Context, file string) ([]string, error)
- func (g *GPG) ImportPublicKey(ctx context.Context, filename string) error
- func (g *GPG) ListPrivateKeys(ctx context.Context) (gpg.KeyList, error)
- func (g *GPG) ListPublicKeys(ctx context.Context) (gpg.KeyList, error)
- func (g *GPG) Version(ctx context.Context) semver.Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GPG ¶
type GPG struct {
// contains filtered or unexported fields
}
GPG is a gpg wrapper
func (*GPG) CreatePrivateKey ¶ added in v1.5.0
CreatePrivateKey will create a new GPG key in interactive mode
func (*GPG) CreatePrivateKeyBatch ¶ added in v1.5.0
CreatePrivateKeyBatch will create a new GPG keypair in batch mode
func (*GPG) Encrypt ¶
Encrypt will encrypt the given content for the recipients. If alwaysTrust is true the trust-model will be set to always as to avoid (annoying) "unusable public key" errors when encrypting.
func (*GPG) ExportPublicKey ¶
ExportPublicKey will export the named public key to the location given
func (*GPG) FindPrivateKeys ¶
FindPrivateKeys searches for the given private keys
func (*GPG) FindPublicKeys ¶
FindPublicKeys searches for the given public keys
func (*GPG) GetRecipients ¶
GetRecipients returns a list of recipient IDs for a given file
func (*GPG) ImportPublicKey ¶
ImportPublicKey will import a key from the given location
func (*GPG) ListPrivateKeys ¶
ListPrivateKeys returns a parsed list of GPG secret keys
func (*GPG) ListPublicKeys ¶
ListPublicKeys returns a parsed list of GPG public keys