Documentation
¶
Overview ¶
Package inmem implements an in memory storage backend for tests.
Index ¶
- type InMem
- func (m *InMem) Add(ctx context.Context, args ...string) error
- func (m *InMem) AddRemote(ctx context.Context, remote, url string) error
- func (m *InMem) Cmd(ctx context.Context, name string, args ...string) error
- func (m *InMem) Commit(ctx context.Context, msg string) error
- func (m *InMem) Compact(context.Context) error
- func (m *InMem) Delete(ctx context.Context, name string) error
- func (m *InMem) Exists(ctx context.Context, name string) bool
- func (m *InMem) Fsck(ctx context.Context) error
- func (m *InMem) Get(ctx context.Context, name string) ([]byte, error)
- func (m *InMem) GetRevision(context.Context, string, string) ([]byte, error)
- func (m *InMem) Init(context.Context, string, string) error
- func (m *InMem) InitConfig(context.Context, string, string) error
- func (m *InMem) IsDir(ctx context.Context, name string) bool
- func (m *InMem) List(ctx context.Context, prefix string) ([]string, error)
- func (m *InMem) Name() string
- func (m *InMem) Path() string
- func (m *InMem) Prune(ctx context.Context, prefix string) error
- func (m *InMem) Pull(ctx context.Context, origin, branch string) error
- func (m *InMem) Push(ctx context.Context, origin, branch string) error
- func (m *InMem) RemoveRemote(ctx context.Context, remote string) error
- func (m *InMem) Revisions(context.Context, string) ([]backend.Revision, error)
- func (m *InMem) Set(ctx context.Context, name string, value []byte) error
- func (m *InMem) Status(context.Context) ([]byte, error)
- func (m *InMem) String() string
- func (m *InMem) Version(context.Context) semver.Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InMem ¶
type InMem struct {
sync.Mutex
// contains filtered or unexported fields
}
InMem is a in-memory store
func (*InMem) AddRemote ¶
func (m *InMem) AddRemote(ctx context.Context, remote, url string) error
AddRemote does nothing
func (*InMem) Cmd ¶
func (m *InMem) Cmd(ctx context.Context, name string, args ...string) error
Cmd does nothing
func (*InMem) Commit ¶
func (m *InMem) Commit(ctx context.Context, msg string) error
Commit does nothing
func (*InMem) Delete ¶
func (m *InMem) Delete(ctx context.Context, name string) error
Delete removes a value
func (*InMem) Exists ¶
func (m *InMem) Exists(ctx context.Context, name string) bool
Exists checks is a value exists
func (*InMem) Get ¶
func (m *InMem) Get(ctx context.Context, name string) ([]byte, error)
Get retrieves a value
func (*InMem) GetRevision ¶
func (m *InMem) GetRevision(context.Context, string, string) ([]byte, error)
GetRevision is not implemented
func (*InMem) InitConfig ¶
func (m *InMem) InitConfig(context.Context, string, string) error
InitConfig does nothing
func (*InMem) IsDir ¶
func (m *InMem) IsDir(ctx context.Context, name string) bool
IsDir returns true if the entry is a directory
func (*InMem) List ¶
func (m *InMem) List(ctx context.Context, prefix string) ([]string, error)
List shows all values
func (*InMem) Prune ¶
func (m *InMem) Prune(ctx context.Context, prefix string) error
Prune removes a directory
func (*InMem) Pull ¶
func (m *InMem) Pull(ctx context.Context, origin, branch string) error
Pull does nothing
func (*InMem) Push ¶
func (m *InMem) Push(ctx context.Context, origin, branch string) error
Push does nothing
func (*InMem) RemoveRemote ¶
func (m *InMem) RemoveRemote(ctx context.Context, remote string) error
RemoveRemote does nothing
func (*InMem) Revisions ¶
func (m *InMem) Revisions(context.Context, string) ([]backend.Revision, error)
Revisions is not implemented
func (*InMem) Set ¶
func (m *InMem) Set(ctx context.Context, name string, value []byte) error
Set writes a value
Click to show internal directories.
Click to hide internal directories.