Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { PrivateKeyPath string `json:"private_key_path"` PublicKeyPath string `json:"public_key_path"` LogPath string `json:"log_path"` LocalFilePath string `json:"local_file_path"` Port string `json:"port"` //httpServer StaticPath string `json:"static_path"` DBConfig DBConfig `json:"db_config"` //数据库配置 MonitorDBConfig MonitorDBConfig `json:"monitor_db_config"` //日志数据库配置 RouterPrefix string `json:"router_prefix"` //api前缀 AuthPrefix string `json:"auth_prefix"` //白名单 MailConfig MailConfig `json:"mail_config"` //邮箱 AppConfig AppConfig `json:"app_config"` }
type DBConfig ¶
type DBConfig struct { Url string `json:"url"` //连接地址 DBName string `json:"db_name"` //数据库名 ForceSync bool `json:"force_sync"` //强制索引同步 }
数据库配置结构体
type MailConfig ¶
type MailConfig struct { Host string `json:"host"` Port int `json:"port"` Username string `json:"username"` Password string `json:"password"` }
func (*MailConfig) Dialer ¶
func (c *MailConfig) Dialer() (*gomail.Dialer, error)
type MonitorDBConfig ¶
type MonitorDBConfig struct { Url string `json:"url"` //连接地址 DBName string `json:"db_name"` //数据库名 }
数据库配置结构体
Click to show internal directories.
Click to hide internal directories.