mock

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2017 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 added in v1.5.1

func (m *Mocker) Binary() string

Binary always returns 'gpg'

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 added in v1.6.0

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

Sign writes the hashsum to the given file

func (*Mocker) Verify added in v1.6.0

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

Jump to

Keyboard shortcuts

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