Versions in this module Expand all Collapse all v0 v0.0.3 Aug 10, 2022 Changes in this version + var ApplicationConfig = new(Application) + var CacheConfig = new(Cache) + var DBDao *zorm.DBDao + var DatabaseConfig = new(Database) + var DatabasesConfig = make(map[string]*Database) + var ExtendConfig interface + var GenConfig = new(Gen) + var JwtConfig = new(Jwt) + var LockerConfig = new(Locker) + var LoggerConfig = new(Logger) + var QueueConfig = new(Queue) + var SslConfig = new(Ssl) + func GetRedisClient() *redis.Client + func InitZOrmDao(DSN_STR string) (err error) + func SetRedisClient(c *redis.Client) + func Setup(DSN_STR string) + type Application struct + DemoMsg string + EnableDP bool + Host string + JwtSecret string + Mode string + Name string + Port int64 + ReadTimeout int + WriterTimeout int + type Cache struct + Memory interface{} + Redis *RedisConnectOptions + func (e Cache) Setup() (storage.AdapterCache, error) + type Config struct + Application *Application + Cache *Cache + Database *Database + Databases *map[string]*Database + Extend interface{} + Gen *Gen + Jwt *Jwt + Locker *Locker + Logger *Logger + Queue *Queue + Ssl *Ssl + type DBResolverConfig struct + Policy string + Replicas []string + Sources []string + Tables []string + type Database struct + ConnMaxIdleTime int + ConnMaxLifeTime int + Driver string + MaxIdleConns int + MaxOpenConns int + Registers []DBResolverConfig + Source string + type Gen struct + DBName string + FrontPath string + type Jwt struct + Secret string + Timeout int64 + type Locker struct + Redis *RedisConnectOptions + func (e Locker) Empty() bool + func (e Locker) Setup() (storage.AdapterLocker, error) + type Logger struct + Cap uint + EnabledDB bool + Level string + Path string + Stdout string + Type string + func (e Logger) Setup() + type NSQOptions struct + Addresses []string + AuthSecret string + BackoffMultiplier time.Duration + ClientID string + DefaultRequeueDelay time.Duration + Deflate bool + DeflateLevel int + DialTimeout time.Duration + HeartbeatInterval time.Duration + Hostname string + LookupdPollInterval time.Duration + LookupdPollJitter float64 + LowRdyIdleTimeout time.Duration + LowRdyTimeout time.Duration + MaxAttempts uint16 + MaxBackoffDuration time.Duration + MaxInFlight int + MaxRequeueDelay time.Duration + MsgTimeout time.Duration + OutputBufferSize int64 + OutputBufferTimeout time.Duration + RDYRedistributeInterval time.Duration + ReadTimeout time.Duration + SampleRate int32 + Snappy bool + Tls *Tls + UserAgent string + WriteTimeout time.Duration + func (e NSQOptions) GetNSQOptions() (*nsq.Config, error) + type Queue struct + Memory *QueueMemory + NSQ *QueueNSQ + Redis *QueueRedis + func (e Queue) Empty() bool + func (e Queue) Setup() (storage.AdapterQueue, error) + type QueueMemory struct + PoolSize uint + type QueueNSQ struct + ChannelPrefix string + type QueueRedis struct + Consumer *redisqueue.ConsumerOptions + Producer *redisqueue.ProducerOptions + type RedisConnectOptions struct + Addr string + DB int + MaxRetries int + Network string + Password string + PoolSize int + Tls *Tls + Username string + func (e RedisConnectOptions) GetRedisOptions() (*redis.Options, error) + type Settings struct + Settings Config + func (e *Settings) Init() + func (e *Settings) OnChange() + type Ssl struct + Domain string + Enable bool + KeyStr string + Pem string + type Tls struct + Ca string + Cert string + Key string