Documentation
¶
Overview ¶
Package memory implements an in-memory backend for testing and development.
Index ¶
- type Backend
- func (b *Backend) Delete(ctx context.Context, path string) error
- func (b *Backend) DeleteIf(ctx context.Context, path string, expected backend.Version) error
- func (b *Backend) GetMetadata(ctx context.Context, path string) (backend.Metadata, error)
- func (b *Backend) List(ctx context.Context, dirPath string) (backend.ListIter, error)
- func (b *Backend) Read(ctx context.Context, path string) (backend.ReadReply, error)
- func (b *Backend) ReadIfModified(ctx context.Context, path string, version int64) (backend.ReadReply, error)
- func (b *Backend) SetTagsIf(ctx context.Context, path string, expected backend.Version, t backend.Tags) (backend.Metadata, error)
- func (b *Backend) Write(ctx context.Context, path string, value []byte, t backend.Tags) (backend.Metadata, error)
- func (b *Backend) WriteIf(ctx context.Context, path string, value []byte, expected backend.Version, ...) (backend.Metadata, error)
- func (b *Backend) WriteIfNotExists(ctx context.Context, path string, value []byte, t backend.Tags) (backend.Metadata, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend is an in-memory implementation of backend.Backend.
func (*Backend) GetMetadata ¶
GetMetadata implements backend.Backend.
func (*Backend) ReadIfModified ¶
func (b *Backend) ReadIfModified( ctx context.Context, path string, version int64, ) (backend.ReadReply, error)
ReadIfModified implements backend.Backend.
func (*Backend) SetTagsIf ¶
func (b *Backend) SetTagsIf( ctx context.Context, path string, expected backend.Version, t backend.Tags, ) (backend.Metadata, error)
SetTagsIf implements backend.Backend.
Click to show internal directories.
Click to hide internal directories.