gopass: github.com/justwatchcom/gopass/pkg/gopass/apimock Index | Files

package apimock

import "github.com/justwatchcom/gopass/pkg/gopass/apimock"

Index

Package Files

mock.go

type MockAPI Uses

type MockAPI struct {
    // contains filtered or unexported fields
}

MockAPI is a gopass API mock

func New Uses

func New() *MockAPI

New creates a new gopass API mock

func (*MockAPI) Close Uses

func (a *MockAPI) Close(ctx context.Context) error

Close does nothing

func (*MockAPI) Get Uses

func (a *MockAPI) Get(ctx context.Context, name, _ string) (gopass.Secret, error)

Get does nothing

func (*MockAPI) List Uses

func (a *MockAPI) List(ctx context.Context) ([]string, error)

List does nothing

func (*MockAPI) Remove Uses

func (a *MockAPI) Remove(ctx context.Context, name string) error

Remove does nothing

func (*MockAPI) RemoveAll Uses

func (a *MockAPI) RemoveAll(ctx context.Context, prefix string) error

RemoveAll does nothing

func (*MockAPI) Rename Uses

func (a *MockAPI) Rename(ctx context.Context, src, dest string) error

Rename does nothing

func (*MockAPI) Revisions Uses

func (a *MockAPI) Revisions(ctx context.Context, name string) ([]string, error)

Revisions does nothing

func (*MockAPI) Set Uses

func (a *MockAPI) Set(ctx context.Context, name string, sec gopass.Byter) error

Set does nothing

func (*MockAPI) String Uses

func (a *MockAPI) String() string

String returns mockapi

func (*MockAPI) Sync Uses

func (a *MockAPI) Sync(ctx context.Context) error

Sync does nothing

type Secret Uses

type Secret struct {
    Buf []byte
}

Secret is a mock secret for writing

func (*Secret) Bytes Uses

func (m *Secret) Bytes() []byte

Bytes returns the underlying bytes

Package apimock imports 4 packages (graph). Updated 2020-07-21. Refresh now. Tools for package owners.