+++ /dev/null
-// Copyright 2023 nanzoom.com. All Rights Reserved.
-
-package uzsdk
-
-// Setting defines application's configuration.
-type Setting struct {
- Service struct {
- IP string // server listen address:ip, default: 0.0.0.0
- Port int64 // server listen address:port, default: 9000
- ServerName string // local address served by this server, default: http://[IP]:[Port], exp: http://127.0.0.1:9000
- SystemName string // smartsystem address served by httpd, default: http://[IP], exp: http://192.168.0.6
- PublicName string // smartcloud address served by httpd, default: [ServerName], exp: http://192.168.0.6:8080
- ServicePath string // urlpath for this service, default: /wservice
- DataDirectory string // server data directory, default: /data/cloud
- TrustedProxies []string // a list of proxies trusted, default: ["127.0.0.1"]
- }
- System struct {
- DBDriver string // database driver, default: postgres
- DBHost string // database host, default: 127.0.0.1
- DBPort int64 // database port, default: 5432
- DBUser string // database user, default: postgres
- DBPassword string // database password, default: postgres
- DBName string // database name, default: serverdb
- Heartbeat int64 // heartbeat(unit: second) for keepalive between client and server, default: 36000
- IdleTime int64 // server kick off client those do nothing after this idle time, default: [Heartbeat]<<2
- CheckTime int64 // interval that server check client status, default: [Heartbeat]>>1
- DbgOutput bool // debug: output more details, default: fasle.
- DbgToken bool // debug: use token '63886e35-7291-4b4d-a66f-fa7431542ace', default: false
- }
- GZip struct {
- Enable bool // enable gzip with gin, default: true
- Level int64 // gzip compress level, default: gzip.DefaultCompression
- }
- Logging struct {
- Level string // TODO: log level, default: error
- Prefix string // prefix add to each log message, default: ""
- File struct {
- Name string // log filename
- }
- Syslog struct {
- Enable bool // TODO: enable log to system, default: false
- }
- }
- Wechat struct {
- // for wechat-app
- Appid string
- Appsecret string
- // for wechat-pay
- Mchid string
- Apikey string
- CertificateSerialno string
- PrivateKeyPath string
- NotifyUrl string
- }
- Task struct {
- Timeout int64
- }
-}