forked from statping/statping
-
Notifications
You must be signed in to change notification settings - Fork 139
/
struct.go
53 lines (44 loc) · 2.61 KB
/
struct.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package configs
import "github.com/statping-ng/statping-ng/database"
const SqliteFilename = "statping.db"
// DbConfig struct is used for the Db connection and creates the 'config.yml' file
type DbConfig struct {
DbConn string `yaml:"connection,omitempty" json:"connection"`
DbHost string `yaml:"host,omitempty" json:"-"`
DbUser string `yaml:"user,omitempty" json:"-"`
DbPass string `yaml:"password,omitempty" json:"-"`
DbData string `yaml:"database,omitempty" json:"-"`
DbPort int `yaml:"port,omitempty" json:"-"`
ApiSecret string `yaml:"api_secret,omitempty" json:"-"`
Language string `yaml:"language,omitempty" json:"language"`
AllowReports bool `yaml:"allow_reports,omitempty" json:"allow_reports"`
Project string `yaml:"-" json:"-"`
Description string `yaml:"-" json:"-"`
Domain string `yaml:"-" json:"-"`
Username string `yaml:"-" json:"-"`
Password string `yaml:"-" json:"-"`
Email string `yaml:"-" json:"-"`
Error error `yaml:"-" json:"-"`
Location string `yaml:"location,omitempty" json:"-"`
SqlFile string `yaml:"sqlfile,omitempty" json:"-"`
LetsEncryptHost string `yaml:"letsencrypt_host,omitempty" json:"letsencrypt_host"`
LetsEncryptEmail string `yaml:"letsencrypt_email,omitempty" json:"letsencrypt_email"`
LetsEncryptEnable bool `yaml:"letsencrypt_enable,omitempty" json:"letsencrypt_enable"`
LocalIP string `yaml:"-" json:"-"`
DisableHTTP bool `yaml:"disable_http" json:"disable_http"`
DemoMode bool `yaml:"demo_mode" json:"demo_mode"`
DisableLogs bool `yaml:"disable_logs" json:"disable_logs"`
UseAssets bool `yaml:"use_assets" json:"use_assets"`
BasePath string `yaml:"base_path,omitempty" json:"base_path"`
AdminUser string `yaml:"admin_user,omitempty" json:"admin_user"`
AdminPassword string `yaml:"admin_password,omitempty" json:"admin_password"`
AdminEmail string `yaml:"admin_email,omitempty" json:"admin_email"`
MaxOpenConnections int `yaml:"db_open_connections,omitempty" json:"db_open_connections"`
MaxIdleConnections int `yaml:"db_idle_connections,omitempty" json:"db_idle_connections"`
MaxLifeConnections int `yaml:"db_max_life_connections,omitempty" json:"db_max_life_connections"`
SampleData bool `yaml:"sample_data" json:"sample_data"`
UseCDN bool `yaml:"use_cdn" json:"use_cdn"`
DisableColors bool `yaml:"disable_colors" json:"disable_colors"`
PostgresSSLMode string `yaml:"postgres_ssl,omitempty" json:"postgres_ssl"`
Db database.Database `yaml:"-" json:"-"`
}