-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.go
37 lines (32 loc) · 1.18 KB
/
config.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
package pa
// Config layouts the .toml config file structure its expecting.
// uses mapstructure tags which is used by viper.
type Config struct {
Github struct {
ClientID string `mapstructure:"client-id"`
ClientSecret string `mapstructure:"client-secret"`
AdminUserEmail string `mapstructure:"admin-user-email"`
} `mapstructure:"github"`
HTTP struct {
Addr string `mapstructure:"addr"`
Domain string `mapstructure:"domain"`
BlockKey string `mapstructure:"block-key"`
HashKey string `mapstructure:"hash-key"`
FrontendURL string `mapstructure:"frontend-url"`
} `mapstructure:"http"`
Database struct {
SqliteDSN string `mapstructure:"sqlite-dsn"`
RedisDSN string `mapstructure:"redis-dsn"`
} `mapstructure:"database"`
Smtp struct {
Addr string `mapstructure:"addr"`
Identity string `mapstructure:"identity"`
Username string `mapstructure:"username"`
Password string `mapstructure:"password"`
Host string `mapstructure:"host"`
} `mapstructure:"smtp"`
FileStructure struct {
ProjectImagesDir string `mapstructure:"project-images-dir"`
BlogImagesDir string `mapstructure:"blog-images-dir"`
} `mapstructure:"file-structure"`
}