Documentation ¶
Overview ¶
Package plain implements a plaintext backend
Index ¶
- Constants
- type Mocker
- func (m *Mocker) Binary() string
- func (m *Mocker) Decrypt(ctx context.Context, ciphertext []byte) ([]byte, error)
- func (m *Mocker) Encrypt(ctx context.Context, content []byte, recipients []string) ([]byte, error)
- func (m *Mocker) ExportPublicKey(context.Context, string) ([]byte, error)
- func (m *Mocker) Ext() string
- func (m *Mocker) FindIdentities(ctx context.Context, keys ...string) ([]string, error)
- func (m *Mocker) FindRecipients(ctx context.Context, keys ...string) ([]string, error)
- func (m *Mocker) Fingerprint(ctx context.Context, id string) string
- func (m *Mocker) FormatKey(ctx context.Context, id, tpl string) string
- func (m *Mocker) GenerateIdentity(ctx context.Context, name, email, pw string) error
- func (m *Mocker) IDFile() string
- func (m *Mocker) ImportPublicKey(context.Context, []byte) error
- func (m *Mocker) Initialized(context.Context) error
- func (m *Mocker) ListIdentities(context.Context) ([]string, error)
- func (m *Mocker) ListRecipients(context.Context) ([]string, error)
- func (m *Mocker) Name() string
- func (m *Mocker) ReadNamesFromKey(ctx context.Context, buf []byte) ([]string, error)
- func (m *Mocker) RecipientIDs(context.Context, []byte) ([]string, error)
- func (m *Mocker) Version(context.Context) semver.Version
Constants ¶
View Source
const ( // Name is the name of this backend Name = "plain" // Ext is the file extension used by this backend Ext = "txt" // IDFile is the name of the recipients file used by this backend IDFile = ".plain-id" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mocker ¶
type Mocker struct{}
Mocker is a no-op GPG mock
func (*Mocker) ExportPublicKey ¶
ExportPublicKey does nothing
func (*Mocker) FindIdentities ¶
FindIdentities does nothing
func (*Mocker) FindRecipients ¶
FindRecipients does nothing
func (*Mocker) Fingerprint ¶
Fingerprint returns thd id
func (*Mocker) GenerateIdentity ¶
GenerateIdentity is not implemented
func (*Mocker) ImportPublicKey ¶
ImportPublicKey does nothing
func (*Mocker) Initialized ¶
Initialized returns nil
func (*Mocker) ListIdentities ¶
ListIdentities does nothing
func (*Mocker) ListRecipients ¶
ListRecipients does nothing
func (*Mocker) ReadNamesFromKey ¶
ReadNamesFromKey does nothing
func (*Mocker) RecipientIDs ¶
RecipientIDs does nothing
Click to show internal directories.
Click to hide internal directories.