u
This commit is contained in:
1 parent
ac0843c041
commit
a917be08d1
65 files changed
+8043
No files matched your search
@@ -0,0 +1,43 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type appConfig struct {
|
||||
Server serverConfig
|
||||
JWT jwtConfig
|
||||
Snowflake snowflakeConfig
|
||||
}
|
||||
|
||||
type serverConfig struct {
|
||||
Port string
|
||||
BaseUrl string
|
||||
}
|
||||
|
||||
type jwtConfig struct {
|
||||
Secret string
|
||||
AccessExpiry time.Duration
|
||||
RefreshExpiry time.Duration
|
||||
}
|
||||
|
||||
type snowflakeConfig struct {
|
||||
DatacenterID uint16
|
||||
WorkerID uint16
|
||||
}
|
||||
|
||||
var App = &appConfig{
|
||||
Server: serverConfig{
|
||||
Port: ":8086",
|
||||
BaseUrl: "/app",
|
||||
},
|
||||
JWT: jwtConfig{
|
||||
Secret: "3Bde3BGEbYqtqyEUzW3ry8jKFcaPH17fRmTmqE7MDr05Lwj95uruRKrrkb44TJ4s",
|
||||
AccessExpiry: 30 * time.Minute,
|
||||
RefreshExpiry: 30 * 24 * time.Hour,
|
||||
},
|
||||
Snowflake: snowflakeConfig{
|
||||
DatacenterID: 1,
|
||||
WorkerID: 1,
|
||||
},
|
||||
}
|
||||
Reference in new issue
Block a user