2024-09-08 15:28:22: merge [master:33b4e2d9651dc592eae18e258984b11b35cc0a5e];

This commit is contained in:
txix committed 2024-09-08 15:28:22 +03:00
1 parent 6f45b1861f
commit 02df1a6546
36 files changed
+653 -3262

No files matched your search

+3
View File
@@ -7,5 +7,8 @@
"username": "{{ msp_pgsql_user }}",
"host": "{{ msp_pgsql_address }}",
"port": 5432
},
"baseline": {
"initialAdminUiToken": "{{ isp_service_admin_token }}"
}
}
+12 -6
View File
@@ -3,14 +3,15 @@ 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"
"github.com/txix-open/isp-kit/dbx"
"github.com/txix-open/isp-kit/log"
"github.com/txix-open/isp-kit/rc/schema"
"github.com/txix-open/jsonschema"
)
//nolint:gochecknoinits
func init() {
schema.CustomGenerators.Register("logLevel", func(field reflect.StructField, t *jsonschema.Type) {
schema.CustomGenerators.Register("logLevel", func(field reflect.StructField, t *jsonschema.Schema) {
t.Type = "string"
t.Enum = []interface{}{"debug", "info", "error", "fatal"}
})
@@ -18,5 +19,10 @@ func init() {
type Remote struct {
Database dbx.Config `schema:"Настройка базы данных"`
LogLevel log.Level `schemaGen:"logLevel" schema:"Уровень логирования"`
Baseline Baseline
LogLevel log.Level `schemaGen:"logLevel" schema:"Уровень логирования"`
}
type Baseline struct {
InitialAdminUiToken string
}
+13
View File
@@ -0,0 +1,13 @@
package conf_test
import (
"isp-system-service/conf"
"testing"
"github.com/txix-open/isp-kit/test/rct"
)
func TestDefaultRemoteConfig(t *testing.T) {
t.Parallel()
rct.Test(t, "default_remote_config.json", conf.Remote{})
}