config

package
v0.0.0-...-2946602 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiConfig

type ApiConfig struct {
	EmailConfig        EmailConfig        `json:"email_config" yaml:"email_config"`
	TextMessageConfig  TextMessageConfig  `json:"text_message_config" yaml:"text_message_config"`
	CurrencyRateConfig CurrencyRateConfig `json:"currency_rate_config" yaml:"currency_rate_config"`
	WxConfig           WxConfig           `json:"wx_config" yaml:"wx_config"`
}

ApiConfig 外部API配置

type BookConfig

type BookConfig struct {
	BookName      string        `json:"book_name" yaml:"book_name"`
	StorageName   string        `json:"storage_name" yaml:"storage_name"`
	MysqlConfig   MysqlConfig   `json:"mysql_config" yaml:"mysql_config"`
	MinioConfig   MinioConfig   `json:"minio_config" yaml:"minio_config"`
	MongoDBConfig MongoDBConfig `json:"mongo_db_config" yaml:"mongo_db_config"`
}

BookConfig 账套存储配置

type CurrencyRateConfig

type CurrencyRateConfig struct {
	ListURL string `json:"list_url" yaml:"list_url"` // https://sapi.k780.com/?app=finance.rate_curlist&curType=rateRealtime
	RateURL string `json:"rate_url" yaml:"rate_url"`
	AppKey  string `json:"app_key" yaml:"app_key"`
	Sign    string `json:"sign" yaml:"sign"`
}

CurrencyRateConfig 货币汇率服务

type ESConfig

type ESConfig struct {
	Host                         string `json:"host" yaml:"host"`
	User                         string `json:"user" yaml:"user"`
	Password                     string `json:"password" yaml:"password"`
	ResponseHeaderTimeoutSeconds int    `json:"response_header_timeout_seconds" yaml:"response_header_timeout_seconds"`
}

type EmailConfig

type EmailConfig struct {
	EmailServerAddr string `json:"email_server_addr" yaml:"email_server_addr"`
	SenderEmail     string `json:"sender_email" yaml:"sender_email"`
	EmailSecret     string `json:"email_secret" yaml:"email_secret"`
}

EmailConfig 邮件服务

type InfluxConfig

type InfluxConfig struct {
	Host   string `json:"host" yaml:"host"`
	Port   string `json:"port" yaml:"port"`
	Token  string `json:"token" yaml:"token"`
	Bucket string `json:"bucket" yaml:"bucket"`
	Org    string `json:"org" yaml:"org"`
}

type KafkaConfig

type KafkaConfig struct {
	AddrList []string `json:"addr_list" yaml:"addr_list"`
	Username string   `json:"username" yaml:"username"`
	Password string   `json:"password" yaml:"password"`
}

type LogConfig

type LogConfig struct {
}

LogConfig 日志配置

type MinioConfig

type MinioConfig struct {
	AccessKey string `json:"access_key" yaml:"access_key"`
	SecretKey string `json:"secret_key" yaml:"secret_key"`
	EndPoint  string `json:"end_point" yaml:"end_point"`
	Bucket    string `json:"bucket" yaml:"bucket"`
}

type MongoDBConfig

type MongoDBConfig struct {
	URL    string `json:"url" yaml:"url"`
	DBName string `json:"db_name" yaml:"db_name"`
}

type MysqlConfig

type MysqlConfig struct {
	Host     string       `json:"host" yaml:"host"`
	Port     string       `json:"port" yaml:"port"`
	UserName string       `json:"user_name" yaml:"user_name"`
	Password string       `json:"password" yaml:"password"`
	DBName   string       `json:"db_name" yaml:"db_name"`
	LogMode  MysqlLogMode `json:"log_mode" yaml:"log_mode"`
}

type MysqlLogMode

type MysqlLogMode string

MysqlLogMode Mysql日志模式

const (
	Console   MysqlLogMode = "console"
	SlowQuery MysqlLogMode = "slow_query"
	None      MysqlLogMode = "none"
)

Console 使用 gorm logger,控制台打印sql SlowQuery 打印慢查询sql到日志 None 不开启日志打印

type RedisConfig

type RedisConfig struct {
	AddrList []string `json:"addr_list" yaml:"addr_list"`
	Password string   `json:"password" yaml:"password"`
}

type ServiceConfig

type ServiceConfig struct {
	Port string `json:"port" yaml:"port"`
}

ServiceConfig 服务配置

type StorageConfig

type StorageConfig struct {
	MysqlConfig   MysqlConfig   `json:"mysql_config" yaml:"mysql_config"`
	MongoDBConfig MongoDBConfig `json:"mongo_db_config" yaml:"mongo_db_config"`
	RedisConfig   RedisConfig   `json:"redis_config" yaml:"redis_config"`
	MinioConfig   MinioConfig   `json:"minio_config" yaml:"minio_config"`
	KafkaConfig   KafkaConfig   `json:"kafka_config" yaml:"kafka_config"`
	InfluxConfig  InfluxConfig  `json:"influx_config" yaml:"influx_config"`
	ESConfig      ESConfig      `json:"es_config" yaml:"es_config"`
}

StorageConfig 系统存储配置

type TextMessageConfig

type TextMessageConfig struct {
	AppID      string `json:"app_id" yaml:"app_id"`
	AppSecret  string `json:"app_secret" yaml:"app_secret"`
	ApiAddress string `json:"api_address" yaml:"api_address"`
}

TextMessageConfig 短信服务

type WxConfig

type WxConfig struct {
	AppID      string `json:"app_id" yaml:"app_id"`
	AppSecrete string `json:"app_secrete" yaml:"app_secrete"`
	ApiUrl     string `json:"api_url" yaml:"api_url"`
}

Jump to

Keyboard shortcuts

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