Documentation ¶
Index ¶
- Variables
- type Buffer
- type Collection
- func (dbc *Collection) Child(key string) *Collection
- func (dbc *Collection) Copy(srckey, dstkey string) error
- func (dbc *Collection) GetChilds() ([]*Collection, error)
- func (dbc *Collection) Index(key string) *Index
- func (dbc *Collection) InitAES128(secret string) error
- func (dbc *Collection) InitAES256(secret string) error
- func (dbc *Collection) IsExist() bool
- func (dbc *Collection) KeyPath(key string) string
- func (dbc *Collection) ListChilds() ([]string, error)
- func (dbc *Collection) ListIndexes() ([]string, error)
- func (dbc *Collection) Move(srckey, dstkey string) error
- func (dbc *Collection) Purge(key string) error
- func (dbc *Collection) Query() *Query
- func (dbc *Collection) String() string
- type FileEngine
- func (dbe *FileEngine) Cancel()
- func (dbe *FileEngine) FileExist(fpath string) bool
- func (dbe *FileEngine) PurgeFile(fpath string) error
- func (dbe *FileEngine) ReadFile(fpath string) ([]byte, error)
- func (dbe *FileEngine) TouchFile(fpath string) error
- func (dbe *FileEngine) UpdateOptions(opts Options)
- func (dbe *FileEngine) WriteFile(fpath string, data []byte) error
- type Index
- func (indx *Index) Check(key string) bool
- func (indx *Index) Clear(key string) error
- func (indx *Index) ClearAll(key string) error
- func (indx *Index) List() ([]string, error)
- func (indx *Index) ListIndexes() ([]string, error)
- func (indx *Index) Mark(key string) error
- func (indx *Index) Purge() error
- type Options
- type Query
- func (dbq *Query) Delete(key string) error
- func (dbq *Query) Get(key string) ([]byte, error)
- func (dbq *Query) GetBuffer(key string) (Buffer, error)
- func (dbq *Query) GetBufferSlice(key string) ([]Buffer, error)
- func (dbq *Query) GetSecure(key string) ([]byte, error)
- func (dbq *Query) GetSecureBuffer(key string) (Buffer, error)
- func (dbq *Query) GetSecureBufferSlice(key string) ([]Buffer, error)
- func (dbq *Query) IsExist(key string) bool
- func (dbq *Query) Keys() ([]string, error)
- func (dbq *Query) Set(key string, value []byte) error
- func (dbq *Query) SetBuffer(key string, value Buffer) error
- func (dbq *Query) SetBufferSlice(key string, value []Buffer) error
- func (dbq *Query) SetSecure(key string, value []byte) error
- func (dbq *Query) SetSecureBuffer(key string, value Buffer) error
- func (dbq *Query) SetSecureBufferSlice(key string, value []Buffer) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrError = errors.New("") ErrTimeout = fmt.Errorf("%wtimeout", ErrError) ErrBreak = fmt.Errorf("%woperation break", ErrError) ErrRead = fmt.Errorf("%wread failed", ErrError) ErrWrite = fmt.Errorf("%wwrite failed", ErrError) ErrNotExist = fmt.Errorf("%wfile does not exist", ErrError) ErrLocked = fmt.Errorf("%wfile locked", ErrError) ErrNoSecurity = fmt.Errorf("%wsecurity not configured", ErrError) ErrInvalidKey = fmt.Errorf("%winvalid key size", ErrError) ErrEncrypt = fmt.Errorf("%wencryption failed", ErrError) ErrDecrypt = fmt.Errorf("%wdecryption failed", ErrError) )
Functions ¶
This section is empty.
Types ¶
type Collection ¶ added in v0.1.1
type Collection struct {
// contains filtered or unexported fields
}
func NewCollection ¶ added in v0.1.1
func NewCollection(path string) (*Collection, error)
func (*Collection) Child ¶ added in v0.1.1
func (dbc *Collection) Child(key string) *Collection
create child collection relative to parent collection
func (*Collection) Copy ¶ added in v0.1.1
func (dbc *Collection) Copy(srckey, dstkey string) error
func (*Collection) GetChilds ¶ added in v0.1.1
func (dbc *Collection) GetChilds() ([]*Collection, error)
func (*Collection) Index ¶ added in v0.3.1
func (dbc *Collection) Index(key string) *Index
func (*Collection) InitAES128 ¶ added in v0.1.1
func (dbc *Collection) InitAES128(secret string) error
func (*Collection) InitAES256 ¶ added in v0.1.1
func (dbc *Collection) InitAES256(secret string) error
func (*Collection) IsExist ¶ added in v0.1.1
func (dbc *Collection) IsExist() bool
func (*Collection) KeyPath ¶ added in v0.1.1
func (dbc *Collection) KeyPath(key string) string
convert relative file or collection key to absolute path
func (*Collection) ListChilds ¶ added in v0.1.1
func (dbc *Collection) ListChilds() ([]string, error)
func (*Collection) ListIndexes ¶ added in v0.3.1
func (dbc *Collection) ListIndexes() ([]string, error)
func (*Collection) Move ¶ added in v0.1.1
func (dbc *Collection) Move(srckey, dstkey string) error
func (*Collection) Purge ¶ added in v0.1.1
func (dbc *Collection) Purge(key string) error
func (*Collection) Query ¶ added in v0.1.1
func (dbc *Collection) Query() *Query
func (*Collection) String ¶ added in v0.1.1
func (dbc *Collection) String() string
type FileEngine ¶
type FileEngine struct { // timeout for operations like read/write OpTimeout float64 // polling interval for blocked operations OpPolling float64 // permission for new dir creation DirPerm uint32 // permission for new file creation FilePerm uint32 // contains filtered or unexported fields }
func (*FileEngine) FileExist ¶
func (dbe *FileEngine) FileExist(fpath string) bool
check if file exists and is regular file
func (*FileEngine) ReadFile ¶
func (dbe *FileEngine) ReadFile(fpath string) ([]byte, error)
read file content with shared locking
func (*FileEngine) TouchFile ¶ added in v0.3.1
func (dbe *FileEngine) TouchFile(fpath string) error
create file if not exist
func (*FileEngine) UpdateOptions ¶
func (dbe *FileEngine) UpdateOptions(opts Options)
update file engine options
type Index ¶ added in v0.3.1
type Index struct {
// contains filtered or unexported fields
}
func (*Index) ListIndexes ¶ added in v0.3.1
type Query ¶ added in v0.1.1
type Query struct { *FileEngine // contains filtered or unexported fields }
func (*Query) GetBufferSlice ¶ added in v0.1.1
func (*Query) GetSecureBuffer ¶ added in v0.1.1
func (*Query) GetSecureBufferSlice ¶ added in v0.1.1
func (*Query) SetBufferSlice ¶ added in v0.1.1
func (*Query) SetSecureBuffer ¶ added in v0.1.1
Click to show internal directories.
Click to hide internal directories.