Documentation ¶
Index ¶
- type Cron
- func (s *Cron) CliFlags() []cli.Flag
- func (s *Cron) Close() error
- func (s *Cron) FreeCron(name string) error
- func (s *Cron) Init(_ logger.Interface, _ *gsf.AppConfig, _ *cli.Context) error
- func (s *Cron) NewCron(name string) (*cron.Cron, error)
- func (s *Cron) NewCronEx(name string, bSize int, resize cron.Resize) (*cron.Cron, error)
- func (s *Cron) Run() error
- type ElasticSearch
- type EsClient
- func (c *EsClient) ApiLog(op, idx, body string) func()
- func (c *EsClient) CliFlags(name string) []cli.Flag
- func (c *EsClient) Config() *define.EntityEs
- func (c *EsClient) Init(env int, cc *ElasticSearch)
- func (c *EsClient) Load(name string) (err error)
- func (c *EsClient) Ref() *ElasticSearch
- func (c *EsClient) Search(idx string, body string, receive interface{}) (cnt uint64, err error)
- type Mongo
- type MongoClient
- func (c *MongoClient) AggregateAll(list interface{}, table string, pipeline interface{}, ...) error
- func (c *MongoClient) ApiLog(tbl, op string, args [][2]interface{}) func()
- func (c *MongoClient) CliFlags(name string) []cli.Flag
- func (c *MongoClient) Config() *define.EntityMongo
- func (c *MongoClient) Count(table string, pipeline interface{}) int64
- func (c *MongoClient) FindAll(list interface{}, table string, filter interface{}, ...) error
- func (c *MongoClient) FindOne(data interface{}, table string, filter interface{}, ...) error
- func (c *MongoClient) Init(env int, cc *Mongo)
- func (c *MongoClient) Insert(table string, data interface{}, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error)
- func (c *MongoClient) Load(name string) error
- func (c *MongoClient) Ref() *Mongo
- func (c *MongoClient) Update(table string, filter, data interface{}, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)
- type MySQL
- type MySQLClient
- type MysqlLogger
- func (l *MysqlLogger) Error(_ context.Context, msg string, data ...interface{})
- func (l *MysqlLogger) Info(_ context.Context, msg string, data ...interface{})
- func (l *MysqlLogger) LogMode(level logger.LogLevel) logger.Interface
- func (l *MysqlLogger) SetLogger(log glogger.Interface)
- func (l *MysqlLogger) Trace(_ context.Context, begin time.Time, fc func() (string, int64), err error)
- func (l *MysqlLogger) Warn(_ context.Context, msg string, data ...interface{})
- type Redis
- type RedisClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cron ¶ added in v0.1.3
type Cron struct { Cfg define.ComponentCron // contains filtered or unexported fields }
type ElasticSearch ¶
func (*ElasticSearch) CliFlags ¶
func (c *ElasticSearch) CliFlags() []cli.Flag
func (*ElasticSearch) Close ¶
func (c *ElasticSearch) Close() error
func (*ElasticSearch) LoadOne ¶ added in v0.1.3
func (c *ElasticSearch) LoadOne(name string) (err error)
func (*ElasticSearch) Run ¶
func (c *ElasticSearch) Run() (err error)
type EsClient ¶ added in v0.1.3
type EsClient struct { DB *elasticsearch.Client Cfg define.EntityEs IndexSuffix string // contains filtered or unexported fields }
func (*EsClient) Init ¶ added in v0.1.4
func (c *EsClient) Init(env int, cc *ElasticSearch)
func (*EsClient) Ref ¶ added in v0.2.0
func (c *EsClient) Ref() *ElasticSearch
type Mongo ¶
type Mongo struct { Cfg define.ComponentMongo Clts map[string]*MongoClient Log logger.Interface }
type MongoClient ¶ added in v0.1.3
type MongoClient struct { DB *mongo.Database Cfg define.EntityMongo // contains filtered or unexported fields }
func (*MongoClient) AggregateAll ¶ added in v0.1.4
func (c *MongoClient) AggregateAll(list interface{}, table string, pipeline interface{}, opts ...*options.AggregateOptions) error
func (*MongoClient) ApiLog ¶ added in v0.2.0
func (c *MongoClient) ApiLog(tbl, op string, args [][2]interface{}) func()
func (*MongoClient) CliFlags ¶ added in v0.1.3
func (c *MongoClient) CliFlags(name string) []cli.Flag
func (*MongoClient) Config ¶ added in v0.1.4
func (c *MongoClient) Config() *define.EntityMongo
func (*MongoClient) Count ¶ added in v0.1.4
func (c *MongoClient) Count(table string, pipeline interface{}) int64
func (*MongoClient) FindAll ¶ added in v0.1.4
func (c *MongoClient) FindAll(list interface{}, table string, filter interface{}, opts ...*options.FindOptions) error
func (*MongoClient) FindOne ¶ added in v0.1.4
func (c *MongoClient) FindOne(data interface{}, table string, filter interface{}, opts ...*options.FindOneOptions) error
func (*MongoClient) Init ¶ added in v0.1.4
func (c *MongoClient) Init(env int, cc *Mongo)
func (*MongoClient) Insert ¶ added in v0.2.0
func (c *MongoClient) Insert(table string, data interface{}, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error)
func (*MongoClient) Load ¶ added in v0.1.3
func (c *MongoClient) Load(name string) error
func (*MongoClient) Ref ¶ added in v0.2.0
func (c *MongoClient) Ref() *Mongo
func (*MongoClient) Update ¶ added in v0.2.0
func (c *MongoClient) Update(table string, filter, data interface{}, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)
type MySQL ¶
type MySQL struct { Cfg define.ComponentMysql Clts map[string]*MySQLClient Log MysqlLogger }
func (*MySQL) SetLogLevel ¶
type MySQLClient ¶ added in v0.1.3
type MySQLClient struct { DB *gorm.DB Cfg define.EntityMysql // contains filtered or unexported fields }
func (*MySQLClient) CliFlags ¶ added in v0.1.3
func (c *MySQLClient) CliFlags(name string) []cli.Flag
func (*MySQLClient) Config ¶ added in v0.1.4
func (c *MySQLClient) Config() *define.EntityMysql
func (*MySQLClient) Init ¶ added in v0.1.4
func (c *MySQLClient) Init(env int, cc *MySQL)
func (*MySQLClient) Load ¶ added in v0.1.3
func (c *MySQLClient) Load(name string) (err error)
func (*MySQLClient) Ref ¶ added in v0.2.0
func (c *MySQLClient) Ref() *MySQL
type MysqlLogger ¶
type MysqlLogger struct {
// contains filtered or unexported fields
}
func (*MysqlLogger) Error ¶
func (l *MysqlLogger) Error(_ context.Context, msg string, data ...interface{})
func (*MysqlLogger) Info ¶
func (l *MysqlLogger) Info(_ context.Context, msg string, data ...interface{})
func (*MysqlLogger) SetLogger ¶
func (l *MysqlLogger) SetLogger(log glogger.Interface)
type Redis ¶
type Redis struct { Cfg define.ComponentRedis Clts map[string]*RedisClient Log logger.Interface }
type RedisClient ¶ added in v0.1.3
type RedisClient struct { DB *redis.Client Cfg define.EntityRedis // contains filtered or unexported fields }
func (*RedisClient) ApiLog ¶ added in v0.2.0
func (c *RedisClient) ApiLog(args [][2]interface{}) func()
func (*RedisClient) CliFlags ¶ added in v0.1.3
func (c *RedisClient) CliFlags(name string) []cli.Flag
func (*RedisClient) Config ¶ added in v0.1.4
func (c *RedisClient) Config() *define.EntityRedis
func (*RedisClient) Init ¶ added in v0.1.4
func (c *RedisClient) Init(env int, cc *Redis)
func (*RedisClient) Load ¶ added in v0.1.3
func (c *RedisClient) Load(name string) error
func (*RedisClient) Ref ¶ added in v0.2.0
func (c *RedisClient) Ref() *Redis
Source Files ¶
Click to show internal directories.
Click to hide internal directories.