config

package
v0.0.6-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2023 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatConfig

func FormatConfig(config interface{})

func InitConfigEnv

func InitConfigEnv(val string) string

Types

type Aliyun

type Aliyun struct {
	AccessKeyId     string `yaml:"id"`
	AccessKeySecret string `yaml:"secret"`
	RegionId        string `yaml:"region"`
}

type CookieConfig

type CookieConfig struct {
	Domain string `yaml:"domain"`
	AgeMax int    `yaml:"age"`
}

type DingTalkConfig

type DingTalkConfig struct {
	AppKey    string `yaml:"id"`
	AppSecret string `yaml:"secret"`
}

type Jwt

type Jwt struct {
	Issuer      string `yaml:"issuer"`
	PubKeyPath  string `yaml:"pubkey"`
	PrivKeyPath string `yaml:"privkey"`
	Secret      string `yaml:"secret"`
}

jwt

type LogConfig

type LogConfig struct {
	Path          string `yaml:"path"`
	RotationCount int    `yaml:"rotation_count"`
	Level         string `yaml:"level"`
}

type MiniProgramConfig

type MiniProgramConfig struct {
	AppID     string `yaml:"appID"`
	AppSecret string `yaml:"appSecret"`
}

type MongoDBConfig

type MongoDBConfig struct {
	Host     string           `yaml:"host"`
	Port     int              `yaml:"port"`
	Username string           `yaml:"username"`
	Password string           `yaml:"password"`
	DB       string           `yaml:"db"`
	Timeout  int              `yaml:"timeout"`
	LogLevel options.LogLevel `yaml:"logLevel"`
}

type OfficialAccountConfig

type OfficialAccountConfig struct {
	AppID          string `yaml:"appID"`
	AppSecret      string `yaml:"appSecret"`
	Token          string `yaml:"token"`
	EncodingAESKey string `yaml:"encodingAESKey"`
}

type Oss

type Oss struct {
	AccessKeyId     string `yaml:"id"`
	AccessKeySecret string `yaml:"secret"`
	Endpoint        string `yaml:"endpoint"`
	Bucket          string `yaml:"bucket"`
	Prefix          string `yaml:"prefix"`
}

type RedisConfig

type RedisConfig struct {
	Host        string `yaml:"host"`
	Port        int    `yaml:"port"`
	Password    string `yaml:"password"`
	MaxActive   int    `yaml:"maxActive"`
	MaxIdle     int    `yaml:"maxIdle"`
	IdleTimeout int    `yaml:"idleTimeout"`
	DB          int    `yaml:"db"`
}

type RocketMQConfig

type RocketMQConfig struct {
	Host      string `yaml:"host"`
	Port      int    `yaml:"port"`
	AccessKey string `yaml:"access"`
	SecretKey string `yaml:"secret"`
}

type Server

type Server struct {
	IP           string `yaml:"ip"`
	Port         int    `yaml:"port"`
	ReadTimeout  int    `yaml:"readtimeout"`
	WriteTimeout int    `yaml:"writetimeout"`
}

type SqliteConfig

type SqliteConfig struct {
	DbFile string `yaml:"dbfile"`
}

type WechatPayConfig

type WechatPayConfig struct {
	AppID     string `yaml:"app_id"`
	MchID     string `yaml:"mch_id"`
	Key       string `yaml:"key"`
	NotifyURL string `yaml:"notify_url"`
}

Jump to

Keyboard shortcuts

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