Documentation
¶
Index ¶
- Constants
- func StartDataDogProfiler(service string, apiKey string, environment string, duration time.Duration) (def func())
- func StartDataDogTracer(rate float64, opts ...tracer.StartOption) (def func())
- type APM
- type Alter
- type CachedQuery
- type ClickHouse
- func (c *ClickHouse) Begin()
- func (c *ClickHouse) Commit()
- func (c *ClickHouse) Exec(query string, args ...interface{}) sql.Result
- func (c *ClickHouse) Prepare(query string) (preparedStatement *PreparedStatement, deferF func())
- func (c *ClickHouse) Queryx(query string, args ...interface{}) (rows *sqlx.Rows, deferF func())
- func (c *ClickHouse) Rollback()
- type ClickHouseConfig
- type DB
- func (db *DB) Begin()
- func (db *DB) Commit()
- func (db *DB) Exec(query string, args ...interface{}) ExecResult
- func (db *DB) GetDatabaseName() string
- func (db *DB) GetPoolCode() string
- func (db *DB) Query(query string, args ...interface{}) (rows Rows, deferF func())
- func (db *DB) QueryRow(query *Where, toFill ...interface{}) (found bool)
- func (db *DB) Rollback()
- type DBConfig
- type DataDog
- type DirtyData
- type DirtyHandler
- type DirtyQueueValue
- type DirtyReceiver
- type DuplicatedKeyError
- type Elastic
- type ElasticConfig
- type ElasticIndexAlter
- type ElasticIndexDefinition
- type Engine
- func (e *Engine) AddQueryLogger(handler logApex.Handler, level logApex.Level, source ...QueryLoggerSource)
- func (e *Engine) CachedSearch(entities interface{}, indexName string, pager *Pager, arguments ...interface{}) (totalRows int)
- func (e *Engine) CachedSearchIDs(entity Entity, indexName string, pager *Pager, arguments ...interface{}) (totalRows int, ids []uint64)
- func (e *Engine) CachedSearchOne(entity Entity, indexName string, arguments ...interface{}) (found bool)
- func (e *Engine) CachedSearchOneWithReferences(entity Entity, indexName string, arguments []interface{}, references []string) (found bool)
- func (e *Engine) CachedSearchWithReferences(entities interface{}, indexName string, pager *Pager, arguments []interface{}, ...) (totalRows int)
- func (e *Engine) ClearByIDs(entity Entity, ids ...uint64)
- func (e *Engine) ClearTrackedEntities()
- func (e *Engine) DataDog() DataDog
- func (e *Engine) EnableDebug()
- func (e *Engine) EnableLogger(level logApex.Level, handlers ...logApex.Handler)
- func (e *Engine) EnableQueryDebug(source ...QueryLoggerSource)
- func (e *Engine) Flush()
- func (e *Engine) FlushInTransaction()
- func (e *Engine) FlushInTransactionWithCheck() error
- func (e *Engine) FlushInTransactionWithLock(lockerPool string, lockName string, ttl time.Duration, ...)
- func (e *Engine) FlushLazy()
- func (e *Engine) FlushWithCheck() error
- func (e *Engine) FlushWithFullCheck() error
- func (e *Engine) FlushWithLock(lockerPool string, lockName string, ttl time.Duration, ...)
- func (e *Engine) ForceMarkToDelete(entity ...Entity)
- func (e *Engine) GetAlters() (alters []Alter)
- func (e *Engine) GetClickHouse(code ...string) *ClickHouse
- func (e *Engine) GetDirtyBind(entity Entity) (bool, map[string]interface{})
- func (e *Engine) GetElastic(code ...string) *Elastic
- func (e *Engine) GetElasticIndexAlters() (alters []ElasticIndexAlter)
- func (e *Engine) GetLocalCache(code ...string) *LocalCache
- func (e *Engine) GetLocker(code ...string) *Locker
- func (e *Engine) GetMysql(code ...string) *DB
- func (e *Engine) GetRabbitMQQueue(queueName string) *RabbitMQQueue
- func (e *Engine) GetRabbitMQRouter(queueName string) *RabbitMQRouter
- func (e *Engine) GetRedis(code ...string) *RedisCache
- func (e *Engine) GetRegistry() ValidatedRegistry
- func (e *Engine) IsDirty(entity Entity) bool
- func (e *Engine) Load(entity Entity, references ...string)
- func (e *Engine) LoadByID(id uint64, entity Entity, references ...string) (found bool)
- func (e *Engine) LoadByIDs(ids []uint64, entities interface{}, references ...string) (missing []uint64)
- func (e *Engine) Loaded(entity Entity) bool
- func (e *Engine) Log() Log
- func (e *Engine) MarkDirty(entity Entity, queueCode string, ids ...uint64)
- func (e *Engine) MarkToDelete(entity ...Entity)
- func (e *Engine) Search(where *Where, pager *Pager, entities interface{}, references ...string)
- func (e *Engine) SearchIDs(where *Where, pager *Pager, entity Entity) []uint64
- func (e *Engine) SearchIDsWithCount(where *Where, pager *Pager, entity Entity) (results []uint64, totalRows int)
- func (e *Engine) SearchOne(where *Where, entity Entity, references ...string) (found bool)
- func (e *Engine) SearchWithCount(where *Where, pager *Pager, entities interface{}, references ...string) (totalRows int)
- func (e *Engine) SetEntityLogMeta(key string, value interface{}, entity ...Entity)
- func (e *Engine) SetLogMetaData(key string, value interface{})
- func (e *Engine) SetOnDuplicateKeyUpdate(update *Where, entity Entity)
- func (e *Engine) Track(entity ...Entity)
- func (e *Engine) TrackAndFlush(entity ...Entity)
- type Entity
- type Enum
- type EnumModel
- type ExecResult
- type ForeignKeyError
- type GetSetProvider
- type HTTPAPM
- type LazyReceiver
- type LocalCache
- func (c *LocalCache) Clear()
- func (c *LocalCache) Get(key string) (value interface{}, ok bool)
- func (c *LocalCache) GetObjectsCount() int
- func (c *LocalCache) GetSet(key string, ttlSeconds int, provider GetSetProvider) interface{}
- func (c *LocalCache) HMget(key string, fields ...string) map[string]interface{}
- func (c *LocalCache) HMset(key string, fields map[string]interface{})
- func (c *LocalCache) MGet(keys ...string) map[string]interface{}
- func (c *LocalCache) MSet(pairs ...interface{})
- func (c *LocalCache) Remove(keys ...string)
- func (c *LocalCache) Set(key string, value interface{})
- type LocalCacheConfig
- type Lock
- type Locker
- type Log
- type LogQueueValue
- type LogReceiver
- type ORM
- type Pager
- type PreparedStatement
- type PubSub
- func (p *PubSub) Close()
- func (p *PubSub) Consume(size int, handler func(items []*redis.Message))
- func (p *PubSub) DisableLoop()
- func (p *PubSub) PUnsubscribe(channels ...string)
- func (p *PubSub) SetHeartBeat(beat func())
- func (p *PubSub) SetMaxLoopDuration(duration time.Duration)
- func (p *PubSub) String() string
- func (p *PubSub) Unsubscribe(channels ...string)
- type QueryLoggerSource
- type RabbitMQConsumer
- type RabbitMQQueue
- type RabbitMQQueueConfig
- type RabbitMQRouter
- type RabbitMQRouterConfig
- type RedisCache
- func (r *RedisCache) Del(keys ...string)
- func (r *RedisCache) FlushDB()
- func (r *RedisCache) Get(key string) (value string, has bool)
- func (r *RedisCache) GetSet(key string, ttlSeconds int, provider GetSetProvider) interface{}
- func (r *RedisCache) HGetAll(key string) map[string]string
- func (r *RedisCache) HMget(key string, fields ...string) map[string]interface{}
- func (r *RedisCache) HMset(key string, fields map[string]interface{})
- func (r *RedisCache) HSet(key string, field string, value interface{})
- func (r *RedisCache) LLen(key string) int64
- func (r *RedisCache) LPush(key string, values ...interface{}) int64
- func (r *RedisCache) LRange(key string, start, stop int64) []string
- func (r *RedisCache) LRem(key string, count int64, value interface{})
- func (r *RedisCache) LSet(key string, index int64, value interface{})
- func (r *RedisCache) Ltrim(key string, start, stop int64)
- func (r *RedisCache) MGet(keys ...string) map[string]interface{}
- func (r *RedisCache) MSet(pairs ...interface{})
- func (r *RedisCache) PSubscribe(channels ...string) *PubSub
- func (r *RedisCache) Publish(channel string, message interface{})
- func (r *RedisCache) RPop(key string) (value string, found bool)
- func (r *RedisCache) RPush(key string, values ...interface{}) int64
- func (r *RedisCache) RateLimit(key string, limit redis_rate.Limit) bool
- func (r *RedisCache) SAdd(key string, members ...interface{}) int64
- func (r *RedisCache) SCard(key string) int64
- func (r *RedisCache) SPop(key string) (string, bool)
- func (r *RedisCache) SPopN(key string, max int64) []string
- func (r *RedisCache) Set(key string, value interface{}, ttlSeconds int)
- func (r *RedisCache) Subscribe(channels ...string) *PubSub
- func (r *RedisCache) ZAdd(key string, members ...*redis.Z) int64
- func (r *RedisCache) ZCard(key string) int64
- func (r *RedisCache) ZCount(key string, min, max string) int64
- func (r *RedisCache) ZRangeWithScores(key string, start, stop int64) []redis.Z
- func (r *RedisCache) ZRevRange(key string, start, stop int64) []string
- func (r *RedisCache) ZRevRangeWithScores(key string, start, stop int64) []redis.Z
- func (r *RedisCache) ZScore(key, member string) float64
- type RedisCacheConfig
- type Registry
- func (r *Registry) RegisterClickHouse(url string, code ...string)
- func (r *Registry) RegisterDirtyQueue(code string, batchSize int)
- func (r *Registry) RegisterElastic(url string, code ...string)
- func (r *Registry) RegisterElasticIndex(index ElasticIndexDefinition, serverPool ...string)
- func (r *Registry) RegisterElasticWithTraceLog(url string, code ...string)
- func (r *Registry) RegisterEntity(entity ...Entity)
- func (r *Registry) RegisterEnumMap(code string, val map[string]string, defaultValue string)
- func (r *Registry) RegisterEnumSlice(code string, val []string)
- func (r *Registry) RegisterEnumStruct(code string, val Enum)
- func (r *Registry) RegisterLocalCache(size int, code ...string)
- func (r *Registry) RegisterLocker(code string, redisCode string)
- func (r *Registry) RegisterMySQLPool(dataSourceName string, code ...string)
- func (r *Registry) RegisterRabbitMQQueue(config *RabbitMQQueueConfig, serverPool ...string)
- func (r *Registry) RegisterRabbitMQRouter(config *RabbitMQRouterConfig, serverPool ...string)
- func (r *Registry) RegisterRabbitMQServer(address string, code ...string)
- func (r *Registry) RegisterRedis(address string, db int, code ...string)
- func (r *Registry) RegisterRedisRing(addresses []string, db int, code ...string)
- func (r *Registry) Validate() (ValidatedRegistry, error)
- type Rows
- type SQLRow
- type SQLRows
- type SearchOptions
- type TableSchema
- type ValidatedRegistry
- type Where
- type WorkSpan
Constants ¶
View Source
const ( QueryLoggerSourceDB = iota QueryLoggerSourceRedis QueryLoggerSourceRabbitMQ QueryLoggerSourceElastic QueryLoggerSourceClickHouse QueryLoggerSourceLocalCache )
Variables ¶
This section is empty.
Functions ¶
func StartDataDogProfiler ¶
func StartDataDogTracer ¶
func StartDataDogTracer(rate float64, opts ...tracer.StartOption) (def func())
Types ¶
type CachedQuery ¶
type CachedQuery struct{}
type ClickHouse ¶
type ClickHouse struct {
// contains filtered or unexported fields
}
func (*ClickHouse) Begin ¶
func (c *ClickHouse) Begin()
func (*ClickHouse) Commit ¶
func (c *ClickHouse) Commit()
func (*ClickHouse) Prepare ¶
func (c *ClickHouse) Prepare(query string) (preparedStatement *PreparedStatement, deferF func())
func (*ClickHouse) Queryx ¶
func (c *ClickHouse) Queryx(query string, args ...interface{}) (rows *sqlx.Rows, deferF func())
func (*ClickHouse) Rollback ¶
func (c *ClickHouse) Rollback()
type ClickHouseConfig ¶
type ClickHouseConfig struct {
// contains filtered or unexported fields
}
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) Exec ¶
func (db *DB) Exec(query string, args ...interface{}) ExecResult
func (*DB) GetDatabaseName ¶
func (*DB) GetPoolCode ¶
type DataDog ¶
type DataDog interface {
StartAPM(service string, environment string)
FinishAPM()
StartHTTPAPM(request *http.Request, service string, environment string) HTTPAPM
EnableORMAPMLog(level apexLog.Level, withAnalytics bool, source ...QueryLoggerSource)
RegisterAPMError(err interface{})
DropAPM()
SetAPMTag(key string, value interface{})
StartWorkSpan(name string) WorkSpan
}
type DirtyHandler ¶
type DirtyHandler func(data []*DirtyData)
type DirtyQueueValue ¶
type DirtyReceiver ¶
type DirtyReceiver struct {
// contains filtered or unexported fields
}
func NewDirtyReceiver ¶
func NewDirtyReceiver(engine *Engine) *DirtyReceiver
func (*DirtyReceiver) Digest ¶
func (r *DirtyReceiver) Digest(code string, handler DirtyHandler)
func (*DirtyReceiver) DisableLoop ¶
func (r *DirtyReceiver) DisableLoop()
func (*DirtyReceiver) Purge ¶
func (r *DirtyReceiver) Purge(code string)
func (*DirtyReceiver) SetHeartBeat ¶
func (r *DirtyReceiver) SetHeartBeat(beat func())
func (*DirtyReceiver) SetMaxLoopDuration ¶
func (r *DirtyReceiver) SetMaxLoopDuration(duration time.Duration)
type DuplicatedKeyError ¶
func (*DuplicatedKeyError) Error ¶
func (err *DuplicatedKeyError) Error() string
type Elastic ¶
type Elastic struct {
// contains filtered or unexported fields
}
func (*Elastic) CreateIndex ¶
func (e *Elastic) CreateIndex(index ElasticIndexDefinition)
func (*Elastic) DropIndex ¶
func (e *Elastic) DropIndex(index ElasticIndexDefinition)
func (*Elastic) Search ¶
func (e *Elastic) Search(index string, query elastic.Query, pager *Pager, options *SearchOptions) *elastic.SearchResult
type ElasticConfig ¶
type ElasticConfig struct {
// contains filtered or unexported fields
}
type ElasticIndexAlter ¶
type ElasticIndexAlter struct {
Index ElasticIndexDefinition
Safe bool
Pool string
NewMapping map[string]interface{}
OldMapping map[string]interface{}
}
type ElasticIndexDefinition ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func (*Engine) AddQueryLogger ¶
func (*Engine) CachedSearch ¶
func (*Engine) CachedSearchIDs ¶
func (*Engine) CachedSearchOne ¶
func (*Engine) CachedSearchOneWithReferences ¶
func (*Engine) CachedSearchWithReferences ¶
func (*Engine) ClearByIDs ¶
func (*Engine) ClearTrackedEntities ¶
func (e *Engine) ClearTrackedEntities()
func (*Engine) EnableDebug ¶
func (e *Engine) EnableDebug()
func (*Engine) EnableLogger ¶
func (*Engine) EnableQueryDebug ¶
func (e *Engine) EnableQueryDebug(source ...QueryLoggerSource)
func (*Engine) FlushInTransaction ¶
func (e *Engine) FlushInTransaction()
func (*Engine) FlushInTransactionWithCheck ¶
func (*Engine) FlushInTransactionWithLock ¶
func (*Engine) FlushWithCheck ¶
func (*Engine) FlushWithFullCheck ¶
func (*Engine) FlushWithLock ¶
func (*Engine) ForceMarkToDelete ¶
func (*Engine) GetClickHouse ¶
func (e *Engine) GetClickHouse(code ...string) *ClickHouse
func (*Engine) GetDirtyBind ¶
func (*Engine) GetElastic ¶
func (*Engine) GetElasticIndexAlters ¶
func (e *Engine) GetElasticIndexAlters() (alters []ElasticIndexAlter)
func (*Engine) GetLocalCache ¶
func (e *Engine) GetLocalCache(code ...string) *LocalCache
func (*Engine) GetRabbitMQQueue ¶
func (e *Engine) GetRabbitMQQueue(queueName string) *RabbitMQQueue
func (*Engine) GetRabbitMQRouter ¶
func (e *Engine) GetRabbitMQRouter(queueName string) *RabbitMQRouter
func (*Engine) GetRedis ¶
func (e *Engine) GetRedis(code ...string) *RedisCache
func (*Engine) GetRegistry ¶
func (e *Engine) GetRegistry() ValidatedRegistry
func (*Engine) MarkToDelete ¶
func (*Engine) SearchIDsWithCount ¶
func (*Engine) SearchWithCount ¶
func (*Engine) SetEntityLogMeta ¶
func (*Engine) SetLogMetaData ¶
func (*Engine) SetOnDuplicateKeyUpdate ¶
func (*Engine) TrackAndFlush ¶
type EnumModel ¶
type EnumModel struct {
// contains filtered or unexported fields
}
func (*EnumModel) GetDefault ¶
func (*EnumModel) GetMapping ¶
type ExecResult ¶
type ForeignKeyError ¶
func (*ForeignKeyError) Error ¶
func (err *ForeignKeyError) Error() string
type GetSetProvider ¶
type GetSetProvider func() interface{}
type LazyReceiver ¶
type LazyReceiver struct {
// contains filtered or unexported fields
}
func NewLazyReceiver ¶
func NewLazyReceiver(engine *Engine) *LazyReceiver
func (*LazyReceiver) Digest ¶
func (r *LazyReceiver) Digest()
func (*LazyReceiver) DisableLoop ¶
func (r *LazyReceiver) DisableLoop()
func (*LazyReceiver) Purge ¶
func (r *LazyReceiver) Purge()
func (*LazyReceiver) SetHeartBeat ¶
func (r *LazyReceiver) SetHeartBeat(beat func())
func (*LazyReceiver) SetMaxLoopDuration ¶
func (r *LazyReceiver) SetMaxLoopDuration(duration time.Duration)
type LocalCache ¶
type LocalCache struct {
// contains filtered or unexported fields
}
func (*LocalCache) Clear ¶
func (c *LocalCache) Clear()
func (*LocalCache) Get ¶
func (c *LocalCache) Get(key string) (value interface{}, ok bool)
func (*LocalCache) GetObjectsCount ¶
func (c *LocalCache) GetObjectsCount() int
func (*LocalCache) GetSet ¶
func (c *LocalCache) GetSet(key string, ttlSeconds int, provider GetSetProvider) interface{}
func (*LocalCache) HMget ¶
func (c *LocalCache) HMget(key string, fields ...string) map[string]interface{}
func (*LocalCache) HMset ¶
func (c *LocalCache) HMset(key string, fields map[string]interface{})
func (*LocalCache) MGet ¶
func (c *LocalCache) MGet(keys ...string) map[string]interface{}
func (*LocalCache) MSet ¶
func (c *LocalCache) MSet(pairs ...interface{})
func (*LocalCache) Remove ¶
func (c *LocalCache) Remove(keys ...string)
func (*LocalCache) Set ¶
func (c *LocalCache) Set(key string, value interface{})
type LocalCacheConfig ¶
type LocalCacheConfig struct {
// contains filtered or unexported fields
}
type Log ¶
type Log interface {
AddFields(fields apexLog.Fielder)
Debug(message string, fields apexLog.Fielder)
Info(message string, fields apexLog.Fielder)
Warn(message string, fields apexLog.Fielder)
Error(err interface{}, fields apexLog.Fielder)
ErrorMessage(message string, fields apexLog.Fielder)
AddFieldsFromHTTPRequest(r *http.Request, ip string)
SetHTTPResponseCode(code int)
}
type LogQueueValue ¶
type LogReceiver ¶
type LogReceiver struct {
Logger func(log *LogQueueValue)
// contains filtered or unexported fields
}
func NewLogReceiver ¶
func NewLogReceiver(engine *Engine) *LogReceiver
func (*LogReceiver) Digest ¶
func (r *LogReceiver) Digest()
func (*LogReceiver) DisableLoop ¶
func (r *LogReceiver) DisableLoop()
func (*LogReceiver) Purge ¶
func (r *LogReceiver) Purge()
func (*LogReceiver) SetHeartBeat ¶
func (r *LogReceiver) SetHeartBeat(beat func())
type Pager ¶
func (*Pager) GetCurrentPage ¶
func (*Pager) GetPageSize ¶
func (*Pager) IncrementPage ¶
func (pager *Pager) IncrementPage()
type PreparedStatement ¶
type PreparedStatement struct {
// contains filtered or unexported fields
}
func (*PreparedStatement) Exec ¶
func (p *PreparedStatement) Exec(args ...interface{}) sql.Result
type PubSub ¶
type PubSub struct {
// contains filtered or unexported fields
}
func (*PubSub) DisableLoop ¶
func (p *PubSub) DisableLoop()
func (*PubSub) PUnsubscribe ¶
func (*PubSub) SetHeartBeat ¶
func (p *PubSub) SetHeartBeat(beat func())
func (*PubSub) SetMaxLoopDuration ¶
func (*PubSub) Unsubscribe ¶
type QueryLoggerSource ¶
type QueryLoggerSource int
type RabbitMQConsumer ¶
type RabbitMQQueue ¶
type RabbitMQQueue struct {
// contains filtered or unexported fields
}
func (RabbitMQQueue) NewConsumer ¶
func (r RabbitMQQueue) NewConsumer(name string) RabbitMQConsumer
func (*RabbitMQQueue) Publish ¶
func (r *RabbitMQQueue) Publish(body []byte)
type RabbitMQQueueConfig ¶
type RabbitMQRouter ¶
type RabbitMQRouter struct {
// contains filtered or unexported fields
}
func (RabbitMQRouter) NewConsumer ¶
func (r RabbitMQRouter) NewConsumer(name string) RabbitMQConsumer
func (*RabbitMQRouter) Publish ¶
func (r *RabbitMQRouter) Publish(routerKey string, body []byte)
type RabbitMQRouterConfig ¶
type RedisCache ¶
type RedisCache struct {
// contains filtered or unexported fields
}
func (*RedisCache) Del ¶
func (r *RedisCache) Del(keys ...string)
func (*RedisCache) FlushDB ¶
func (r *RedisCache) FlushDB()
func (*RedisCache) GetSet ¶
func (r *RedisCache) GetSet(key string, ttlSeconds int, provider GetSetProvider) interface{}
func (*RedisCache) HMget ¶
func (r *RedisCache) HMget(key string, fields ...string) map[string]interface{}
func (*RedisCache) HMset ¶
func (r *RedisCache) HMset(key string, fields map[string]interface{})
func (*RedisCache) HSet ¶
func (r *RedisCache) HSet(key string, field string, value interface{})
func (*RedisCache) LLen ¶
func (r *RedisCache) LLen(key string) int64
func (*RedisCache) LPush ¶
func (r *RedisCache) LPush(key string, values ...interface{}) int64
func (*RedisCache) LRem ¶
func (r *RedisCache) LRem(key string, count int64, value interface{})
func (*RedisCache) LSet ¶
func (r *RedisCache) LSet(key string, index int64, value interface{})
func (*RedisCache) Ltrim ¶
func (r *RedisCache) Ltrim(key string, start, stop int64)
func (*RedisCache) MGet ¶
func (r *RedisCache) MGet(keys ...string) map[string]interface{}
func (*RedisCache) MSet ¶
func (r *RedisCache) MSet(pairs ...interface{})
func (*RedisCache) PSubscribe ¶
func (r *RedisCache) PSubscribe(channels ...string) *PubSub
func (*RedisCache) Publish ¶
func (r *RedisCache) Publish(channel string, message interface{})
func (*RedisCache) RPush ¶
func (r *RedisCache) RPush(key string, values ...interface{}) int64
func (*RedisCache) RateLimit ¶
func (r *RedisCache) RateLimit(key string, limit redis_rate.Limit) bool
func (*RedisCache) SAdd ¶
func (r *RedisCache) SAdd(key string, members ...interface{}) int64
func (*RedisCache) SCard ¶
func (r *RedisCache) SCard(key string) int64
func (*RedisCache) Set ¶
func (r *RedisCache) Set(key string, value interface{}, ttlSeconds int)
func (*RedisCache) Subscribe ¶
func (r *RedisCache) Subscribe(channels ...string) *PubSub
func (*RedisCache) ZCard ¶
func (r *RedisCache) ZCard(key string) int64
func (*RedisCache) ZRangeWithScores ¶
func (r *RedisCache) ZRangeWithScores(key string, start, stop int64) []redis.Z
func (*RedisCache) ZRevRange ¶
func (r *RedisCache) ZRevRange(key string, start, stop int64) []string
func (*RedisCache) ZRevRangeWithScores ¶
func (r *RedisCache) ZRevRangeWithScores(key string, start, stop int64) []redis.Z
func (*RedisCache) ZScore ¶
func (r *RedisCache) ZScore(key, member string) float64
type RedisCacheConfig ¶
type RedisCacheConfig struct {
// contains filtered or unexported fields
}
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func InitByYaml ¶
func (*Registry) RegisterClickHouse ¶
func (*Registry) RegisterDirtyQueue ¶
func (*Registry) RegisterElastic ¶
func (*Registry) RegisterElasticIndex ¶
func (r *Registry) RegisterElasticIndex(index ElasticIndexDefinition, serverPool ...string)
func (*Registry) RegisterElasticWithTraceLog ¶
func (*Registry) RegisterEntity ¶
func (*Registry) RegisterEnumMap ¶
func (*Registry) RegisterEnumSlice ¶
func (*Registry) RegisterEnumStruct ¶
func (*Registry) RegisterLocalCache ¶
func (*Registry) RegisterLocker ¶
func (*Registry) RegisterMySQLPool ¶
func (*Registry) RegisterRabbitMQQueue ¶
func (r *Registry) RegisterRabbitMQQueue(config *RabbitMQQueueConfig, serverPool ...string)
func (*Registry) RegisterRabbitMQRouter ¶
func (r *Registry) RegisterRabbitMQRouter(config *RabbitMQRouterConfig, serverPool ...string)
func (*Registry) RegisterRabbitMQServer ¶
func (*Registry) RegisterRedis ¶
func (*Registry) RegisterRedisRing ¶
func (*Registry) Validate ¶
func (r *Registry) Validate() (ValidatedRegistry, error)
type SearchOptions ¶
type SearchOptions struct {
// contains filtered or unexported fields
}
func (*SearchOptions) AddAggregation ¶
func (p *SearchOptions) AddAggregation(name string, aggregation elastic.Aggregation) *SearchOptions
func (*SearchOptions) AddSort ¶
func (p *SearchOptions) AddSort(field string, ascending bool) *SearchOptions
type TableSchema ¶
type TableSchema interface {
GetTableName() string
GetType() reflect.Type
DropTable(engine *Engine)
TruncateTable(engine *Engine)
UpdateSchema(engine *Engine)
UpdateSchemaAndTruncateTable(engine *Engine)
GetMysql(engine *Engine) *DB
GetLocalCache(engine *Engine) (cache *LocalCache, has bool)
GetRedisCache(engine *Engine) (cache *RedisCache, has bool)
GetReferences() []string
GetColumns() []string
GetUsage(registry ValidatedRegistry) map[reflect.Type][]string
GetSchemaChanges(engine *Engine) (has bool, alters []Alter)
}
type ValidatedRegistry ¶
type ValidatedRegistry interface {
CreateEngine() *Engine
GetTableSchema(entityName string) TableSchema
GetTableSchemaForEntity(entity Entity) TableSchema
GetDirtyQueues() map[string]int
GetSourceRegistry() *Registry
GetEnum(code string) Enum
GetEnums() map[string]Enum
GetEntities() map[string]reflect.Type
}
type Where ¶
type Where struct {
// contains filtered or unexported fields
}
func (*Where) GetParameters ¶
func (where *Where) GetParameters() []interface{}
Source Files
¶
- cached_search.go
- clear_by_ids.go
- clickhouse.go
- datadog.go
- db.go
- dirty_receiver.go
- elastic.go
- engine.go
- flush.go
- lazy_receiver.go
- load_by_id.go
- load_by_ids.go
- local_cache.go
- locker.go
- log_receiver.go
- logger.go
- orm.go
- pager.go
- query_logger.go
- rabbitmq.go
- redis_cache.go
- registry.go
- schema.go
- search.go
- table_schema.go
- validated_registry.go
- where.go
- yaml_loader.go
Click to show internal directories.
Click to hide internal directories.