Documentation ¶
Index ¶
- Variables
- type KVStore
- func (s *KVStore) Close()
- func (s *KVStore) CreateTableIfNotExist(table string) error
- func (s *KVStore) DeleteKey(table, key string) error
- func (s *KVStore) DeleteTable(table string) error
- func (s *KVStore) Find(table, k string) ([]string, error)
- func (s *KVStore) Get(table, k string) ([]byte, error)
- func (s *KVStore) HasTable(table string) bool
- func (s *KVStore) Open() error
- func (s *KVStore) Put(table, k string, v []byte) error
- func (s *KVStore) RemoveDB() error
- func (s *KVStore) RemoveSmallValues(table, value string) error
- type KeyError
- type TableError
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = fx.Options( fx.Provide(NewKVStore), )
Module Module
Functions ¶
This section is empty.
Types ¶
type KVStore ¶
type KVStore struct {
// contains filtered or unexported fields
}
KVStore provides k/v Insert/Get/Update/Delete interface
func (*KVStore) CreateTableIfNotExist ¶
CreateTableIfNotExist creates a table if it doesn't exist nothing will happen if the table has existed Thread-Safe
func (*KVStore) DeleteTable ¶
DeleteTable deletes a table Returns an error if the table cannot be found or if the key represents a non-table value. Thread-Safe
func (*KVStore) RemoveSmallValues ¶
RemoveSmallValues remove the smaller key/value store comparing with specified value
type KeyError ¶
type KeyError struct {
// contains filtered or unexported fields
}
KeyError will be thrown when queried key not found
type TableError ¶
type TableError struct {
// contains filtered or unexported fields
}
TableError will be thrown when query table not found
Click to show internal directories.
Click to hide internal directories.