Documentation ¶
Overview ¶
Package store provides a registry and interface to interact with a store repository against model entities.
Index ¶
- Constants
- Variables
- func Add(key string, x interface{}, logger func(string, string)) (y interface{}, err error)
- func Append(key string, id string, path string, x interface{}, logger func(string, string)) (y interface{}, err error)
- func Get(key string, id string, joins []string) (x interface{}, err error)
- func GetByFilter(key string, filter map[string]interface{}, inFilter map[string]interface{}, ...) (x interface{}, err error)
- func GetByPath(key string, id string, joins []string, path string) (x interface{}, err error)
- func GetByPathBatch(key string, id string, joins []string, paths []string) (x interface{}, err error)
- func GetCollection(key string) (x collectionStore, ok bool)
- func GetCollectionHistory(key string) (x collectionHistoryStore, ok bool)
- func GetCountByFilter(key string, filter map[string]interface{}, inFilter map[string]interface{}, ...) (x interface{}, err error)
- func Publish(key string, id string, path string, logger func(string, string))
- func RegisterHistoryStore(x interface{})
- func RegisterStore(x interface{})
- func Remove(key string, id string) (err error)
- func Set(key string, id string, path string, x interface{}, logger func(string, string)) (err error)
- func Splice(key string, id string, path string, x interface{}, logger func(string, string)) (y interface{}, err error)
Constants ¶
const ( WebSocketStoreKey = "WebSocket" PathAdd = "Add" PathRemove = "Remove" )
Variables ¶
var OnChange func(key string, id string, path string, x interface{}, err error)
OnChange provides inserts, updates, and deletes to the store key.
var OnChangeRecord func(key string, id string, x interface{})
var OnRecordUpdate []string
OnRecordUpdate allows an application to publish all changes of a record
var Version string
Functions ¶
func Append ¶
func Append(key string, id string, path string, x interface{}, logger func(string, string)) (y interface{}, err error)
Append adds to an array field.
func GetByFilter ¶
func GetByFilter(key string, filter map[string]interface{}, inFilter map[string]interface{}, excludeFilter map[string]interface{}, joins []string) (x interface{}, err error)
GetByFilter gets a collection entity by filter.
func GetByPathBatch ¶
func GetByPathBatch(key string, id string, joins []string, paths []string) (x interface{}, err error)
GetByPathBatch gets a collection entity-property values by id & path.
func GetCollection ¶ added in v1.1.4
GetCollection will return the collection by key string.
func GetCollectionHistory ¶ added in v1.1.4
GetCollection will return the collection by key string.
func GetCountByFilter ¶
func GetCountByFilter(key string, filter map[string]interface{}, inFilter map[string]interface{}, excludeFilter map[string]interface{}, joins []string) (x interface{}, err error)
GetByFilter gets a collection entity by filter.
func RegisterHistoryStore ¶ added in v1.1.4
func RegisterHistoryStore(x interface{})
RegisterStore will register a new store to the store registry.
func RegisterStore ¶
func RegisterStore(x interface{})
RegisterStore will register a new store to the store registry.
Types ¶
This section is empty.