apimock

package
v1.15.13 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotImplemented = fmt.Errorf("not yet implemented")

ErrNotImplemented is returned when a method is not implemented.

Functions

This section is empty.

Types

type MockAPI

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

MockAPI is a gopass API mock.

func New

func New() *MockAPI

New creates a new gopass API mock.

func (*MockAPI) Close

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

Close does nothing.

func (*MockAPI) Get

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

Get does nothing.

func (*MockAPI) List

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

List does nothing.

func (*MockAPI) Remove

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

Remove does nothing.

func (*MockAPI) RemoveAll

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

RemoveAll does nothing.

func (*MockAPI) Rename

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

Rename does nothing.

func (*MockAPI) Revisions

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

Revisions does nothing.

func (*MockAPI) Set

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

Set does nothing.

func (*MockAPI) String

func (a *MockAPI) String() string

String returns mockapi.

func (*MockAPI) Sync

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

Sync does nothing.

type Secret

type Secret struct {
	Buf []byte
}

Secret is a mock secret for writing.

func (*Secret) Bytes

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

Bytes returns the underlying bytes.

Jump to

Keyboard shortcuts

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