Documentation
¶
Index ¶
- func GobDecode(b []byte, e interface{}) error
- func GobEncode(e interface{}) ([]byte, error)
- type BaseDataObj
- type Dao
- func (dao *Dao[T]) Bucket(tx *bolt.Tx) *bolt.Bucket
- func (dao *Dao[T]) CreateBucketIfNotExists(tx *bolt.Tx) (*bolt.Bucket, error)
- func (dao *Dao[T]) Decode(data []byte) (*T, error)
- func (dao *Dao[T]) Delete(tx *bolt.Tx, key []byte) error
- func (dao *Dao[T]) Encode(value *T) ([]byte, error)
- func (dao *Dao[T]) First(tx *bolt.Tx) (*T, error)
- func (dao *Dao[T]) Get(tx *bolt.Tx, key []byte) (*T, error)
- func (dao *Dao[T]) GetBy(tx *bolt.Tx, idxName string, idxValue interface{}) ([]*T, error)
- func (dao *Dao[T]) Last(tx *bolt.Tx) (*T, error)
- func (dao *Dao[T]) Next(tx *bolt.Tx) (*T, error)
- func (dao *Dao[T]) Prev(tx *bolt.Tx) (*T, error)
- func (dao *Dao[T]) Put(tx *bolt.Tx, obj *T) error
- type DataDescriptor
- type IndexDescription
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseDataObj ¶
type BaseDataObj struct {
Id uint64
}
func (BaseDataObj) Key ¶
func (bdo BaseDataObj) Key() []byte
func (BaseDataObj) Name ¶
func (bdo BaseDataObj) Name() []byte
type Dao ¶
type Dao[T DataDescriptor] struct { BucketName []byte // contains filtered or unexported fields }
func NewDao ¶
func NewDao[T DataDescriptor]() *Dao[T]
func (*Dao[T]) CreateBucketIfNotExists ¶
type DataDescriptor ¶
type IndexDescription ¶
type IndexDescription struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.