Files
isp-system-service/conf/remote.go
T
2022-08-01 14:07:31 +03:00

25 lines
1.0 KiB
Go

package conf
import (
"reflect"
"github.com/integration-system/isp-kit/dbx"
"github.com/integration-system/isp-kit/log"
"github.com/integration-system/isp-kit/rc/schema"
"github.com/integration-system/jsonschema"
)
func init() {
schema.CustomGenerators.Register("logLevel", func(field reflect.StructField, t *jsonschema.Type) {
t.Type = "string"
t.Enum = []interface{}{"debug", "info", "error", "fatal"}
})
}
type Remote struct {
Database dbx.Config `schema:"Настройка базы данных"`
LogLevel log.Level `schemaGen:"logLevel" schema:"Уровень логирования"`
DefaultTokenExpireTime int `schema:"Время жизни токена по умолчанию,время жизни токена в миллисекундах с момента его создания. если = -1 - время жизни неограниченно"`
ApplicationSecret string `schema:"Ключ для подписи application токенов" valid:"required~Required"`
}