mirror of
https://github.com/gl-inet/glkvm-cloud.git
synced 2026-09-23 19:16:18 +00:00
7931fa0efd
Refactor legacy login endpoint and keep compatibility with existing authentication logic. Signed-off-by: GL.iNet-Yongping.Xie <yongping.xie@gl-inet.com>
17 lines
319 B
Go
Executable File
17 lines
319 B
Go
Executable File
package config
|
|
|
|
import "time"
|
|
|
|
type Config struct {
|
|
HTTP struct{ Addr string }
|
|
Auth struct{ SessionTTL time.Duration }
|
|
DB struct{ DSN string }
|
|
}
|
|
|
|
func MustLoad() Config {
|
|
var cfg Config
|
|
cfg.Auth.SessionTTL = 24 * time.Hour
|
|
cfg.DB.DSN = "file:rttys.db?_pragma=foreign_keys(1)"
|
|
return cfg
|
|
}
|