Documentation ¶
Overview ¶
Key Value Storage with Revision
Index ¶
- Variables
- type Interface
- type MemStore
- type RediStore
- type S
- func (s S) Read(key string, rev *int64, v interface{}) (err error)
- func (s S) ReadModify(key string, v interface{}, mutate func(v interface{}) bool) (err error)
- func (s S) SetContain(key string, values ...string) (contain bool, err error)
- func (s S) SetDelete(key string, values ...string) error
- func (s S) SetInsert(key string, values ...string) error
- func (s S) SetSlice(key, value string, before, after int) (slice []string, err error)
- func (s S) Write(key string, rev int64, v interface{}) (err error)
- type SQLStore
- type ScopedStore
- type SortedString
- func (s SortedString) Contain(v string) bool
- func (s *SortedString) Delete(val string) bool
- func (s *SortedString) Insert(val string) bool
- func (s SortedString) Len() int
- func (s SortedString) Less(i, j int) bool
- func (s SortedString) Search(v string) int
- func (s SortedString) Slice(v string, before int, after int) SortedString
- func (s SortedString) Sort()
- func (s SortedString) Swap(i, j int)
- func (s *SortedString) Unique()
- type Value
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrRevNotMatch = errors.New("Revision Not Match")
)
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface { // Get the Post of given Key. Get(key string) (Value, error) // Set the Post to the given Key. // Note that the revision of the new post must be increased by 1 from the old post. // If the length of the Content of the Post is zero, the post is considered safe to be deleted. Put(key string, p Value) error }
func NewScopedStore ¶
type MemStore ¶
type MemStore struct {
// contains filtered or unexported fields
}
func NewMemStore ¶
func NewMemStore() *MemStore
type S ¶
type S struct {
Interface
}
S is Structured rkv. It's a layer on top of Interface for data structures. Currently the only
func (S) ReadModify ¶
func (S) SetContain ¶
SetContain return true if all values exists in the set.
type SQLStore ¶
type SQLStore struct {
// contains filtered or unexported fields
}
func NewSQLStore ¶
type ScopedStore ¶
type SortedString ¶
type SortedString []string
SortedString is a list of sorted strings, mainly for indexing purpose. Note that the order of strings are defined by (len, content).
func SortedIntersect ¶
func SortedIntersect(sss ...SortedString) (ret SortedString)
func SortedUnion ¶
func SortedUnion(sss ...SortedString) (ret SortedString)
func (SortedString) Contain ¶
func (s SortedString) Contain(v string) bool
func (*SortedString) Delete ¶
func (s *SortedString) Delete(val string) bool
func (*SortedString) Insert ¶
func (s *SortedString) Insert(val string) bool
func (SortedString) Len ¶
func (s SortedString) Len() int
func (SortedString) Less ¶
func (s SortedString) Less(i, j int) bool
func (SortedString) Search ¶
func (s SortedString) Search(v string) int
func (SortedString) Slice ¶
func (s SortedString) Slice(v string, before int, after int) SortedString
func (SortedString) Sort ¶
func (s SortedString) Sort()
func (SortedString) Swap ¶
func (s SortedString) Swap(i, j int)
func (*SortedString) Unique ¶
func (s *SortedString) Unique()
Click to show internal directories.
Click to hide internal directories.