component

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2023 License: MulanPSL-2.0 Imports: 30 Imported by: 0

Documentation

Index

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 config.ComponentCron
	// contains filtered or unexported fields
}

func (*Cron) CliFlags added in v0.1.3

func (s *Cron) CliFlags() []cli.Flag

func (*Cron) Close added in v0.1.3

func (s *Cron) Close() error

func (*Cron) FreeCron added in v0.1.3

func (s *Cron) FreeCron(name string) error

func (*Cron) Init added in v0.1.3

func (s *Cron) Init(_ logger.Interface, _ *gsf.AppConfig, _ *cli.Context) error

func (*Cron) NewCron added in v0.1.3

func (s *Cron) NewCron(name string) (*cron.Cron, error)

func (*Cron) NewCronEx added in v0.1.3

func (s *Cron) NewCronEx(name string, bSize int) (*cron.Cron, error)

func (*Cron) Run added in v0.1.3

func (s *Cron) Run() error

type ElasticSearch

type ElasticSearch struct {
	Cfg  config.ComponentEs
	Clts map[string]*EsClient
}

func (*ElasticSearch) CliFlags

func (c *ElasticSearch) CliFlags() []cli.Flag

func (*ElasticSearch) Close

func (c *ElasticSearch) Close() error

func (*ElasticSearch) Init

func (c *ElasticSearch) Init(l logger.Interface, cfg *gsf.AppConfig, ctx *cli.Context) 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 config.EntityEs
}

func (*EsClient) CliFlags added in v0.1.3

func (c *EsClient) CliFlags(name string) []cli.Flag

func (*EsClient) Load added in v0.1.3

func (c *EsClient) Load(name string, cfg *config.ComponentEs) (err error)

type Mongo

type Mongo struct {
	Cfg  config.ComponentMongo
	Clts map[string]*MongoClient
}

func (*Mongo) CliFlags

func (c *Mongo) CliFlags() []cli.Flag

func (*Mongo) Close

func (c *Mongo) Close() error

func (*Mongo) Init

func (c *Mongo) Init(l logger.Interface, cfg *gsf.AppConfig, ctx *cli.Context) error

func (*Mongo) LoadOne added in v0.1.3

func (c *Mongo) LoadOne(name string) (err error)

func (*Mongo) Run

func (c *Mongo) Run() error

type MongoClient added in v0.1.3

type MongoClient struct {
	DB  *mongo.Database
	Cfg config.EntityMongo
}

func (*MongoClient) CliFlags added in v0.1.3

func (c *MongoClient) CliFlags(name string) []cli.Flag

func (*MongoClient) Load added in v0.1.3

func (c *MongoClient) Load(name string, cfg *config.ComponentMongo) error

type MySQL

type MySQL struct {
	Cfg  config.ComponentMysql
	Clts map[string]*MySQLClient
	Log  MysqlLogger
}

func (*MySQL) CliFlags

func (c *MySQL) CliFlags() []cli.Flag

func (*MySQL) Close

func (c *MySQL) Close() error

func (*MySQL) Init

func (c *MySQL) Init(l glogger.Interface, cfg *gsf.AppConfig, _ *cli.Context) error

func (*MySQL) LoadOne added in v0.1.3

func (c *MySQL) LoadOne(name string) (err error)

func (*MySQL) Run

func (c *MySQL) Run() error

func (*MySQL) SetLogLevel

func (c *MySQL) SetLogLevel(v int)

type MySQLClient added in v0.1.3

type MySQLClient struct {
	DB  *gorm.DB
	Cfg config.EntityMysql
}

func (*MySQLClient) CliFlags added in v0.1.3

func (c *MySQLClient) CliFlags(name string) []cli.Flag

func (*MySQLClient) Load added in v0.1.3

func (c *MySQLClient) Load(name string, _ *config.ComponentMysql, log logger.Interface) (err error)

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) LogMode

func (l *MysqlLogger) LogMode(level logger.LogLevel) logger.Interface

func (*MysqlLogger) SetLogger

func (l *MysqlLogger) SetLogger(log glogger.Interface)

func (*MysqlLogger) Trace

func (l *MysqlLogger) Trace(_ context.Context, begin time.Time, fc func() (string, int64), err error)

func (*MysqlLogger) Warn

func (l *MysqlLogger) Warn(_ context.Context, msg string, data ...interface{})

type Redis

type Redis struct {
	Cfg  config.ComponentRedis
	Clts map[string]*RedisClient
}

func (*Redis) CliFlags

func (c *Redis) CliFlags() []cli.Flag

func (*Redis) Close

func (c *Redis) Close() error

func (*Redis) Init

func (c *Redis) Init(l logger.Interface, cfg *gsf.AppConfig, _ *cli.Context) error

func (*Redis) LoadOne added in v0.1.3

func (c *Redis) LoadOne(name string) (err error)

func (*Redis) Run

func (c *Redis) Run() (err error)

type RedisClient added in v0.1.3

type RedisClient struct {
	DB  *redis.Client
	Cfg config.EntityRedis
}

func (*RedisClient) CliFlags added in v0.1.3

func (c *RedisClient) CliFlags(name string) []cli.Flag

func (*RedisClient) Load added in v0.1.3

func (c *RedisClient) Load(name string, cfg *config.ComponentRedis) error

type Resize added in v0.1.3

type Resize struct {
	// contains filtered or unexported fields
}

func (*Resize) Check added in v0.1.3

func (r *Resize) Check(cap, len int) bool

func (*Resize) NewCap added in v0.1.3

func (r *Resize) NewCap(len int) int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL