Documentation
¶
Overview ¶
Package dummystore implements a store that saves all the segments in memory.
It can be used for testing, but it's unoptimized and not designed for production.
Index ¶
- Constants
- type Config
- type DummyStore
- func (a *DummyStore) DeleteSegment(linkHash *types.Bytes32) (*cs.Segment, error)
- func (a *DummyStore) FindSegments(filter *store.Filter) (cs.SegmentSlice, error)
- func (a *DummyStore) GetInfo() (interface{}, error)
- func (a *DummyStore) GetMapIDs(pagination *store.Pagination) ([]string, error)
- func (a *DummyStore) GetSegment(linkHash *types.Bytes32) (*cs.Segment, error)
- func (a *DummyStore) SaveSegment(segment *cs.Segment) error
- type Info
Constants ¶
const ( // Name is the name set in the store's information. Name = "dummy" // Description is the description set in the store's information. Description = "Stratumn Dummy Store" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// A version string that will be set in the store's information.
Version string
// A git commit hash that will be set in the store's information.
Commit string
}
Config contains configuration options for the store.
type DummyStore ¶
type DummyStore struct {
// contains filtered or unexported fields
}
DummyStore is the type that implements github.com/stratumn/go/store.Adapter.
func (*DummyStore) DeleteSegment ¶
DeleteSegment implements github.com/stratumn/go/store.Adapter.DeleteSegment.
func (*DummyStore) FindSegments ¶
func (a *DummyStore) FindSegments(filter *store.Filter) (cs.SegmentSlice, error)
FindSegments implements github.com/stratumn/go/store.Adapter.FindSegments.
func (*DummyStore) GetInfo ¶
func (a *DummyStore) GetInfo() (interface{}, error)
GetInfo implements github.com/stratumn/go/store.Adapter.GetInfo.
func (*DummyStore) GetMapIDs ¶
func (a *DummyStore) GetMapIDs(pagination *store.Pagination) ([]string, error)
GetMapIDs implements github.com/stratumn/go/store.Adapter.GetMapIDs.
func (*DummyStore) GetSegment ¶
GetSegment implements github.com/stratumn/go/store.Adapter.GetSegment.
func (*DummyStore) SaveSegment ¶
func (a *DummyStore) SaveSegment(segment *cs.Segment) error
SaveSegment implements github.com/stratumn/go/store.Adapter.SaveSegment.