MSP-2243 update remote config
This commit is contained in:
1 parent
d208ad633e
commit
5cff5df97b
2 files changed
+48
-3
No files matched your search
+18
-1
@@ -9,7 +9,8 @@ import (
|
||||
"github.com/integration-system/jsonschema"
|
||||
)
|
||||
|
||||
func init() {
|
||||
// nolint: gochecknoinits
|
||||
func init() { //
|
||||
schema.CustomGenerators.Register("logLevel", func(field reflect.StructField, t *jsonschema.Type) {
|
||||
t.Type = "string"
|
||||
t.Enum = []interface{}{"debug", "info", "error", "fatal"}
|
||||
@@ -17,6 +18,7 @@ func init() {
|
||||
}
|
||||
|
||||
type Remote struct {
|
||||
Audit Audit
|
||||
Database dbx.Config
|
||||
ExpireSec int `valid:"required" schema:"Время жизни токена в секундах,in seconds"`
|
||||
UiDesign UIDesign `schema:"Кастомизация интерфейса"`
|
||||
@@ -27,6 +29,21 @@ type Remote struct {
|
||||
Permissions []Permission
|
||||
}
|
||||
|
||||
type Audit struct {
|
||||
EventSettings []AuditEventSetting
|
||||
AuditTTl AuditTTlSetting
|
||||
}
|
||||
|
||||
type AuditTTlSetting struct {
|
||||
TimeToLiveInMin int `valid:"required"`
|
||||
ExpireSyncPeriodInMin int `valid:"required"`
|
||||
}
|
||||
|
||||
type AuditEventSetting struct {
|
||||
Event string
|
||||
Name string
|
||||
}
|
||||
|
||||
type UIDesign struct {
|
||||
Name string `schema:"Название стенда"`
|
||||
PrimaryColor string `schema:"Цвет в HEX, примеры: #ff4d4f #fa8c16 #a0d911 #1890ff #722ed1 #d4b106 #e91e63 #ff5722 #795548 #abb8c3 #525252 #689f38"`
|
||||
|
||||
Reference in new issue
Block a user