2019-05-05 23:36:49 +03:00
|
|
|
package models
|
|
|
|
|
2020-05-24 14:41:19 +03:00
|
|
|
import "github.com/gorilla/securecookie"
|
|
|
|
|
2019-05-05 23:36:49 +03:00
|
|
|
type Config struct {
|
2020-05-24 14:41:19 +03:00
|
|
|
Env string
|
|
|
|
Port int
|
|
|
|
Addr string
|
|
|
|
DbHost string
|
|
|
|
DbPort uint
|
|
|
|
DbUser string
|
|
|
|
DbPassword string
|
|
|
|
DbName string
|
|
|
|
DbDialect string
|
|
|
|
DbMaxConn uint
|
|
|
|
CleanUp bool
|
|
|
|
DefaultUserName string
|
|
|
|
DefaultUserPassword string
|
|
|
|
SecureCookieHashKey string
|
|
|
|
SecureCookieBlockKey string
|
|
|
|
CustomLanguages map[string]string
|
|
|
|
LanguageColors map[string]string
|
|
|
|
SecureCookie *securecookie.SecureCookie
|
2019-05-05 23:36:49 +03:00
|
|
|
}
|
2020-02-20 17:39:56 +03:00
|
|
|
|
|
|
|
func (c *Config) IsDev() bool {
|
|
|
|
return c.Env == "dev"
|
|
|
|
}
|