Version: v1.6.11 Latest Latest

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

Go to latest
Published: Feb 20, 2018 License: MIT Imports: 10 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type Mocker

type Mocker struct{}

Mocker is a no-op GPG mock

func New

func New() *Mocker

New creates a new GPG mock

func (*Mocker) Binary

func (m *Mocker) Binary() string

Binary always returns 'gpg'

func (*Mocker) CreatePrivateKey

func (m *Mocker) CreatePrivateKey(ctx context.Context) error

CreatePrivateKey is not implemented

func (*Mocker) CreatePrivateKeyBatch

func (m *Mocker) CreatePrivateKeyBatch(ctx context.Context, name, email, pw string) error

CreatePrivateKeyBatch is not implemented

func (*Mocker) Decrypt

func (m *Mocker) Decrypt(ctx context.Context, path string) ([]byte, error)

Decrypt read the file from disk unaltered

func (*Mocker) Encrypt

func (m *Mocker) Encrypt(ctx context.Context, path string, content []byte, recipients []string) error

Encrypt writes the input to disk unaltered

func (*Mocker) ExportPublicKey

func (m *Mocker) ExportPublicKey(context.Context, string, string) error

ExportPublicKey does nothing

func (*Mocker) FindPrivateKeys

func (m *Mocker) FindPrivateKeys(context.Context, ...string) (gpg.KeyList, error)

FindPrivateKeys does nothing

func (*Mocker) FindPublicKeys

func (m *Mocker) FindPublicKeys(context.Context, ...string) (gpg.KeyList, error)

FindPublicKeys does nothing

func (*Mocker) GetRecipients

func (m *Mocker) GetRecipients(context.Context, string) ([]string, error)

GetRecipients does nothing

func (*Mocker) ImportPublicKey

func (m *Mocker) ImportPublicKey(context.Context, string) error

ImportPublicKey does nothing

func (*Mocker) ListPrivateKeys

func (m *Mocker) ListPrivateKeys(context.Context) (gpg.KeyList, error)

ListPrivateKeys does nothing

func (*Mocker) ListPublicKeys

func (m *Mocker) ListPublicKeys(context.Context) (gpg.KeyList, error)

ListPublicKeys does nothing

func (*Mocker) Sign

func (m *Mocker) Sign(ctx context.Context, in string, sigf string) error

Sign writes the hashsum to the given file

func (*Mocker) Verify

func (m *Mocker) Verify(ctx context.Context, sigf string, in string) error

Verify does a pseudo-verification

func (*Mocker) Version

func (m *Mocker) Version(context.Context) semver.Version

Version returns dummy version info

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL