package apimock
import "github.com/justwatchcom/gopass/pkg/gopass/apimock"
- type MockAPI
- func New() *MockAPI
- func (a *MockAPI) Close(ctx context.Context) error
- func (a *MockAPI) Get(ctx context.Context, name, _ string) (gopass.Secret, error)
- func (a *MockAPI) List(ctx context.Context) ([]string, error)
- func (a *MockAPI) Remove(ctx context.Context, name string) error
- func (a *MockAPI) RemoveAll(ctx context.Context, prefix string) error
- func (a *MockAPI) Rename(ctx context.Context, src, dest string) error
- func (a *MockAPI) Revisions(ctx context.Context, name string) ([]string, error)
- func (a *MockAPI) Set(ctx context.Context, name string, sec gopass.Byter) error
- func (a *MockAPI) String() string
- func (a *MockAPI) Sync(ctx context.Context) error
- type Secret
mock.go
❖type MockAPI struct {
// contains filtered or unexported fields
}
MockAPI is a gopass API mock
New creates a new gopass API mock
Close does nothing
func (*MockAPI) Get ¶ Uses
Get does nothing
List does nothing
Remove does nothing
RemoveAll does nothing
Rename does nothing
Revisions does nothing
func (*MockAPI) Set ¶ Uses
Set does nothing
String returns mockapi
Sync does nothing
❖type Secret struct {
Buf []byte
}
Secret is a mock secret for writing
Bytes returns the underlying bytes