Documentation ¶
Overview ¶
Package datastore is a simple package for tracking of a single instance of application data.
Index ¶
- type Finder
- type Manager
- func (m *Manager) All(to interface{}, options ...func(*index.Options)) error
- func (m *Manager) AllByIndex(fieldName string, to interface{}, options ...func(*index.Options)) error
- func (m *Manager) Count(data interface{}) (int, error)
- func (m *Manager) Find(fieldName string, value interface{}, to interface{}, ...) error
- func (m *Manager) GetPath() string
- func (m *Manager) One(fieldName string, value interface{}, to interface{}) error
- func (m *Manager) Prefix(fieldName string, prefix string, to interface{}, ...) error
- func (m *Manager) Range(fieldName string, min interface{}, max interface{}, to interface{}, ...) error
- func (m *Manager) Save(data interface{}) error
- func (m *Manager) Select(matchers ...q.Matcher) storm.Query
- func (m *Manager) Stop()
- type WriteCloser
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
Manager main object for data store.
func Open ¶ added in v1.1.0
Open returns a datastore Manager. Error if datastore file does not exist.
func (*Manager) All ¶ added in v1.0.0
All gets all the records of a bucket. If there are no records it returns no error and the 'to' parameter is set to an empty slice.
func (*Manager) AllByIndex ¶ added in v1.0.0
func (m *Manager) AllByIndex(fieldName string, to interface{}, options ...func(*index.Options)) error
AllByIndex gets all the records of a bucket that are indexed in the specified index.
func (*Manager) Find ¶ added in v1.0.0
func (m *Manager) Find(fieldName string, value interface{}, to interface{}, options ...func(*index.Options)) error
Find returns one or more records by the specified index.
func (*Manager) Prefix ¶ added in v1.0.0
func (m *Manager) Prefix(fieldName string, prefix string, to interface{}, options ...func(*index.Options)) error
Prefix returns one or more records whose given field starts with the specified prefix.
func (*Manager) Range ¶ added in v1.0.0
func (m *Manager) Range(fieldName string, min interface{}, max interface{}, to interface{}, options ...func(*index.Options)) error
Range returns one or more records by the specified index within the specified range.
type WriteCloser ¶ added in v1.1.0
type WriteCloser interface { Save(data interface{}) error Stop() }
A WriteCloser can write to or close a datastore.