Documentation
¶
Index ¶
- Constants
- Variables
- type BadgerDBStore
- func (s *BadgerDBStore) Close() error
- func (s *BadgerDBStore) Count(prefix string) (uint64, error)
- func (s *BadgerDBStore) CountJsonPath(prefix, jsonPath string, iter ValueIterator) error
- func (s *BadgerDBStore) Delete(key string) error
- func (s *BadgerDBStore) DeletePrefix(prefix string) error
- func (s *BadgerDBStore) LoadJSON(key string, value interface{}) error
- func (s *BadgerDBStore) LoadKeys(prefix string) ([]string, error)
- func (s *BadgerDBStore) LoadValues(prefix string, iter ValueIterator) error
- func (s *BadgerDBStore) QueryJsonPath(prefix, jsonPath string, iter ValueIterator) error
- func (s *BadgerDBStore) SaveJSON(key string, jsonValue interface{}) error
- func (s *BadgerDBStore) SortedAscN(prefix, jsonPath string, limit int64, iter ValueIterator) error
- func (s *BadgerDBStore) SortedDescN(prefix, jsonPath string, limit int64, iter ValueIterator) error
- type PgxStore
- func (s *PgxStore) Close() error
- func (s *PgxStore) Count(prefix string) (uint64, error)
- func (s *PgxStore) CountJsonPath(prefix, jsonPath string, iter ValueIterator) error
- func (s *PgxStore) Delete(key string) error
- func (s *PgxStore) DeletePrefix(prefix string) error
- func (s *PgxStore) LoadJSON(key string, value interface{}) error
- func (s *PgxStore) LoadKeys(prefix string) ([]string, error)
- func (s *PgxStore) LoadValues(prefix string, iter ValueIterator) error
- func (s *PgxStore) QueryJsonPath(prefix, jsonPath string, iter ValueIterator) error
- func (s *PgxStore) SaveJSON(key string, jsonValue interface{}) error
- func (s *PgxStore) SortedAscN(prefix, jsonPath string, limit int64, iter ValueIterator) error
- func (s *PgxStore) SortedDescN(prefix, jsonPath string, limit int64, iter ValueIterator) error
- type PgxStoreTest
- type Store
- type ValueIterator
Constants ¶
View Source
const ( PUBLIC_SCHEMA = "public" TABLE_NAME = "orchestrator" )
Variables ¶
View Source
var ( // ErrKeyNotFound returns an error if key is not found in store ErrKeyNotFound = errors.New("key not found in store") )
Functions ¶
This section is empty.
Types ¶
type BadgerDBStore ¶
type BadgerDBStore struct {
// contains filtered or unexported fields
}
BadgerDBStore store for db
func (*BadgerDBStore) Close ¶
func (s *BadgerDBStore) Close() error
Close db, by closing all the open handles
func (*BadgerDBStore) CountJsonPath ¶
func (s *BadgerDBStore) CountJsonPath(prefix, jsonPath string, iter ValueIterator) error
func (*BadgerDBStore) Delete ¶
func (s *BadgerDBStore) Delete(key string) error
Delete deletes key from db
func (*BadgerDBStore) DeletePrefix ¶
func (s *BadgerDBStore) DeletePrefix(prefix string) error
Delete deletes prefix from db
func (*BadgerDBStore) LoadJSON ¶
func (s *BadgerDBStore) LoadJSON(key string, value interface{}) error
LoadJSON loads key, value and unmarshals json value
func (*BadgerDBStore) LoadKeys ¶
func (s *BadgerDBStore) LoadKeys(prefix string) ([]string, error)
LoadAll loads all keys with a prefix from db
func (*BadgerDBStore) LoadValues ¶
func (s *BadgerDBStore) LoadValues(prefix string, iter ValueIterator) error
func (*BadgerDBStore) QueryJsonPath ¶
func (s *BadgerDBStore) QueryJsonPath(prefix, jsonPath string, iter ValueIterator) error
func (*BadgerDBStore) SaveJSON ¶
func (s *BadgerDBStore) SaveJSON(key string, jsonValue interface{}) error
Save db with key json value pair
func (*BadgerDBStore) SortedAscN ¶
func (s *BadgerDBStore) SortedAscN(prefix, jsonPath string, limit int64, iter ValueIterator) error
func (*BadgerDBStore) SortedDescN ¶
func (s *BadgerDBStore) SortedDescN(prefix, jsonPath string, limit int64, iter ValueIterator) error
type PgxStore ¶
type PgxStore struct {
// contains filtered or unexported fields
}
PgxStore stores key value pairs in postgres db
func (*PgxStore) CountJsonPath ¶
func (s *PgxStore) CountJsonPath(prefix, jsonPath string, iter ValueIterator) error
func (*PgxStore) DeletePrefix ¶
Delete deletes prefix pattern from store
func (*PgxStore) LoadValues ¶
func (s *PgxStore) LoadValues(prefix string, iter ValueIterator) error
func (*PgxStore) QueryJsonPath ¶
func (s *PgxStore) QueryJsonPath(prefix, jsonPath string, iter ValueIterator) error
func (*PgxStore) SortedAscN ¶
func (s *PgxStore) SortedAscN(prefix, jsonPath string, limit int64, iter ValueIterator) error
func (*PgxStore) SortedDescN ¶
func (s *PgxStore) SortedDescN(prefix, jsonPath string, limit int64, iter ValueIterator) error
type PgxStoreTest ¶
type PgxStoreTest struct {
PgxStore
}
type Store ¶
type Store interface {
SaveJSON(key string, value interface{}) error // Save key json value to store, returns error on failure
Delete(key string) error // Delete key from store, returns error on failure
LoadJSON(key string, value interface{}) error // Load key from store, unmarshals json value, returns error on failure
LoadKeys(prefix string) ([]string, error) // Load all keys from store, returns error on failure
LoadValues(prefix string, iter ValueIterator) error // Loads all keys and values from store, return error on failure
Count(prefix string) (uint64, error) // returns count of specified prefix, or error on failure
CountJsonPath(prefix, jsonPath string, iter ValueIterator) error // returns grouped count of jsonpath, returns error on failure
QueryJsonPath(prefix, jsonPath string, iter ValueIterator) error // returns key and value of jsonpath, returns error on failure
SortedAscN(prefix string, jsonPath string, limit int64, iter ValueIterator) error // returns N key values, sorted ascending order by jsonpath, returns error on failure
SortedDescN(prefix string, jsonPath string, limit int64, iter ValueIterator) error // returns N key values, sorted descending order by jsonpath, returns error on failure
DeletePrefix(prefix string) error // Delete prefix pattern from store, returns error on failure
Close() error
}
Store provides a way for defining multiple stores
func NewBadgerDBStore ¶
NewBadgerDBStore creates a new badger store
func NewDefaultPgxStore ¶
func NewPgxStore ¶
NewPgxStore creates a new postgres store
func NewPgxStoreWithTable ¶
NewPgxStore creates a new postgres store
type ValueIterator ¶
Click to show internal directories.
Click to hide internal directories.