Documentation
¶
Index ¶
- Constants
- type Object
- type Option
- func SetCompress(c bool) Option
- func SetCompressThreshold(size int) Option
- func SetGORMClient(db *gorm.DB) Option
- func SetGORMTableHashSize(size int64) Option
- func SetGORMTablePrefix(prefix string) Option
- func SetMongoDBClient(client *mongo.Client) Option
- func SetMongoDBTablePrefix(prefix string) Option
- func SetRedisClient(rdb *redis.Client) Option
- type Options
- type Serializer
- type StorageBackend
- type Store
Constants ¶
View Source
const ( DefaultTablePrefix = "objects_" DefaultTableHashSize = 16 DefaultCompressThreshold = 4096 )
Default values
View Source
const (
DefaultNamespace = "default"
)
Defaults
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Object ¶
type Object struct {
// contains filtered or unexported fields
}
Object : ...
type Option ¶
type Option func(o *Options)
Option : ...
func SetCompressThreshold ¶
SetCompressThreshold set size threshold of compress
func SetGORMTableHashSize ¶
SetGORMTableHashSize set table hash size of gorm
func SetGORMTablePrefix ¶
SetGORMTablePrefix set table prefix of gorm
func SetMongoDBClient ¶
SetMongoDBClient set mongodb connector
func SetMongoDBTablePrefix ¶
SetMongoDBTablePrefix set table prefix of mongodb
type Options ¶
type Options struct { Backend StorageBackend // Serialization Serializer Serializer // contains filtered or unexported fields }
Options : storage options
type Serializer ¶
type Serializer int8
Serializer : Serialize type hinting
const ( JSONSerialization Serializer = 0 MsgPackSerialization Serializer = 19 )
Serializations
type StorageBackend ¶
type StorageBackend int8
StorageBackend : Enum of backend
const ( GORMBackend StorageBackend = 0 MongoDBBackend StorageBackend = 1 )
Backends
Click to show internal directories.
Click to hide internal directories.