Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AutoMigrateModelList = []interface{}{ model.User{}, model.Cluster{}, model.Project{}, model.Label{}, model.ClusterBind{}, model.Namespace{}, model.Serviceaccount{}, }
需要migrate 到数据库的信息
View Source
var Config = struct { DB *confmysql.MySQL Server *confserver.Server TestEnvStr string `env:""` Default_UserName string Default_PassWord string }{ Server: &confserver.Server{ Mode: "debug", }, DB: &confmysql.MySQL{ DSN: "root:a8EyHxVuaZeS9J@tcp(127.0.0.1:3306)/cluster_mgr?charset=utf8mb4&parseTime=True&loc=Local", AutoMigrateConfig: &confmysql.AutoMigrateConfig{ Models: AutoMigrateModelList, ModelPath: "./internal/model", QueryPath: "./internal/query", }, Config: &gorm.Config{ Logger: logger.Default.LogMode(logger.Info), }, }, TestEnvStr: "global.config", Default_UserName: "admin", Default_PassWord: "123456", }
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.