Documentation ¶
Index ¶
- Constants
- Variables
- func GetSessionOpts(opts []Opts) *sessionOpts
- func PageSize(input int32) int32
- type BoltDB
- func (s *BoltDB) BucketExists(path []string, opts []Opts) bool
- func (s *BoltDB) Close()
- func (s *BoltDB) CreateBucket(path []string, opts []Opts) error
- func (s *BoltDB) DeleteBucket(path []string, opts []Opts) error
- func (s *BoltDB) DeleteKey(path []string, key string, opts []Opts) error
- func (s *BoltDB) KeyExists(path []string, key string, opts []Opts) bool
- func (s *BoltDB) List(path []string, pageToken string, pageSize int32, opts []Opts) ([]string, [][]byte, string, int32, error)
- func (s *BoltDB) ListBuckets(path []string, pageToken string, pageSize int32, opts []Opts) ([]string, string, int32, error)
- func (s *BoltDB) ListKeys(path []string, pageToken string, pageSize int32, opts []Opts) ([]string, string, int32, error)
- func (s *BoltDB) NextSeq(path []string, opts []Opts) (uint64, error)
- func (s *BoltDB) Open() error
- func (s *BoltDB) Read(path []string, key string, opts []Opts) ([]byte, error)
- func (s *BoltDB) ReadScan(path []string, prefix string, opts []Opts) ([]string, [][]byte, error)
- func (s *BoltDB) ReadTxOpts() (Opts, func() error, error)
- func (s *BoltDB) Write(path []string, key string, value []byte, opts []Opts) error
- func (s *BoltDB) WriteTxOpts() (Opts, func(err error) error, error)
- type Config
- type Opts
- type PaginationOpts
- type PaginationResult
Constants ¶
View Source
const ( // DefaultPageSize default pagination page size. DefaultPageSize = int32(100) // MinPageSize minimum pagination page size. MinPageSize = int32(1) // MaxPageSize maximum pagination page size. MaxPageSize = int32(100) // ServerSetPageSize . ServerSetPageSize = int32(0) // TotalsOnlyResultSet . TotalsOnlyResultSet = int32(-1) )
Variables ¶
View Source
var ( ErrPathNotFound = errors.New("path not found") ErrKeyNotFound = errors.New("key not found") ErrKeyExists = errors.New("key already exists") )
Error codes returned by failures to parse an expression.
Functions ¶
func GetSessionOpts ¶
func GetSessionOpts(opts []Opts) *sessionOpts
Types ¶
type BoltDB ¶
type BoltDB struct {
// contains filtered or unexported fields
}
BoltDB based key-value store.
func (*BoltDB) BucketExists ¶
BucketExists checks if a bucket path exists.
func (*BoltDB) CreateBucket ¶
CreateBucket creates the bucket.
func (*BoltDB) DeleteBucket ¶
DeleteBucket delete bucket at the tail of the given path. The call does not return an error when the bucket does not exist.
func (*BoltDB) DeleteKey ¶
DeleteKey deletes key at given path when present. The call does not return an error when key does not exist.
func (*BoltDB) List ¶
func (s *BoltDB) List(path []string, pageToken string, pageSize int32, opts []Opts) ([]string, [][]byte, string, int32, error)
List returns paged collection of key and value arrays.
func (*BoltDB) ListBuckets ¶
func (s *BoltDB) ListBuckets(path []string, pageToken string, pageSize int32, opts []Opts) ([]string, string, int32, error)
ListBuckets returns pages collection of buckets.
func (*BoltDB) ListKeys ¶
func (s *BoltDB) ListKeys(path []string, pageToken string, pageSize int32, opts []Opts) ([]string, string, int32, error)
ListKeys returns paged collection of keys.
func (*BoltDB) ReadScan ¶
ReadScan returns list of key-value pairs which match the scan prefix filter.
type PaginationOpts ¶
type PaginationResult ¶
Click to show internal directories.
Click to hide internal directories.