Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitApplicationCfg ¶
func InitApplicationCfg()
func InitConfig ¶
func InitConfig()
func InitPlatformCfg ¶
func InitPlatformCfg()
func InitSignatureCfg ¶
func InitSignatureCfg()
func JwtSecretKey ¶
func JwtSecretKey() string
Types ¶
type ApplicationCfg ¶
type ApplicationCfg struct { Gin struct { Host string `yaml:"host" json:"host" mapstructure:"host"` Port int `yaml:"port" json:"port" mapstructure:"port"` CORS struct { AllowOrigins []string `yaml:"allow_origins" json:"allow_origins" mapstructure:"allow_origins"` AllowMethods []string `yaml:"allow_methods" json:"allow_methods" mapstructure:"allow_methods"` } `yaml:"cors" json:"cors" mapstructure:"cors"` Jwt struct { Expiration int `yaml:"expiration" json:"expiration" mapstructure:"expiration"` } `yaml:"jwt" json:"jwt" mapstructure:"jwt"` Paths struct { Assets string `yaml:"assets" json:"assets" mapstructure:"assets"` Media string `yaml:"media" json:"media" mapstructure:"media"` Frontend string `yaml:"frontend" json:"frontend" mapstructure:"frontend"` } `yaml:"paths" json:"paths" mapstructure:"paths"` } `yaml:"gin" json:"gin" mapstructure:"gin"` Email struct { Address string `yaml:"address" json:"address" mapstructure:"address"` Password string `yaml:"password" json:"password" mapstructure:"password"` SMTP struct { Host string `yaml:"host" json:"host" mapstructure:"host"` Port int `yaml:"port" json:"port" mapstructure:"port"` } `yaml:"smtp" json:"smtp" mapstructure:"smtp"` } `yaml:"email" json:"email" mapstructure:"email"` Captcha struct { Enabled bool `yaml:"enabled" json:"enabled" mapstructure:"enabled"` Provider string `yaml:"provider" json:"provider" mapstructure:"provider"` ReCaptcha struct { URL string `yaml:"url" json:"url" mapstructure:"url"` SiteKey string `yaml:"site_key" json:"site_key" mapstructure:"site_key"` SecretKey string `yaml:"secret_key" json:"secret_key" mapstructure:"secret_key"` Threshold float64 `yaml:"threshold" json:"threshold" mapstructure:"threshold"` } `yaml:"re_captcha" json:"re_captcha" mapstructure:"re_captcha"` Turnstile struct { URL string `yaml:"url" json:"url" mapstructure:"url"` SiteKey string `yaml:"site_key" json:"site_key" mapstructure:"site_key"` SecretKey string `yaml:"secret_key" json:"secret_key" mapstructure:"secret_key"` } `yaml:"turnstile" json:"turnstile" mapstructure:"turnstile"` } `yaml:"captcha" json:"captcha" mapstructure:"captcha"` Db struct { Provider string `yaml:"provider" json:"provider" mapstructure:"provider"` Postgres struct { Host string `yaml:"host" json:"host" mapstructure:"host"` Port int `yaml:"port" json:"port" mapstructure:"port"` Username string `yaml:"username" json:"username" mapstructure:"username"` Password string `yaml:"password" json:"password" mapstructure:"password"` Dbname string `yaml:"dbname" json:"dbname" mapstructure:"dbname"` Sslmode string `yaml:"sslmode" json:"sslmode" mapstructure:"sslmode"` } `yaml:"postgres" json:"postgres" mapstructure:"postgres"` SQLite3 struct { Filename string `yaml:"filename" json:"filename" mapstructure:"filename"` } `yaml:"sqlite3" json:"sqlite3" mapstructure:"sqlite3"` MySQL struct { Host string `yaml:"host" json:"host" mapstructure:"host"` Port int `yaml:"port" json:"port" mapstructure:"port"` Username string `yaml:"username" json:"username" mapstructure:"username"` Password string `yaml:"password" json:"password" mapstructure:"password"` Dbname string `yaml:"dbname" json:"dbname" mapstructure:"dbname"` } `yaml:"mysql" json:"mysql" mapstructure:"mysql"` } `yaml:"db" json:"db" mapstructure:"db"` Container struct { Provider string `yaml:"provider" json:"provider" mapstructure:"provider"` Docker struct { URI string `yaml:"uri" json:"uri" mapstructure:"uri"` Entry string `yaml:"entry" json:"entry" mapstructure:"entry"` } `yaml:"docker" json:"docker" mapstructure:"docker"` Proxy struct { Enabled bool `yaml:"enabled" json:"enabled" mapstructure:"enabled"` Type string `yaml:"type" json:"type" mapstructure:"type"` } `yaml:"proxy" json:"proxy" mapstructure:"proxy"` TrafficCapture struct { Enabled bool `yaml:"enabled" json:"enabled" mapstructure:"enabled"` Path string `yaml:"path" json:"path" mapstructure:"path"` } `yaml:"traffic_capture" json:"traffic_capture" mapstructure:"traffic_capture"` } `yaml:"container" json:"container" mapstructure:"container"` }
func AppCfg ¶
func AppCfg() *ApplicationCfg
func (*ApplicationCfg) Save ¶
func (a *ApplicationCfg) Save() (err error)
type PlatformCfg ¶
type PlatformCfg struct { Site struct { Title string `yaml:"title" json:"title" mapstructure:"title"` Description string `yaml:"description" json:"description" mapstructure:"description"` } `yaml:"site" json:"site" mapstructure:"site"` Container struct { ParallelLimit int `yaml:"parallel_limit" json:"parallel_limit" mapstructure:"parallel_limit"` RequestLimit int `yaml:"request_limit" json:"request_limit" mapstructure:"request_limit"` } `yaml:"container" json:"container" mapstructure:"container"` User struct { AllowRegistration bool `yaml:"allow_registration" json:"allow_registration" mapstructure:"allow_registration"` } `yaml:"user" json:"user" mapstructure:"user"` }
func PltCfg ¶
func PltCfg() *PlatformCfg
func (*PlatformCfg) Save ¶
func (p *PlatformCfg) Save() (err error)
type SignatureCfg ¶
type SignatureCfg struct { PublicKey string `yaml:"pub" json:"pub" mapstructure:"pub"` PrivateKey string `yaml:"pem" json:"pem " mapstructure:"pem"` }
func SigCfg ¶
func SigCfg() *SignatureCfg
func (*SignatureCfg) Save ¶
func (s *SignatureCfg) Save() (err error)
Click to show internal directories.
Click to hide internal directories.