plain

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2018 License: MIT Imports: 8 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

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, ciphertext []byte) ([]byte, error)

Decrypt read the file from disk unaltered

func (*Mocker) EmailFromKey

func (m *Mocker) EmailFromKey(context.Context, string) string

EmailFromKey returns nothing

func (*Mocker) Encrypt

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

Encrypt writes the input to disk unaltered

func (*Mocker) ExportPublicKey

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

ExportPublicKey does nothing

func (*Mocker) Ext

func (m *Mocker) Ext() string

Ext returns gpg

func (*Mocker) FindPrivateKeys

func (m *Mocker) FindPrivateKeys(ctx context.Context, keys ...string) ([]string, error)

FindPrivateKeys does nothing

func (*Mocker) FindPublicKeys

func (m *Mocker) FindPublicKeys(ctx context.Context, keys ...string) ([]string, error)

FindPublicKeys does nothing

func (*Mocker) Fingerprint

func (m *Mocker) Fingerprint(ctx context.Context, id string) string

Fingerprint returns the full-length native fingerprint

func (*Mocker) FormatKey

func (m *Mocker) FormatKey(ctx context.Context, id string) string

FormatKey returns the id

func (*Mocker) IDFile

func (m *Mocker) IDFile() string

IDFile returns .gpg-id

func (*Mocker) ImportPublicKey

func (m *Mocker) ImportPublicKey(context.Context, []byte) error

ImportPublicKey does nothing

func (*Mocker) Initialized

func (m *Mocker) Initialized(context.Context) error

Initialized returns nil

func (*Mocker) ListPrivateKeyIDs

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

ListPrivateKeyIDs does nothing

func (*Mocker) ListPublicKeyIDs

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

ListPublicKeyIDs does nothing

func (*Mocker) Name

func (m *Mocker) Name() string

Name returns plain

func (*Mocker) NameFromKey

func (m *Mocker) NameFromKey(context.Context, string) string

NameFromKey returns nothing

func (*Mocker) ReadNamesFromKey

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

ReadNamesFromKey does nothing

func (*Mocker) RecipientIDs

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

RecipientIDs 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

Jump to

Keyboard shortcuts

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