Documentation
¶
Index ¶
- Constants
- func NewAppInfo(repo metadata.AppRepo, id int, appName string, level int, delFlag int, ...) metadata.App
- func NewAppInfoWithDefault(appName string, level int) metadata.App
- func NewAppInfoWithGlobal(id int, appName string, level int, delFlag int, createTime time.Time, ...) metadata.App
- func NewAppInfoWithMapAndRandom(fields map[string]interface{}) (metadata.App, error)
- func NewAppRepo(db middleware.Pool) metadata.AppRepo
- func NewAppRepoWithGlobal() metadata.AppRepo
- func NewAppService(repo metadata.AppRepo) metadata.AppService
- func NewAppServiceWithDefault() metadata.AppService
- func NewDBInfo(repo *DBRepo, id int, dbName string, clusterID int, clusterType int, envID int, ...) metadata.DB
- func NewDBInfoWithDefault(dbName string, clusterID, clusterType, envID int) metadata.DB
- func NewDBInfoWithGlobal(id int, dbName string, clusterID, clusterType, envID, delFlag int, ...) metadata.DB
- func NewDBInfoWithMapAndRandom(fields map[string]interface{}) (metadata.DB, error)
- func NewDBRepo(db middleware.Pool) metadata.DBRepo
- func NewDBRepoWithGlobal() metadata.DBRepo
- func NewDBService(repo metadata.DBRepo) metadata.DBService
- func NewDBServiceWithDefault() metadata.DBService
- func NewEmptyAppInfoWithGlobal() metadata.App
- func NewEmptyDBInfoWithGlobal() metadata.DB
- func NewEmptyDBInfoWithRepo(repo metadata.DBRepo) metadata.DB
- func NewEmptyEnvInfoWithGlobal() metadata.Env
- func NewEmptyMiddlewareClusterInfoWithGlobal() metadata.MiddlewareCluster
- func NewEmptyMiddlewareServerInfoWithGlobal() metadata.MiddlewareServer
- func NewEmptyMonitorSystemInfoWithGlobal() metadata.MonitorSystem
- func NewEmptyMySQLClusterInfoWithGlobal() metadata.MySQLCluster
- func NewEmptyMySQLServerInfoWithGlobal() metadata.MySQLServer
- func NewEmptyResourceGroupInfoWithGlobal() metadata.ResourceGroup
- func NewEmptyResourceRoleInfoWithGlobal() metadata.ResourceRole
- func NewEmptyUserInfoWithGlobal() metadata.User
- func NewEnvInfo(repo metadata.EnvRepo, id int, envName string, delFlag int, ...) metadata.Env
- func NewEnvInfoWithDefault(envName string) metadata.Env
- func NewEnvInfoWithGlobal(id int, envName string, delFlag int, createTime time.Time, ...) metadata.Env
- func NewEnvInfoWithMapAndRandom(fields map[string]interface{}) (metadata.Env, error)
- func NewEnvRepo(db middleware.Pool) metadata.EnvRepo
- func NewEnvRepoWithGlobal() metadata.EnvRepo
- func NewEnvService(repo metadata.EnvRepo) metadata.EnvService
- func NewEnvServiceWithDefault() metadata.EnvService
- func NewGroupResourceInfoWithMapAndRandom(fields map[string]interface{}) (metadata.ResourceGroup, error)
- func NewMiddlewareClusterInfo(repo metadata.MiddlewareClusterRepo, id int, middlewareClusterName string, ...) metadata.MiddlewareCluster
- func NewMiddlewareClusterInfoWithDefault(middlewareClusterName string, envID int) metadata.MiddlewareCluster
- func NewMiddlewareClusterInfoWithGlobal(id int, middlewareClusterName string, envID int, delFlag int, ...) metadata.MiddlewareCluster
- func NewMiddlewareClusterInfoWithMapAndRandom(fields map[string]interface{}) (metadata.MiddlewareCluster, error)
- func NewMiddlewareClusterRepo(db middleware.Pool) metadata.MiddlewareClusterRepo
- func NewMiddlewareClusterRepoWithGlobal() metadata.MiddlewareClusterRepo
- func NewMiddlewareClusterService(repo metadata.MiddlewareClusterRepo) metadata.MiddlewareClusterService
- func NewMiddlewareClusterServiceWithDefault() metadata.MiddlewareClusterService
- func NewMiddlewareServerInfo(repo metadata.MiddlewareServerRepo, id int, clusterID int, serverName string, ...) metadata.MiddlewareServer
- func NewMiddlewareServerInfoWithDefault(clusterID int, serverName string, middlewareRole int, hostIP string, ...) metadata.MiddlewareServer
- func NewMiddlewareServerInfoWithGlobal(id int, clusterID int, serverName string, middlewareRole int, hostIP string, ...) metadata.MiddlewareServer
- func NewMiddlewareServerInfoWithMapAndRandom(fields map[string]interface{}) (metadata.MiddlewareServer, error)
- func NewMiddlewareServerRepo(db middleware.Pool) metadata.MiddlewareServerRepo
- func NewMiddlewareServerRepoWithGlobal() metadata.MiddlewareServerRepo
- func NewMiddlewareServerService(repo metadata.MiddlewareServerRepo) metadata.MiddlewareServerService
- func NewMiddlewareServerServiceWithDefault() metadata.MiddlewareServerService
- func NewMonitorSystemInfo(repo *MonitorSystemRepo, id int, systemName string, systemType int, ...) metadata.MonitorSystem
- func NewMonitorSystemInfoWithDefault(systemName string, systemType int, hostIP string, portNum int, portNumSlow int, ...) metadata.MonitorSystem
- func NewMonitorSystemInfoWithGlobal(id int, systemName string, systemType int, hostIP string, portNum int, ...) metadata.MonitorSystem
- func NewMonitorSystemInfoWithMapAndRandom(fields map[string]interface{}) (metadata.MonitorSystem, error)
- func NewMonitorSystemRepo(db middleware.Pool) metadata.MonitorSystemRepo
- func NewMonitorSystemRepoWithGlobal() metadata.MonitorSystemRepo
- func NewMonitorSystemService(repo metadata.MonitorSystemRepo) metadata.MonitorSystemService
- func NewMonitorSystemServiceWithDefault() metadata.MonitorSystemService
- func NewMySQLClusterInfo(repo *MySQLClusterRepo, id int, clusterName string, middlewareClusterID int, ...) metadata.MySQLCluster
- func NewMySQLClusterInfoWithDefault(clusterName string, envID int) metadata.MySQLCluster
- func NewMySQLClusterInfoWithGlobal(id int, clusterName string, middlewareClusterID int, monitorSystemID int, ...) metadata.MySQLCluster
- func NewMySQLClusterInfoWithMapAndRandom(fields map[string]interface{}) (metadata.MySQLCluster, error)
- func NewMySQLClusterRepo(db middleware.Pool) metadata.MySQLClusterRepo
- func NewMySQLClusterRepoWithGlobal() metadata.MySQLClusterRepo
- func NewMySQLClusterService(repo metadata.MySQLClusterRepo) metadata.MySQLClusterService
- func NewMySQLClusterServiceWithDefault() metadata.MySQLClusterService
- func NewMySQLServerInfo(repo metadata.MySQLServerRepo, id int, clusterID int, serverName string, ...) metadata.MySQLServer
- func NewMySQLServerInfoWithDefault(clusterID int, serverName string, hostIP string, portNum int, ...) metadata.MySQLServer
- func NewMySQLServerInfoWithGlobal(id int, clusterID int, serverName string, serviceName string, hostIP string, ...) metadata.MySQLServer
- func NewMySQLServerInfoWithMapAndRandom(fields map[string]interface{}) (metadata.MySQLServer, error)
- func NewMySQLServerRepo(db middleware.Pool) metadata.MySQLServerRepo
- func NewMySQLServerRepoWithGlobal() metadata.MySQLServerRepo
- func NewMySQLServerService(repo metadata.MySQLServerRepo) metadata.MySQLServerService
- func NewMySQLServerServiceWithDefault() metadata.MySQLServerService
- func NewResourceGroupInfo(repo *ResourceGroupRepo, id int, groupUUID string, groupName string, ...) metadata.ResourceGroup
- func NewResourceGroupInfoWithDefault(groupUUID string, groupName string) metadata.ResourceGroup
- func NewResourceGroupInfoWithGlobal(id int, groupUUID string, groupName string, delFlag int, ...) metadata.ResourceGroup
- func NewResourceGroupRepo(db middleware.Pool) metadata.ResourceGroupRepo
- func NewResourceGroupRepoWithGlobal() metadata.ResourceGroupRepo
- func NewResourceGroupService(repo metadata.ResourceGroupRepo) metadata.ResourceGroupService
- func NewResourceGroupServiceWithDefault() metadata.ResourceGroupService
- func NewResourceRoleInfo(repo *ResourceRoleRepo, id int, roleUUID string, roleName string, delFlag int, ...) metadata.ResourceRole
- func NewResourceRoleInfoWithDefault(roleUUID string, resourceGroupID int) metadata.ResourceRole
- func NewResourceRoleInfoWithGlobal(id int, roleUUID string, roleName string, resourceGroupID int, delFlag int, ...) metadata.ResourceRole
- func NewResourceRoleInfoWithMapAndRandom(fields map[string]interface{}) (metadata.ResourceRole, error)
- func NewResourceRoleRepo(db middleware.Pool) metadata.ResourceRoleRepo
- func NewResourceRoleRepoWithGlobal() metadata.ResourceRoleRepo
- func NewResourceRoleService(repo metadata.ResourceRoleRepo) metadata.ResourceRoleService
- func NewResourceRoleServiceWithDefault() metadata.ResourceRoleService
- func NewTableRepo(conn *mysql.Conn) metadata.TableRepo
- func NewTableRepoWithDefault() metadata.TableRepo
- func NewTableService(repo metadata.TableRepo) metadata.TableService
- func NewTableServiceWithDefault() metadata.TableService
- func NewUserInfo(repo metadata.UserRepo, id int, userName string, departmentName string, ...) metadata.User
- func NewUserInfoWithDefault(userName string, departmentName string, accountName string, email string, ...) metadata.User
- func NewUserInfoWithGlobal(id int, userName string, departmentName string, employeeID string, ...) metadata.User
- func NewUserInfoWithMapAndRandom(fields map[string]interface{}) (metadata.User, error)
- func NewUserRepo(db middleware.Pool) metadata.UserRepo
- func NewUserRepoWithGlobal() metadata.UserRepo
- func NewUserService(repo metadata.UserRepo) metadata.UserService
- func NewUserServiceWithDefault() metadata.UserService
- type AppInfo
- func (ai *AppInfo) AddDB(dbID int) error
- func (ai *AppInfo) AddUser(userID int) error
- func (ai *AppInfo) Delete()
- func (ai *AppInfo) DeleteDB(dbID int) error
- func (ai *AppInfo) DeleteUser(userID int) error
- func (ai *AppInfo) GetAppName() string
- func (ai *AppInfo) GetCreateTime() time.Time
- func (ai *AppInfo) GetDBs() ([]metadata.DB, error)
- func (ai *AppInfo) GetDelFlag() int
- func (ai *AppInfo) GetLastUpdateTime() time.Time
- func (ai *AppInfo) GetLevel() int
- func (ai *AppInfo) GetUsers() ([]metadata.User, error)
- func (ai *AppInfo) Identity() int
- func (ai *AppInfo) MarshalJSON() ([]byte, error)
- func (ai *AppInfo) MarshalJSONWithFields(fields ...string) ([]byte, error)
- func (ai *AppInfo) Set(fields map[string]interface{}) error
- type AppRepo
- func (ar *AppRepo) AddDB(appID, dbID int) error
- func (ar *AppRepo) AddUser(appID, userID int) error
- func (ar *AppRepo) Create(app metadata.App) (metadata.App, error)
- func (ar *AppRepo) Delete(id int) error
- func (ar *AppRepo) DeleteDB(appID, dbID int) error
- func (ar *AppRepo) DeleteUser(appID, userID int) error
- func (ar *AppRepo) Execute(command string, args ...interface{}) (middleware.Result, error)
- func (ar *AppRepo) GetAll() ([]metadata.App, error)
- func (ar *AppRepo) GetAppByName(appName string) (metadata.App, error)
- func (ar *AppRepo) GetByID(id int) (metadata.App, error)
- func (ar *AppRepo) GetDBsByAppID(id int) ([]metadata.DB, error)
- func (ar *AppRepo) GetID(systemName string) (int, error)
- func (ar *AppRepo) GetUsersByAppID(id int) ([]metadata.User, error)
- func (ar *AppRepo) Transaction() (middleware.Transaction, error)
- func (ar *AppRepo) Update(app metadata.App) error
- type AppService
- func (as *AppService) AddDB(appID, dbID int) error
- func (as *AppService) AddUser(appID, userID int) error
- func (as *AppService) Create(fields map[string]interface{}) error
- func (as *AppService) Delete(id int) error
- func (as *AppService) DeleteDB(appID, dbID int) error
- func (as *AppService) DeleteUser(appID, userID int) error
- func (as *AppService) GetAll() error
- func (as *AppService) GetAppByName(appName string) error
- func (as *AppService) GetApps() []metadata.App
- func (as *AppService) GetByID(id int) error
- func (as *AppService) GetDBs() []metadata.DB
- func (as *AppService) GetDBsByAppID(id int) error
- func (as *AppService) GetUsers() []metadata.User
- func (as *AppService) GetUsersByAppID(id int) error
- func (as *AppService) Marshal() ([]byte, error)
- func (as *AppService) MarshalWithFields(fields ...string) ([]byte, error)
- func (as *AppService) Update(id int, fields map[string]interface{}) error
- type DBInfo
- func (di *DBInfo) AddApp(appID int) error
- func (di *DBInfo) DBAddUser(userID int) error
- func (di *DBInfo) DBDeleteUser(userID int) error
- func (di *DBInfo) Delete()
- func (di *DBInfo) DeleteApp(appID int) error
- func (di *DBInfo) GetAllUsers() ([]metadata.User, error)
- func (di *DBInfo) GetAppUsers() ([]metadata.User, error)
- func (di *DBInfo) GetApps() ([]metadata.App, error)
- func (di *DBInfo) GetClusterID() int
- func (di *DBInfo) GetClusterType() int
- func (di *DBInfo) GetCreateTime() time.Time
- func (di *DBInfo) GetDBName() string
- func (di *DBInfo) GetDBUsers() ([]metadata.User, error)
- func (di *DBInfo) GetDelFlag() int
- func (di *DBInfo) GetEnvID() int
- func (di *DBInfo) GetLastUpdateTime() time.Time
- func (di *DBInfo) GetMySQLCluster() (metadata.MySQLCluster, error)
- func (di *DBInfo) Identity() int
- func (di *DBInfo) MarshalJSON() ([]byte, error)
- func (di *DBInfo) MarshalJSONWithFields(fields ...string) ([]byte, error)
- func (di *DBInfo) Set(fields map[string]interface{}) error
- type DBRepo
- func (dr *DBRepo) AddApp(dbID, appID int) error
- func (dr *DBRepo) Create(db metadata.DB) (metadata.DB, error)
- func (dr *DBRepo) DBAddUser(dbID, userID int) error
- func (dr *DBRepo) DBDeleteUser(dbID, userID int) error
- func (dr *DBRepo) Delete(id int) error
- func (dr *DBRepo) DeleteApp(dbID, appID int) error
- func (dr *DBRepo) Execute(command string, args ...interface{}) (middleware.Result, error)
- func (dr *DBRepo) GetAll() ([]metadata.DB, error)
- func (dr *DBRepo) GetAllUsersByDBID(id int) ([]metadata.User, error)
- func (dr *DBRepo) GetAppUsersByDBID(id int) ([]metadata.User, error)
- func (dr *DBRepo) GetAppsByDBID(dbID int) ([]metadata.App, error)
- func (dr *DBRepo) GetByEnv(envID int) ([]metadata.DB, error)
- func (dr *DBRepo) GetByID(id int) (metadata.DB, error)
- func (dr *DBRepo) GetDBByNameAndClusterInfo(name string, clusterID, clusterType int) (metadata.DB, error)
- func (dr *DBRepo) GetDBByNameAndHostInfo(name, hostIP string, portNum int) (metadata.DB, error)
- func (dr *DBRepo) GetDBsByHostInfo(hostIP string, portNum int) ([]metadata.DB, error)
- func (dr *DBRepo) GetID(dbName string, clusterID int, clusterType int) (int, error)
- func (dr *DBRepo) GetMySQLClusterByID(id int) (metadata.MySQLCluster, error)
- func (dr *DBRepo) GetUsersByDBID(id int) ([]metadata.User, error)
- func (dr *DBRepo) Transaction() (middleware.Transaction, error)
- func (dr *DBRepo) Update(db metadata.DB) error
- type DBService
- func (ds *DBService) AddApp(dbID, appID int) error
- func (ds *DBService) Create(fields map[string]interface{}) error
- func (ds *DBService) DBAddUser(dbID, userID int) error
- func (ds *DBService) DBDeleteUser(dbID, userID int) error
- func (ds *DBService) Delete(id int) error
- func (ds *DBService) DeleteApp(dbID, appID int) error
- func (ds *DBService) GetAll() error
- func (ds *DBService) GetAllUsersByDBID(id int) error
- func (ds *DBService) GetAppUsersByDBID(id int) error
- func (ds *DBService) GetApps() []metadata.App
- func (ds *DBService) GetAppsByDBID(dbID int) error
- func (ds *DBService) GetByEnv(envID int) error
- func (ds *DBService) GetByID(id int) error
- func (ds *DBService) GetDBByNameAndClusterInfo(name string, clusterID, clusterType int) error
- func (ds *DBService) GetDBByNameAndHostInfo(name, hostIP string, portNum int) error
- func (ds *DBService) GetDBs() []metadata.DB
- func (ds *DBService) GetDBsByHostInfo(hostIP string, portNum int) error
- func (ds *DBService) GetMySQLCluster() metadata.MySQLCluster
- func (ds *DBService) GetMySQLClusterByID(id int) error
- func (ds *DBService) GetUsers() []metadata.User
- func (ds *DBService) GetUsersByDBID(id int) error
- func (ds *DBService) Marshal() ([]byte, error)
- func (ds *DBService) MarshalWithFields(fields ...string) ([]byte, error)
- func (ds *DBService) Update(id int, fields map[string]interface{}) error
- type EnvInfo
- func (ei *EnvInfo) Delete()
- func (ei *EnvInfo) GetCreateTime() time.Time
- func (ei *EnvInfo) GetDelFlag() int
- func (ei *EnvInfo) GetEnvName() string
- func (ei *EnvInfo) GetLastUpdateTime() time.Time
- func (ei *EnvInfo) Identity() int
- func (ei *EnvInfo) MarshalJSON() ([]byte, error)
- func (ei *EnvInfo) MarshalJSONWithFields(fields ...string) ([]byte, error)
- func (ei *EnvInfo) Set(fields map[string]interface{}) error
- type EnvRepo
- func (er *EnvRepo) Create(env metadata.Env) (metadata.Env, error)
- func (er *EnvRepo) Delete(id int) error
- func (er *EnvRepo) Execute(command string, args ...interface{}) (middleware.Result, error)
- func (er *EnvRepo) GetAll() ([]metadata.Env, error)
- func (er *EnvRepo) GetByID(id int) (metadata.Env, error)
- func (er *EnvRepo) GetEnvByName(envName string) (metadata.Env, error)
- func (er *EnvRepo) GetID(envName string) (int, error)
- func (er *EnvRepo) Transaction() (middleware.Transaction, error)
- func (er *EnvRepo) Update(env metadata.Env) error
- type EnvService
- func (es *EnvService) Create(fields map[string]interface{}) error
- func (es *EnvService) Delete(id int) error
- func (es *EnvService) GetAll() error
- func (es *EnvService) GetByID(id int) error
- func (es *EnvService) GetEnvByName(envName string) error
- func (es *EnvService) GetEnvs() []metadata.Env
- func (es *EnvService) GetID(fields map[string]interface{}) (int, error)
- func (es *EnvService) Marshal() ([]byte, error)
- func (es *EnvService) MarshalWithFields(fields ...string) ([]byte, error)
- func (es *EnvService) Update(id int, fields map[string]interface{}) error
- type IndexStatistic
- func (is *IndexStatistic) GetCardinality() int
- func (is *IndexStatistic) GetColumnName() string
- func (is *IndexStatistic) GetDBName() string
- func (is *IndexStatistic) GetIndexName() string
- func (is *IndexStatistic) GetSequence() int
- func (is *IndexStatistic) GetTableName() string
- func (is *IndexStatistic) IsNullable() bool
- func (is *IndexStatistic) IsUnique() bool
- func (is *IndexStatistic) MarshalJSON() ([]byte, error)
- type MiddlewareClusterInfo
- func (mci *MiddlewareClusterInfo) AddUser(userID int) error
- func (mci *MiddlewareClusterInfo) Delete()
- func (mci *MiddlewareClusterInfo) DeleteUser(userID int) error
- func (mci *MiddlewareClusterInfo) GetClusterName() string
- func (mci *MiddlewareClusterInfo) GetCreateTime() time.Time
- func (mci *MiddlewareClusterInfo) GetDelFlag() int
- func (mci *MiddlewareClusterInfo) GetEnvID() int
- func (mci *MiddlewareClusterInfo) GetLastUpdateTime() time.Time
- func (mci *MiddlewareClusterInfo) GetMiddlewareServers() ([]metadata.MiddlewareServer, error)
- func (mci *MiddlewareClusterInfo) GetUsersByMiddlewareClusterID() ([]metadata.User, error)
- func (mci *MiddlewareClusterInfo) Identity() int
- func (mci *MiddlewareClusterInfo) MarshalJSON() ([]byte, error)
- func (mci *MiddlewareClusterInfo) MarshalJSONWithFields(fields ...string) ([]byte, error)
- func (mci *MiddlewareClusterInfo) Set(fields map[string]interface{}) error
- type MiddlewareClusterRepo
- func (mcr *MiddlewareClusterRepo) AddUser(middlewareClusterID, userID int) error
- func (mcr *MiddlewareClusterRepo) Create(middlewareCluster metadata.MiddlewareCluster) (metadata.MiddlewareCluster, error)
- func (mcr *MiddlewareClusterRepo) Delete(id int) error
- func (mcr *MiddlewareClusterRepo) DeleteUser(middlewareClusterID, userID int) error
- func (mcr *MiddlewareClusterRepo) Execute(command string, args ...interface{}) (middleware.Result, error)
- func (mcr *MiddlewareClusterRepo) GetAll() ([]metadata.MiddlewareCluster, error)
- func (mcr *MiddlewareClusterRepo) GetByEnv(envID int) ([]metadata.MiddlewareCluster, error)
- func (mcr *MiddlewareClusterRepo) GetByID(id int) (metadata.MiddlewareCluster, error)
- func (mcr *MiddlewareClusterRepo) GetByName(clusterName string) (metadata.MiddlewareCluster, error)
- func (mcr *MiddlewareClusterRepo) GetID(clusterName string, envID int) (int, error)
- func (mcr *MiddlewareClusterRepo) GetUsersByMiddlewareClusterID(clusterID int) ([]metadata.User, error)
- func (mcr *MiddlewareClusterRepo) Transaction() (middleware.Transaction, error)
- func (mcr *MiddlewareClusterRepo) Update(middlewareCluster metadata.MiddlewareCluster) error
- type MiddlewareClusterService
- func (mcs *MiddlewareClusterService) AddUser(middlewareClusterID, userID int) error
- func (mcs *MiddlewareClusterService) Create(fields map[string]interface{}) error
- func (mcs *MiddlewareClusterService) Delete(id int) error
- func (mcs *MiddlewareClusterService) DeleteUser(middlewareClusterID, userID int) error
- func (mcs *MiddlewareClusterService) GetAll() error
- func (mcs *MiddlewareClusterService) GetByEnv(envID int) error
- func (mcs *MiddlewareClusterService) GetByID(id int) error
- func (mcs *MiddlewareClusterService) GetByName(clusterName string) error
- func (mcs *MiddlewareClusterService) GetMiddlewareClusters() []metadata.MiddlewareCluster
- func (mcs *MiddlewareClusterService) GetMiddlewareServers() []metadata.MiddlewareServer
- func (mcs *MiddlewareClusterService) GetMiddlewareServersByID(clusterID int) error
- func (mcs *MiddlewareClusterService) GetUsers() []metadata.User
- func (mcs *MiddlewareClusterService) GetUsersByMiddlewareClusterID(clusterID int) error
- func (mcs *MiddlewareClusterService) Marshal() ([]byte, error)
- func (mcs *MiddlewareClusterService) MarshalWithFields(fields ...string) ([]byte, error)
- func (mcs *MiddlewareClusterService) Update(id int, fields map[string]interface{}) error
- type MiddlewareServerInfo
- func (msi *MiddlewareServerInfo) Delete()
- func (msi *MiddlewareServerInfo) GetClusterID() int
- func (msi *MiddlewareServerInfo) GetCreateTime() time.Time
- func (msi *MiddlewareServerInfo) GetDelFlag() int
- func (msi *MiddlewareServerInfo) GetHostIP() string
- func (msi *MiddlewareServerInfo) GetLastUpdateTime() time.Time
- func (msi *MiddlewareServerInfo) GetMiddlewareRole() int
- func (msi *MiddlewareServerInfo) GetPortNum() int
- func (msi *MiddlewareServerInfo) GetServerName() string
- func (msi *MiddlewareServerInfo) Identity() int
- func (msi *MiddlewareServerInfo) MarshalJSON() ([]byte, error)
- func (msi *MiddlewareServerInfo) MarshalJSONWithFields(fields ...string) ([]byte, error)
- func (msi *MiddlewareServerInfo) Set(fields map[string]interface{}) error
- type MiddlewareServerRepo
- func (msr *MiddlewareServerRepo) Create(middlewareServer metadata.MiddlewareServer) (metadata.MiddlewareServer, error)
- func (msr *MiddlewareServerRepo) Delete(id int) error
- func (msr *MiddlewareServerRepo) Execute(command string, args ...interface{}) (middleware.Result, error)
- func (msr *MiddlewareServerRepo) GetAll() ([]metadata.MiddlewareServer, error)
- func (msr *MiddlewareServerRepo) GetByClusterID(clusterID int) ([]metadata.MiddlewareServer, error)
- func (msr *MiddlewareServerRepo) GetByHostInfo(hostIP string, portNum int) (metadata.MiddlewareServer, error)
- func (msr *MiddlewareServerRepo) GetByID(id int) (metadata.MiddlewareServer, error)
- func (msr *MiddlewareServerRepo) GetID(hostIP string, portNum int) (int, error)
- func (msr *MiddlewareServerRepo) Transaction() (middleware.Transaction, error)
- func (msr *MiddlewareServerRepo) Update(middlewareServer metadata.MiddlewareServer) error
- type MiddlewareServerService
- func (mss *MiddlewareServerService) Create(fields map[string]interface{}) error
- func (mss *MiddlewareServerService) Delete(id int) error
- func (mss *MiddlewareServerService) GetAll() error
- func (mss *MiddlewareServerService) GetByClusterID(clusterID int) error
- func (mss *MiddlewareServerService) GetByHostInfo(hostIP string, portNum int) error
- func (mss *MiddlewareServerService) GetByID(id int) error
- func (mss *MiddlewareServerService) GetMiddlewareServers() []metadata.MiddlewareServer
- func (mss *MiddlewareServerService) Marshal() ([]byte, error)
- func (mss *MiddlewareServerService) MarshalWithFields(fields ...string) ([]byte, error)
- func (mss *MiddlewareServerService) Update(id int, fields map[string]interface{}) error
- type MonitorSystemInfo
- func (msi *MonitorSystemInfo) Delete()
- func (msi *MonitorSystemInfo) GetBaseURL() string
- func (msi *MonitorSystemInfo) GetCreateTime() time.Time
- func (msi *MonitorSystemInfo) GetDelFlag() int
- func (msi *MonitorSystemInfo) GetEnvID() int
- func (msi *MonitorSystemInfo) GetHostIP() string
- func (msi *MonitorSystemInfo) GetLastUpdateTime() time.Time
- func (msi *MonitorSystemInfo) GetPortNum() int
- func (msi *MonitorSystemInfo) GetPortNumSlow() int
- func (msi *MonitorSystemInfo) GetSystemName() string
- func (msi *MonitorSystemInfo) GetSystemType() int
- func (msi *MonitorSystemInfo) Identity() int
- func (msi *MonitorSystemInfo) MarshalJSON() ([]byte, error)
- func (msi *MonitorSystemInfo) MarshalJSONWithFields(fields ...string) ([]byte, error)
- func (msi *MonitorSystemInfo) Set(fields map[string]interface{}) error
- type MonitorSystemRepo
- func (msr *MonitorSystemRepo) Create(monitorSystem metadata.MonitorSystem) (metadata.MonitorSystem, error)
- func (msr *MonitorSystemRepo) Delete(id int) error
- func (msr *MonitorSystemRepo) Execute(command string, args ...interface{}) (middleware.Result, error)
- func (msr *MonitorSystemRepo) GetAll() ([]metadata.MonitorSystem, error)
- func (msr *MonitorSystemRepo) GetByEnv(envID int) ([]metadata.MonitorSystem, error)
- func (msr *MonitorSystemRepo) GetByHostInfo(hostIP string, portNum int) (metadata.MonitorSystem, error)
- func (msr *MonitorSystemRepo) GetByID(id int) (metadata.MonitorSystem, error)
- func (msr *MonitorSystemRepo) GetID(monitorSystemHostIP string, monitorSystemPortNum int) (int, error)
- func (msr *MonitorSystemRepo) Transaction() (middleware.Transaction, error)
- func (msr *MonitorSystemRepo) Update(monitorSystem metadata.MonitorSystem) error
- type MonitorSystemService
- func (mss *MonitorSystemService) Create(fields map[string]interface{}) error
- func (mss *MonitorSystemService) Delete(id int) error
- func (mss *MonitorSystemService) GetAll() error
- func (mss *MonitorSystemService) GetByEnv(envID int) error
- func (mss *MonitorSystemService) GetByHostInfo(hostIP string, portNum int) error
- func (mss *MonitorSystemService) GetByID(id int) error
- func (mss *MonitorSystemService) GetMonitorSystems() []metadata.MonitorSystem
- func (mss *MonitorSystemService) Marshal() ([]byte, error)
- func (mss *MonitorSystemService) MarshalWithFields(fields ...string) ([]byte, error)
- func (mss *MonitorSystemService) Update(id int, fields map[string]interface{}) error
- type MySQLClusterInfo
- func (mci *MySQLClusterInfo) AddUser(userID int) error
- func (mci *MySQLClusterInfo) Delete()
- func (mci *MySQLClusterInfo) DeleteUser(userID int) error
- func (mci *MySQLClusterInfo) GetAllUsers() ([]metadata.User, error)
- func (mci *MySQLClusterInfo) GetAppUsers() ([]metadata.User, error)
- func (mci *MySQLClusterInfo) GetClusterName() string
- func (mci *MySQLClusterInfo) GetCreateTime() time.Time
- func (mci *MySQLClusterInfo) GetDBUsers() ([]metadata.User, error)
- func (mci *MySQLClusterInfo) GetDBs() ([]metadata.DB, error)
- func (mci *MySQLClusterInfo) GetDelFlag() int
- func (mci *MySQLClusterInfo) GetEnvID() int
- func (mci *MySQLClusterInfo) GetLastUpdateTime() time.Time
- func (mci *MySQLClusterInfo) GetMasterServers() ([]metadata.MySQLServer, error)
- func (mci *MySQLClusterInfo) GetMiddlewareClusterID() int
- func (mci *MySQLClusterInfo) GetMonitorSystemID() int
- func (mci *MySQLClusterInfo) GetMySQLServers() ([]metadata.MySQLServer, error)
- func (mci *MySQLClusterInfo) GetResourceGroup() (metadata.ResourceGroup, error)
- func (mci *MySQLClusterInfo) GetUsers() ([]metadata.User, error)
- func (mci *MySQLClusterInfo) Identity() int
- func (mci *MySQLClusterInfo) MarshalJSON() ([]byte, error)
- func (mci *MySQLClusterInfo) MarshalJSONWithFields(fields ...string) ([]byte, error)
- func (mci *MySQLClusterInfo) Set(fields map[string]interface{}) error
- type MySQLClusterRepo
- func (mcr *MySQLClusterRepo) AddUser(mysqlClusterID, userID int) error
- func (mcr *MySQLClusterRepo) Create(mysqlCluster metadata.MySQLCluster) (metadata.MySQLCluster, error)
- func (mcr *MySQLClusterRepo) Delete(id int) error
- func (mcr *MySQLClusterRepo) DeleteUser(mysqlClusterID, userID int) error
- func (mcr *MySQLClusterRepo) Execute(command string, args ...interface{}) (middleware.Result, error)
- func (mcr *MySQLClusterRepo) GetAll() ([]metadata.MySQLCluster, error)
- func (mcr *MySQLClusterRepo) GetAllUsersByID(id int) ([]metadata.User, error)
- func (mcr *MySQLClusterRepo) GetAppUsersByID(id int) ([]metadata.User, error)
- func (mcr *MySQLClusterRepo) GetByEnv(envID int) ([]metadata.MySQLCluster, error)
- func (mcr *MySQLClusterRepo) GetByID(id int) (metadata.MySQLCluster, error)
- func (mcr *MySQLClusterRepo) GetByName(clusterName string) (metadata.MySQLCluster, error)
- func (mcr *MySQLClusterRepo) GetDBUsersByID(id int) ([]metadata.User, error)
- func (mcr *MySQLClusterRepo) GetDBsByID(id int) ([]metadata.DB, error)
- func (mcr *MySQLClusterRepo) GetID(clusterName string) (int, error)
- func (mcr *MySQLClusterRepo) GetResourceGroupByID(id int) (metadata.ResourceGroup, error)
- func (mcr *MySQLClusterRepo) GetUsersByID(id int) ([]metadata.User, error)
- func (mcr *MySQLClusterRepo) Transaction() (middleware.Transaction, error)
- func (mcr *MySQLClusterRepo) Update(entity metadata.MySQLCluster) error
- type MySQLClusterService
- func (mcs *MySQLClusterService) AddUser(mysqlClusterID, userID int) error
- func (mcs *MySQLClusterService) Create(fields map[string]interface{}) error
- func (mcs *MySQLClusterService) Delete(id int) error
- func (mcs *MySQLClusterService) DeleteUser(mysqlClusterID, userID int) error
- func (mcs *MySQLClusterService) GetAll() error
- func (mcs *MySQLClusterService) GetAllUsersByID(id int) error
- func (mcs *MySQLClusterService) GetAppUsersByID(id int) error
- func (mcs *MySQLClusterService) GetByEnv(envID int) error
- func (mcs *MySQLClusterService) GetByID(id int) error
- func (mcs *MySQLClusterService) GetByName(clusterName string) error
- func (mcs *MySQLClusterService) GetDBUsersByID(id int) error
- func (mcs *MySQLClusterService) GetDBs() []metadata.DB
- func (mcs *MySQLClusterService) GetDBsByID(id int) error
- func (mcs *MySQLClusterService) GetMasterServersByID(id int) error
- func (mcs *MySQLClusterService) GetMySQLClusters() []metadata.MySQLCluster
- func (mcs *MySQLClusterService) GetMySQLServers() []metadata.MySQLServer
- func (mcs *MySQLClusterService) GetMySQLServersByID(id int) error
- func (mcs *MySQLClusterService) GetResourceGroup() metadata.ResourceGroup
- func (mcs *MySQLClusterService) GetResourceGroupByID(id int) error
- func (mcs *MySQLClusterService) GetUsers() []metadata.User
- func (mcs *MySQLClusterService) GetUsersByID(id int) error
- func (mcs *MySQLClusterService) Marshal() ([]byte, error)
- func (mcs *MySQLClusterService) MarshalWithFields(fields ...string) ([]byte, error)
- func (mcs *MySQLClusterService) Update(id int, fields map[string]interface{}) error
- type MySQLServerInfo
- func (msi *MySQLServerInfo) Delete()
- func (msi *MySQLServerInfo) GetClusterID() int
- func (msi *MySQLServerInfo) GetCreateTime() time.Time
- func (msi *MySQLServerInfo) GetDelFlag() int
- func (msi *MySQLServerInfo) GetDeploymentType() int
- func (msi *MySQLServerInfo) GetHostIP() string
- func (msi *MySQLServerInfo) GetLastUpdateTime() time.Time
- func (msi *MySQLServerInfo) GetMonitorSystem() (metadata.MonitorSystem, error)
- func (msi *MySQLServerInfo) GetMySQLCluster() (metadata.MySQLCluster, error)
- func (msi *MySQLServerInfo) GetPortNum() int
- func (msi *MySQLServerInfo) GetServerName() string
- func (msi *MySQLServerInfo) GetServiceName() string
- func (msi *MySQLServerInfo) GetVersion() string
- func (msi *MySQLServerInfo) Identity() int
- func (msi *MySQLServerInfo) IsMaster() (bool, error)
- func (msi *MySQLServerInfo) MarshalJSON() ([]byte, error)
- func (msi *MySQLServerInfo) MarshalJSONWithFields(fields ...string) ([]byte, error)
- func (msi *MySQLServerInfo) Set(fields map[string]interface{}) error
- type MySQLServerRepo
- func (msr *MySQLServerRepo) Create(mysqlServer metadata.MySQLServer) (metadata.MySQLServer, error)
- func (msr *MySQLServerRepo) Delete(id int) error
- func (msr *MySQLServerRepo) Execute(command string, args ...interface{}) (middleware.Result, error)
- func (msr *MySQLServerRepo) GetAll() ([]metadata.MySQLServer, error)
- func (msr *MySQLServerRepo) GetByClusterID(clusterID int) ([]metadata.MySQLServer, error)
- func (msr *MySQLServerRepo) GetByHostInfo(hostIP string, portNum int) (metadata.MySQLServer, error)
- func (msr *MySQLServerRepo) GetByID(id int) (metadata.MySQLServer, error)
- func (msr *MySQLServerRepo) GetID(hostIP string, portNum int) (int, error)
- func (msr *MySQLServerRepo) GetMonitorSystem(id int) (metadata.MonitorSystem, error)
- func (msr *MySQLServerRepo) GetMySQLClusterByID(id int) (metadata.MySQLCluster, error)
- func (msr *MySQLServerRepo) IsMaster(hostIP string, portNum int) (bool, error)
- func (msr *MySQLServerRepo) Transaction() (middleware.Transaction, error)
- func (msr *MySQLServerRepo) Update(mysqlServer metadata.MySQLServer) error
- type MySQLServerService
- func (mss *MySQLServerService) Create(fields map[string]interface{}) error
- func (mss *MySQLServerService) Delete(id int) error
- func (mss *MySQLServerService) GetAll() error
- func (mss *MySQLServerService) GetByClusterID(clusterID int) error
- func (mss *MySQLServerService) GetByHostInfo(hostIP string, portNum int) error
- func (mss *MySQLServerService) GetByID(id int) error
- func (mss *MySQLServerService) GetMySQLCluster() metadata.MySQLCluster
- func (mss *MySQLServerService) GetMySQLClusterByID(id int) error
- func (mss *MySQLServerService) GetMySQLServers() []metadata.MySQLServer
- func (mss *MySQLServerService) IsMaster(hostIP string, portNum int) (bool, error)
- func (mss *MySQLServerService) Marshal() ([]byte, error)
- func (mss *MySQLServerService) MarshalWithFields(fields ...string) ([]byte, error)
- func (mss *MySQLServerService) Update(id int, fields map[string]interface{}) error
- type ResourceGroupInfo
- func (rgi *ResourceGroupInfo) AddMiddlewareCluster(mysqlClusterID int) error
- func (rgi *ResourceGroupInfo) AddMySQLCluster(mysqlClusterID int) error
- func (rgi *ResourceGroupInfo) AddResourceRole(resourceRoleID int) error
- func (rgi *ResourceGroupInfo) Delete()
- func (rgi *ResourceGroupInfo) DeleteMiddlewareCluster(middlewareClusterID int) error
- func (rgi *ResourceGroupInfo) DeleteMySQLCluster(mysqlClusterID int) error
- func (rgi *ResourceGroupInfo) DeleteResourceRole(middlewareClusterID int) error
- func (rgi *ResourceGroupInfo) GetCreateTime() time.Time
- func (rgi *ResourceGroupInfo) GetDASAdminUsers() ([]metadata.User, error)
- func (rgi *ResourceGroupInfo) GetDelFlag() int
- func (rgi *ResourceGroupInfo) GetGroupName() string
- func (rgi *ResourceGroupInfo) GetGroupUUID() string
- func (rgi *ResourceGroupInfo) GetLastUpdateTime() time.Time
- func (rgi *ResourceGroupInfo) GetMiddlewareClusters() ([]metadata.MiddlewareCluster, error)
- func (rgi *ResourceGroupInfo) GetMiddlewareServers() ([]metadata.MiddlewareServer, error)
- func (rgi *ResourceGroupInfo) GetMySQLClusters() ([]metadata.MySQLCluster, error)
- func (rgi *ResourceGroupInfo) GetMySQLServers() ([]metadata.MySQLServer, error)
- func (rgi *ResourceGroupInfo) GetResourceGroupRepo() metadata.ResourceGroupRepo
- func (rgi *ResourceGroupInfo) GetResourceRoles() ([]metadata.ResourceRole, error)
- func (rgi *ResourceGroupInfo) GetUsers() ([]metadata.User, error)
- func (rgi *ResourceGroupInfo) Identity() int
- func (rgi *ResourceGroupInfo) MarshalJSON() ([]byte, error)
- func (rgi *ResourceGroupInfo) MarshalJSONWithFields(fields ...string) ([]byte, error)
- func (rgi *ResourceGroupInfo) Set(fields map[string]interface{}) error
- type ResourceGroupRepo
- func (rgr *ResourceGroupRepo) AddMiddlewareCluster(resourceGroupID int, middlewareClusterID int) error
- func (rgr *ResourceGroupRepo) AddMySQLCluster(resourceGroupID int, mysqlClusterID int) error
- func (rgr *ResourceGroupRepo) AddResourceRole(resourceGroupID int, resourceRoleID int) error
- func (rgr *ResourceGroupRepo) Create(rg metadata.ResourceGroup) (metadata.ResourceGroup, error)
- func (rgr *ResourceGroupRepo) Delete(id int) error
- func (rgr *ResourceGroupRepo) DeleteMiddlewareCluster(resourceGroupID, middlewareClusterID int) error
- func (rgr *ResourceGroupRepo) DeleteMySQLCluster(resourceGroupID, mysqlClusterID int) error
- func (rgr *ResourceGroupRepo) DeleteResourceRole(resourceGroupID, resourceRoleID int) error
- func (rgr *ResourceGroupRepo) Execute(command string, args ...interface{}) (middleware.Result, error)
- func (rgr *ResourceGroupRepo) GetAll() ([]metadata.ResourceGroup, error)
- func (rgr *ResourceGroupRepo) GetByGroupUUID(groupUUID string) (metadata.ResourceGroup, error)
- func (rgr *ResourceGroupRepo) GetByID(id int) (metadata.ResourceGroup, error)
- func (rgr *ResourceGroupRepo) GetDASAdminUsersByID(id int) ([]metadata.User, error)
- func (rgr *ResourceGroupRepo) GetID(groupUUID string) (int, error)
- func (rgr *ResourceGroupRepo) GetMiddlewareClustersByID(id int) ([]metadata.MiddlewareCluster, error)
- func (rgr *ResourceGroupRepo) GetMiddlewareServersByID(id int) ([]metadata.MiddlewareServer, error)
- func (rgr *ResourceGroupRepo) GetMySQLClustersByID(id int) ([]metadata.MySQLCluster, error)
- func (rgr *ResourceGroupRepo) GetMySQLServersByID(id int) ([]metadata.MySQLServer, error)
- func (rgr *ResourceGroupRepo) GetResourceRolesByID(id int) ([]metadata.ResourceRole, error)
- func (rgr *ResourceGroupRepo) GetUsersByID(id int) ([]metadata.User, error)
- func (rgr *ResourceGroupRepo) Transaction() (middleware.Transaction, error)
- func (rgr *ResourceGroupRepo) Update(rg metadata.ResourceGroup) error
- type ResourceGroupService
- func (rgs *ResourceGroupService) AddMiddlewareCluster(resourceGroupID int, middlewareClusterID int) error
- func (rgs *ResourceGroupService) AddMySQLCluster(resourceGroupID int, mysqlClusterID int) error
- func (rgs *ResourceGroupService) AddResourceRole(resourceGroupID int, resourceRoleID int) error
- func (rgs *ResourceGroupService) Create(fields map[string]interface{}) error
- func (rgs *ResourceGroupService) Delete(id int) error
- func (rgs *ResourceGroupService) DeleteMiddlewareCluster(resourceGroupID int, middlewareClusterID int) error
- func (rgs *ResourceGroupService) DeleteMySQLCluster(resourceGroupID int, mysqlClusterID int) error
- func (rgs *ResourceGroupService) DeleteResourceRole(resourceGroupID int, resourceRoleID int) error
- func (rgs *ResourceGroupService) GetAll() error
- func (rgs *ResourceGroupService) GetByGroupUUID(groupUUID string) error
- func (rgs *ResourceGroupService) GetByID(id int) error
- func (rgs *ResourceGroupService) GetDASAdminUsersByGroupUUID(groupUUID string) error
- func (rgs *ResourceGroupService) GetDASAdminUsersByID(id int) error
- func (rgs *ResourceGroupService) GetMiddlewareClusters() []metadata.MiddlewareCluster
- func (rgs *ResourceGroupService) GetMiddlewareClustersByGroupUUID(groupUUID string) error
- func (rgs *ResourceGroupService) GetMiddlewareClustersByID(id int) error
- func (rgs *ResourceGroupService) GetMiddlewareServers() []metadata.MiddlewareServer
- func (rgs *ResourceGroupService) GetMiddlewareServersByGroupUUID(groupUUID string) error
- func (rgs *ResourceGroupService) GetMiddlewareServersByID(id int) error
- func (rgs *ResourceGroupService) GetMySQLClusters() []metadata.MySQLCluster
- func (rgs *ResourceGroupService) GetMySQLClustersByGroupUUID(groupUUID string) error
- func (rgs *ResourceGroupService) GetMySQLClustersByID(id int) error
- func (rgs *ResourceGroupService) GetMySQLServers() []metadata.MySQLServer
- func (rgs *ResourceGroupService) GetMySQLServersByGroupUUID(groupUUID string) error
- func (rgs *ResourceGroupService) GetMySQLServersByID(id int) error
- func (rgs *ResourceGroupService) GetResourceGroups() []metadata.ResourceGroup
- func (rgs *ResourceGroupService) GetResourceRoles() []metadata.ResourceRole
- func (rgs *ResourceGroupService) GetResourceRolesByGroupUUID(groupUUID string) error
- func (rgs *ResourceGroupService) GetResourceRolesByID(id int) error
- func (rgs *ResourceGroupService) GetUsers() []metadata.User
- func (rgs *ResourceGroupService) GetUsersByGroupUUID(groupUUID string) error
- func (rgs *ResourceGroupService) GetUsersByID(id int) error
- func (rgs *ResourceGroupService) Marshal() ([]byte, error)
- func (rgs *ResourceGroupService) MarshalWithFields(fields ...string) ([]byte, error)
- func (rgs *ResourceGroupService) Update(id int, fields map[string]interface{}) error
- type ResourceRoleInfo
- func (rri *ResourceRoleInfo) AddResourceGroup(resourceGroupID int) error
- func (rri *ResourceRoleInfo) AddUser(userID int) error
- func (rri *ResourceRoleInfo) Delete()
- func (rri *ResourceRoleInfo) DeleteResourceGroup(resourceGroupID int) error
- func (rri *ResourceRoleInfo) DeleteUser(userID int) error
- func (rri *ResourceRoleInfo) GetCreateTime() time.Time
- func (rri *ResourceRoleInfo) GetDelFlag() int
- func (rri *ResourceRoleInfo) GetLastUpdateTime() time.Time
- func (rri *ResourceRoleInfo) GetResourceGroups() ([]metadata.ResourceGroup, error)
- func (rri *ResourceRoleInfo) GetRoleName() string
- func (rri *ResourceRoleInfo) GetRoleUUID() string
- func (rri *ResourceRoleInfo) GetUsers() ([]metadata.User, error)
- func (rri *ResourceRoleInfo) Identity() int
- func (rri *ResourceRoleInfo) MarshalJSON() ([]byte, error)
- func (rri *ResourceRoleInfo) MarshalJSONWithFields(fields ...string) ([]byte, error)
- func (rri *ResourceRoleInfo) Set(fields map[string]interface{}) error
- type ResourceRoleRepo
- func (rrr *ResourceRoleRepo) AddResourceGroup(resourceRoleID int, resourceGroupID int) error
- func (rrr *ResourceRoleRepo) AddUser(resourceRoleID int, userID int) error
- func (rrr *ResourceRoleRepo) Create(resourceRole metadata.ResourceRole) (metadata.ResourceRole, error)
- func (rrr *ResourceRoleRepo) Delete(id int) error
- func (rrr *ResourceRoleRepo) DeleteResourceGroup(resourceRoleID int, resourceGroupID int) error
- func (rrr *ResourceRoleRepo) DeleteUser(resourceRoleID int, userID int) error
- func (rrr *ResourceRoleRepo) Execute(command string, args ...interface{}) (middleware.Result, error)
- func (rrr *ResourceRoleRepo) GetAll() ([]metadata.ResourceRole, error)
- func (rrr *ResourceRoleRepo) GetByID(id int) (metadata.ResourceRole, error)
- func (rrr *ResourceRoleRepo) GetByRoleUUID(roleUUID string) (metadata.ResourceRole, error)
- func (rrr *ResourceRoleRepo) GetID(roleUUID string) (int, error)
- func (rrr *ResourceRoleRepo) GetResourceGroupsByID(id int) ([]metadata.ResourceGroup, error)
- func (rrr *ResourceRoleRepo) GetUsersByID(id int) ([]metadata.User, error)
- func (rrr *ResourceRoleRepo) Transaction() (middleware.Transaction, error)
- func (rrr *ResourceRoleRepo) Update(entity metadata.ResourceRole) error
- type ResourceRoleService
- func (rrs *ResourceRoleService) AddResourceGroup(resourceRoleID int, resourceGroupID int) error
- func (rrs *ResourceRoleService) AddUser(resourceRoleID, userID int) error
- func (rrs *ResourceRoleService) Create(fields map[string]interface{}) error
- func (rrs *ResourceRoleService) Delete(id int) error
- func (rrs *ResourceRoleService) DeleteResourceGroup(resourceRoleID int, resourceGroupID int) error
- func (rrs *ResourceRoleService) DeleteUser(resourceRoleID, userID int) error
- func (rrs *ResourceRoleService) GetAll() error
- func (rrs *ResourceRoleService) GetByID(id int) error
- func (rrs *ResourceRoleService) GetByRoleUUID(groupUUID string) error
- func (rrs *ResourceRoleService) GetResourceGroups() []metadata.ResourceGroup
- func (rrs *ResourceRoleService) GetResourceGroupsByID(id int) error
- func (rrs *ResourceRoleService) GetResourceRoles() []metadata.ResourceRole
- func (rrs *ResourceRoleService) GetUsers() []metadata.User
- func (rrs *ResourceRoleService) GetUsersByID(id int) error
- func (rrs *ResourceRoleService) GetUsersByRoleUUID(roleUUID string) error
- func (rrs *ResourceRoleService) Marshal() ([]byte, error)
- func (rrs *ResourceRoleService) MarshalWithFields(fields ...string) ([]byte, error)
- func (rrs *ResourceRoleService) Update(id int, fields map[string]interface{}) error
- type TableInfo
- func (ti *TableInfo) GetCreateStatement() (string, error)
- func (ti *TableInfo) GetDBName() string
- func (ti *TableInfo) GetIndexStatistics() ([]metadata.IndexStatistic, error)
- func (ti *TableInfo) GetTableName() string
- func (ti *TableInfo) GetTableStatistics() ([]metadata.TableStatistic, error)
- func (ti *TableInfo) MarshalJSON() ([]byte, error)
- func (ti *TableInfo) MarshalJSONWithFields(fields ...string) ([]byte, error)
- type TableRepo
- func (tr *TableRepo) AnalyzeTableByDBNameAndTableName(dbName, tableName string) error
- func (tr *TableRepo) Close() error
- func (tr *TableRepo) Execute(command string, args ...interface{}) (middleware.Result, error)
- func (tr *TableRepo) GetByDBName(dbName string) ([]metadata.Table, error)
- func (tr *TableRepo) GetCreateStatement(dbName, tableName string) (string, error)
- func (tr *TableRepo) GetIndexStatistics(dbName, tableName string) ([]metadata.IndexStatistic, error)
- func (tr *TableRepo) GetStatisticsByDBNameAndTableName(dbName string, tableName string) ([]metadata.TableStatistic, []metadata.IndexStatistic, string, error)
- func (tr *TableRepo) GetTableStatistics(dbName, tableName string) ([]metadata.TableStatistic, error)
- func (tr *TableRepo) InitMySQLConn(hostIP string, portNum int, dbName string) error
- type TableService
- func (ts *TableService) AnalyzeTableByDBIDAndTableName(dbID int, tableName string) error
- func (ts *TableService) AnalyzeTableByHostInfoAndDBNameAndTableName(hostIP string, portNum int, dbName, tableName string) error
- func (ts *TableService) GetByDBID(dbID int) error
- func (ts *TableService) GetCreateStatement() string
- func (ts *TableService) GetIndexStatistics() []metadata.IndexStatistic
- func (ts *TableService) GetStatisticsByDBIDAndTableName(dbID int, tableName string) error
- func (ts *TableService) GetStatisticsByHostInfoAndDBNameAndTableName(hostIP string, portNum int, dbName, tableName string) error
- func (ts *TableService) GetTableStatistics() []metadata.TableStatistic
- func (ts *TableService) GetTables() []metadata.Table
- func (ts *TableService) Marshal() ([]byte, error)
- func (ts *TableService) MarshalWithFields(fields ...string) ([]byte, error)
- type TableStatistic
- func (ts *TableStatistic) GetAutoIncrement() int
- func (ts *TableStatistic) GetAvgRowLength() int
- func (ts *TableStatistic) GetCharSet() string
- func (ts *TableStatistic) GetCollation() string
- func (ts *TableStatistic) GetCreateTime() time.Time
- func (ts *TableStatistic) GetDBName() string
- func (ts *TableStatistic) GetEngine() string
- func (ts *TableStatistic) GetSize() int
- func (ts *TableStatistic) GetSizeMB() float64
- func (ts *TableStatistic) GetTableName() string
- func (ts *TableStatistic) GetTableRows() int
- func (ts *TableStatistic) MarshalJSON() ([]byte, error)
- type UserInfo
- func (ui *UserInfo) Delete()
- func (ui *UserInfo) GetAccountName() string
- func (ui *UserInfo) GetAllMySQLServers() ([]metadata.MySQLServer, error)
- func (ui *UserInfo) GetCreateTime() time.Time
- func (ui *UserInfo) GetDelFlag() int
- func (ui *UserInfo) GetDepartmentName() string
- func (ui *UserInfo) GetEmail() string
- func (ui *UserInfo) GetEmployeeID() string
- func (ui *UserInfo) GetLastUpdateTime() time.Time
- func (ui *UserInfo) GetMobile() string
- func (ui *UserInfo) GetRole() int
- func (ui *UserInfo) GetTelephone() string
- func (ui *UserInfo) GetUserName() string
- func (ui *UserInfo) Identity() int
- func (ui *UserInfo) MarshalJSON() ([]byte, error)
- func (ui *UserInfo) MarshalJSONWithFields(fields ...string) ([]byte, error)
- func (ui *UserInfo) Set(fields map[string]interface{}) error
- type UserRepo
- func (ur *UserRepo) Create(user metadata.User) (metadata.User, error)
- func (ur *UserRepo) Delete(id int) error
- func (ur *UserRepo) Execute(command string, args ...interface{}) (middleware.Result, error)
- func (ur *UserRepo) GetAll() ([]metadata.User, error)
- func (ur *UserRepo) GetAllMySQLServersByUserID(id int) ([]metadata.MySQLServer, error)
- func (ur *UserRepo) GetAppsByUserID(userID int) ([]metadata.App, error)
- func (ur *UserRepo) GetByAccountName(accountName string) (metadata.User, error)
- func (ur *UserRepo) GetByAccountNameOrEmployeeID(loginName string) (metadata.User, error)
- func (ur *UserRepo) GetByEmail(email string) (metadata.User, error)
- func (ur *UserRepo) GetByEmployeeID(employeeID string) (metadata.User, error)
- func (ur *UserRepo) GetByID(id int) (metadata.User, error)
- func (ur *UserRepo) GetByMobile(mobile string) (metadata.User, error)
- func (ur *UserRepo) GetByTelephone(telephone string) (metadata.User, error)
- func (ur *UserRepo) GetByUserName(userName string) ([]metadata.User, error)
- func (ur *UserRepo) GetDBsByUserID(userID int) ([]metadata.DB, error)
- func (ur *UserRepo) GetID(accountName string) (int, error)
- func (ur *UserRepo) GetMiddlewareClustersByUserID(userID int) ([]metadata.MiddlewareCluster, error)
- func (ur *UserRepo) GetMySQLClustersByUserID(userID int) ([]metadata.MySQLCluster, error)
- func (ur *UserRepo) Transaction() (middleware.Transaction, error)
- func (ur *UserRepo) Update(user metadata.User) error
- type UserService
- func (us *UserService) Create(fields map[string]interface{}) error
- func (us *UserService) Delete(id int) error
- func (us *UserService) GetAll() error
- func (us *UserService) GetAllMySQLServersByUserID(id int) error
- func (us *UserService) GetApps() []metadata.App
- func (us *UserService) GetAppsByUserID(userID int) error
- func (us *UserService) GetByAccountName(accountName string) error
- func (us *UserService) GetByAccountNameOrEmployeeID(loginName string) error
- func (us *UserService) GetByEmail(email string) error
- func (us *UserService) GetByEmployeeID(employeeID string) error
- func (us *UserService) GetByID(id int) error
- func (us *UserService) GetByMobile(mobile string) error
- func (us *UserService) GetByTelephone(telephone string) error
- func (us *UserService) GetByUserName(userName string) error
- func (us *UserService) GetDBs() []metadata.DB
- func (us *UserService) GetDBsByUserID(userID int) error
- func (us *UserService) GetMiddlewareClusters() []metadata.MiddlewareCluster
- func (us *UserService) GetMiddlewareClustersByUserID(userID int) error
- func (us *UserService) GetMySQLClusters() []metadata.MySQLCluster
- func (us *UserService) GetMySQLClustersByUserID(userID int) error
- func (us *UserService) GetMySQLServers() []metadata.MySQLServer
- func (us *UserService) GetUsers() []metadata.User
- func (us *UserService) Marshal() ([]byte, error)
- func (us *UserService) MarshalWithFields(fields ...string) ([]byte, error)
- func (us *UserService) Update(id int, fields map[string]interface{}) error
Constants ¶
const ( ClusterTypeSingle = 1 ClusterTypeShard = 2 )
Cluster type code
Variables ¶
This section is empty.
Functions ¶
func NewAppInfo ¶
func NewAppInfo(repo metadata.AppRepo, id int, appName string, level int, delFlag int, createTime time.Time, lastUpdateTime time.Time) metadata.App
NewAppInfo returns a new AppInfo
func NewAppInfoWithDefault ¶
NewAppInfoWithDefault returns a new AppInfo with default value
func NewAppInfoWithGlobal ¶
func NewAppInfoWithGlobal(id int, appName string, level int, delFlag int, createTime time.Time, lastUpdateTime time.Time) metadata.App
NewAppInfoWithGlobal NewAppInfo returns a new AppInfo with default AppRepo
func NewAppInfoWithMapAndRandom ¶
NewAppInfoWithMapAndRandom returns a new *AppInfoInfo with given map
func NewAppRepo ¶
func NewAppRepo(db middleware.Pool) metadata.AppRepo
NewAppRepo returns *AppRepo with given middleware.Pool
func NewAppRepoWithGlobal ¶
NewAppRepoWithGlobal returns *AppRepo with global mysql pool
func NewAppService ¶
func NewAppService(repo metadata.AppRepo) metadata.AppService
NewAppService returns a new *AppService
func NewAppServiceWithDefault ¶
func NewAppServiceWithDefault() metadata.AppService
NewAppServiceWithDefault returns a new *AppService with default repository
func NewDBInfo ¶
func NewDBInfo(repo *DBRepo, id int, dbName string, clusterID int, clusterType int, envID int, delFlag int, createTime time.Time, lastUpdateTime time.Time) metadata.DB
NewDBInfo returns a new metadata.App
func NewDBInfoWithDefault ¶
NewDBInfoWithDefault returns a new metadata.DB with default DBRepo
func NewDBInfoWithGlobal ¶
func NewDBInfoWithGlobal(id int, dbName string, clusterID, clusterType, envID, delFlag int, createTime, lastUpdateTime time.Time) metadata.DB
NewDBInfoWithGlobal NewDBInfo returns a new DBInfo with default DBRepo
func NewDBInfoWithMapAndRandom ¶
NewDBInfoWithMapAndRandom returns a new metadata.DB with given map
func NewDBRepo ¶
func NewDBRepo(db middleware.Pool) metadata.DBRepo
NewDBRepo returns metadata.DBRepo with given middleware.Pool
func NewDBRepoWithGlobal ¶
NewDBRepoWithGlobal returns metadata.DBRepo with global mysql pool
func NewDBService ¶
NewDBService returns a new metadata.DBService
func NewDBServiceWithDefault ¶
NewDBServiceWithDefault returns a new metadata.DBService with default repository
func NewEmptyAppInfoWithGlobal ¶
NewEmptyAppInfoWithGlobal return a new AppInfo
func NewEmptyDBInfoWithGlobal ¶
NewEmptyDBInfoWithGlobal return a new DBInfo
func NewEmptyDBInfoWithRepo ¶
NewEmptyDBInfoWithRepo return a new DBInfo
func NewEmptyEnvInfoWithGlobal ¶
NewEmptyEnvInfoWithGlobal returns a new metadata.Env with global repository
func NewEmptyMiddlewareClusterInfoWithGlobal ¶
func NewEmptyMiddlewareClusterInfoWithGlobal() metadata.MiddlewareCluster
NewEmptyMiddlewareClusterInfoWithGlobal return a new MiddlewareClusterInfo
func NewEmptyMiddlewareServerInfoWithGlobal ¶
func NewEmptyMiddlewareServerInfoWithGlobal() metadata.MiddlewareServer
NewEmptyMiddlewareServerInfoWithGlobal returns a new MiddlewareServer with default MiddlewareServerRepo
func NewEmptyMonitorSystemInfoWithGlobal ¶
func NewEmptyMonitorSystemInfoWithGlobal() metadata.MonitorSystem
NewEmptyMonitorSystemInfoWithGlobal return a new MonitorSystemInfo
func NewEmptyMySQLClusterInfoWithGlobal ¶
func NewEmptyMySQLClusterInfoWithGlobal() metadata.MySQLCluster
NewEmptyMySQLClusterInfoWithGlobal returns a new MySQLClusterInfo with default MySQLClusterRepo
func NewEmptyMySQLServerInfoWithGlobal ¶
func NewEmptyMySQLServerInfoWithGlobal() metadata.MySQLServer
NewEmptyMySQLServerInfoWithGlobal returns a new MySQLServerInfo with default MySQLServerRepo
func NewEmptyResourceGroupInfoWithGlobal ¶ added in v1.1.1
func NewEmptyResourceGroupInfoWithGlobal() metadata.ResourceGroup
NewEmptyResourceGroupInfoWithGlobal returns a new ResourceGroupInfo with default ResourceGroupRepo
func NewEmptyResourceRoleInfoWithGlobal ¶ added in v1.1.1
func NewEmptyResourceRoleInfoWithGlobal() metadata.ResourceRole
NewEmptyResourceRoleInfoWithGlobal returns a new ResourceRoleInfo with default ResourceRoleRepo
func NewEmptyUserInfoWithGlobal ¶
NewEmptyUserInfoWithGlobal return userinfo
func NewEnvInfo ¶
func NewEnvInfo(repo metadata.EnvRepo, id int, envName string, delFlag int, createTime time.Time, lastUpdateTime time.Time) metadata.Env
NewEnvInfo returns a new metadata.Env
func NewEnvInfoWithDefault ¶
NewEnvInfoWithDefault returns a new metadata.Env with default EnvRepo
func NewEnvInfoWithGlobal ¶
func NewEnvInfoWithGlobal(id int, envName string, delFlag int, createTime time.Time, lastUpdateTime time.Time) metadata.Env
NewEnvInfoWithGlobal returns a new metadata.Env with default EnvRepo
func NewEnvInfoWithMapAndRandom ¶
NewEnvInfoWithMapAndRandom returns a new metadata.Env with given map
func NewEnvRepo ¶
func NewEnvRepo(db middleware.Pool) metadata.EnvRepo
NewEnvRepo returns metadata.EnvRepo with given middleware.Pool
func NewEnvRepoWithGlobal ¶
NewEnvRepoWithGlobal returns metadata.EnvRepo with global mysql pool
func NewEnvService ¶
func NewEnvService(repo metadata.EnvRepo) metadata.EnvService
NewEnvService returns a new metadata.EnvService
func NewEnvServiceWithDefault ¶
func NewEnvServiceWithDefault() metadata.EnvService
NewEnvServiceWithDefault returns a new metadata.EnvService with default EnvRepo
func NewGroupResourceInfoWithMapAndRandom ¶ added in v1.1.1
func NewGroupResourceInfoWithMapAndRandom(fields map[string]interface{}) (metadata.ResourceGroup, error)
NewGroupResourceInfoWithMapAndRandom returns a new metadata.ResourceGroup with given map
func NewMiddlewareClusterInfo ¶
func NewMiddlewareClusterInfo(repo metadata.MiddlewareClusterRepo, id int, middlewareClusterName string, envID int, delFlag int, createTime time.Time, lastUpdateTime time.Time) metadata.MiddlewareCluster
NewMiddlewareClusterInfo returns a new MiddlewareClusterInfo
func NewMiddlewareClusterInfoWithDefault ¶
func NewMiddlewareClusterInfoWithDefault(middlewareClusterName string, envID int) metadata.MiddlewareCluster
NewMiddlewareClusterInfoWithDefault returns a new MiddlewareClusterInfo with default MiddlewareClusterRepo
func NewMiddlewareClusterInfoWithGlobal ¶
func NewMiddlewareClusterInfoWithGlobal(id int, middlewareClusterName string, envID int, delFlag int, createTime time.Time, lastUpdateTime time.Time) metadata.MiddlewareCluster
NewMiddlewareClusterInfoWithGlobal returns a new MiddlewareClusterInfo with default MiddlewareClusterRepo
func NewMiddlewareClusterInfoWithMapAndRandom ¶
func NewMiddlewareClusterInfoWithMapAndRandom(fields map[string]interface{}) (metadata.MiddlewareCluster, error)
NewMiddlewareClusterInfoWithMapAndRandom returns a new metadata.MiddlewareClusterInfo with given map
func NewMiddlewareClusterRepo ¶
func NewMiddlewareClusterRepo(db middleware.Pool) metadata.MiddlewareClusterRepo
NewMiddlewareClusterRepo returns metadata.MiddlewareClusterRepo with given middleware.Pool
func NewMiddlewareClusterRepoWithGlobal ¶
func NewMiddlewareClusterRepoWithGlobal() metadata.MiddlewareClusterRepo
NewMiddlewareClusterRepoWithGlobal returns metadata.MiddlewareClusterRepo with global mysql pool
func NewMiddlewareClusterService ¶
func NewMiddlewareClusterService(repo metadata.MiddlewareClusterRepo) metadata.MiddlewareClusterService
NewMiddlewareClusterService returns a new metadata.MiddlewareClusterService
func NewMiddlewareClusterServiceWithDefault ¶
func NewMiddlewareClusterServiceWithDefault() metadata.MiddlewareClusterService
NewMiddlewareClusterServiceWithDefault returns a new metadata.MiddlewareClusterService with default repository
func NewMiddlewareServerInfo ¶
func NewMiddlewareServerInfo(repo metadata.MiddlewareServerRepo, id int, clusterID int, serverName string, middlewareRole int, hostIP string, portNum int, delFlag int, createTime time.Time, lastUpdateTime time.Time) metadata.MiddlewareServer
NewMiddlewareServerInfo returns a new MiddlewareServerInfo
func NewMiddlewareServerInfoWithDefault ¶
func NewMiddlewareServerInfoWithDefault(clusterID int, serverName string, middlewareRole int, hostIP string, portNum int) metadata.MiddlewareServer
NewMiddlewareServerInfoWithDefault returns a new MiddlewareServerInfo with default MiddlewareServerRepo
func NewMiddlewareServerInfoWithGlobal ¶
func NewMiddlewareServerInfoWithGlobal(id int, clusterID int, serverName string, middlewareRole int, hostIP string, portNum int, delFlag int, createTime time.Time, lastUpdateTime time.Time) metadata.MiddlewareServer
NewMiddlewareServerInfoWithGlobal returns a new MiddlewareServerInfo with default MiddlewareServerRepo
func NewMiddlewareServerInfoWithMapAndRandom ¶
func NewMiddlewareServerInfoWithMapAndRandom(fields map[string]interface{}) (metadata.MiddlewareServer, error)
NewMiddlewareServerInfoWithMapAndRandom returns a new metadata.MiddlewareServer with given map
func NewMiddlewareServerRepo ¶
func NewMiddlewareServerRepo(db middleware.Pool) metadata.MiddlewareServerRepo
NewMiddlewareServerRepo returns metadata.MiddlewareServerRepo with given middleware.Pool
func NewMiddlewareServerRepoWithGlobal ¶
func NewMiddlewareServerRepoWithGlobal() metadata.MiddlewareServerRepo
NewMiddlewareServerRepoWithGlobal returns metadata.MiddlewareServerRepo with global mysql pool
func NewMiddlewareServerService ¶
func NewMiddlewareServerService(repo metadata.MiddlewareServerRepo) metadata.MiddlewareServerService
NewMiddlewareServerService returns a new metadata.MiddlewareServerService
func NewMiddlewareServerServiceWithDefault ¶
func NewMiddlewareServerServiceWithDefault() metadata.MiddlewareServerService
NewMiddlewareServerServiceWithDefault returns a new metadata.MiddlewareServerService with default repository
func NewMonitorSystemInfo ¶
func NewMonitorSystemInfo(repo *MonitorSystemRepo, id int, systemName string, systemType int, hostIP string, portNum int, portNumSlow int, baseURL string, envID int, delFlag int, createTime time.Time, lastUpdateTime time.Time) metadata.MonitorSystem
NewMonitorSystemInfo returns a new metadata.MonitorSystem
func NewMonitorSystemInfoWithDefault ¶
func NewMonitorSystemInfoWithDefault(systemName string, systemType int, hostIP string, portNum int, portNumSlow int, baseURL string, envID int) metadata.MonitorSystem
NewMonitorSystemInfoWithDefault returns a new metadata.MonitorSystem with default MonitorSystemRepo
func NewMonitorSystemInfoWithGlobal ¶
func NewMonitorSystemInfoWithGlobal(id int, systemName string, systemType int, hostIP string, portNum int, portNumSlow int, baseURL string, envID int, delFlag int, createTime time.Time, lastUpdateTime time.Time) metadata.MonitorSystem
NewMonitorSystemInfoWithGlobal NewMonitorSystemInfo returns a new MonitorSystemInfo with default MonitorSystemRepo
func NewMonitorSystemInfoWithMapAndRandom ¶
func NewMonitorSystemInfoWithMapAndRandom(fields map[string]interface{}) (metadata.MonitorSystem, error)
NewMonitorSystemInfoWithMapAndRandom returns a new metadata.MonitorSystem with given map
func NewMonitorSystemRepo ¶
func NewMonitorSystemRepo(db middleware.Pool) metadata.MonitorSystemRepo
NewMonitorSystemRepo returns metadata.MonitorSystemRepo with given middleware.Pool
func NewMonitorSystemRepoWithGlobal ¶
func NewMonitorSystemRepoWithGlobal() metadata.MonitorSystemRepo
NewMonitorSystemRepoWithGlobal returns metadata.MonitorSystemRepo with global mysql pool
func NewMonitorSystemService ¶
func NewMonitorSystemService(repo metadata.MonitorSystemRepo) metadata.MonitorSystemService
NewMonitorSystemService returns a new metadata.MonitorSystemService
func NewMonitorSystemServiceWithDefault ¶
func NewMonitorSystemServiceWithDefault() metadata.MonitorSystemService
NewMonitorSystemServiceWithDefault returns a new metadata.MonitorSystemService with default repository
func NewMySQLClusterInfo ¶
func NewMySQLClusterInfo(repo *MySQLClusterRepo, id int, clusterName string, middlewareClusterID int, monitorSystemID int, envID int, delFlag int, createTime, lastUpdateTime time.Time) metadata.MySQLCluster
NewMySQLClusterInfo returns a new MySQLClusterInfo
func NewMySQLClusterInfoWithDefault ¶
func NewMySQLClusterInfoWithDefault( clusterName string, envID int) metadata.MySQLCluster
NewMySQLClusterInfoWithDefault returns a new MySQLClusterInfo with default MySQLClusterRepo
func NewMySQLClusterInfoWithGlobal ¶
func NewMySQLClusterInfoWithGlobal( id int, clusterName string, middlewareClusterID int, monitorSystemID int, envID int, delFlag int, createTime, lastUpdateTime time.Time) metadata.MySQLCluster
NewMySQLClusterInfoWithGlobal returns a new MySQLClusterInfo with default MySQLClusterRepo
func NewMySQLClusterInfoWithMapAndRandom ¶
func NewMySQLClusterInfoWithMapAndRandom(fields map[string]interface{}) (metadata.MySQLCluster, error)
NewMySQLClusterInfoWithMapAndRandom returns a new metadata.MySQLCluster with given map
func NewMySQLClusterRepo ¶
func NewMySQLClusterRepo(db middleware.Pool) metadata.MySQLClusterRepo
NewMySQLClusterRepo returns metadata.MySQLClusterRepo with given middleware.Pool
func NewMySQLClusterRepoWithGlobal ¶
func NewMySQLClusterRepoWithGlobal() metadata.MySQLClusterRepo
NewMySQLClusterRepoWithGlobal returns metadata.MySQLClusterRepo with global mysql pool
func NewMySQLClusterService ¶
func NewMySQLClusterService(repo metadata.MySQLClusterRepo) metadata.MySQLClusterService
NewMySQLClusterService returns a new metadata.MySQLClusterService
func NewMySQLClusterServiceWithDefault ¶
func NewMySQLClusterServiceWithDefault() metadata.MySQLClusterService
NewMySQLClusterServiceWithDefault returns a new metadata.MySQLClusterService with default repository
func NewMySQLServerInfo ¶
func NewMySQLServerInfo(repo metadata.MySQLServerRepo, id int, clusterID int, serverName string, serviceName string, hostIP string, portNum int, deploymentType int, version string, delFlag int, createTime, lastUpdateTime time.Time) metadata.MySQLServer
NewMySQLServerInfo returns a new MySQLServerInfo
func NewMySQLServerInfoWithDefault ¶
func NewMySQLServerInfoWithDefault( clusterID int, serverName string, hostIP string, portNum int, deploymentType int) metadata.MySQLServer
NewMySQLServerInfoWithDefault returns a new MySQLServerInfo with default MySQLServerRepo
func NewMySQLServerInfoWithGlobal ¶
func NewMySQLServerInfoWithGlobal( id int, clusterID int, serverName string, serviceName string, hostIP string, portNum int, deploymentType int, version string, delFlag int, createTime, lastUpdateTime time.Time) metadata.MySQLServer
NewMySQLServerInfoWithGlobal returns a new MySQLServerInfo with default MySQLServerRepo
func NewMySQLServerInfoWithMapAndRandom ¶
func NewMySQLServerInfoWithMapAndRandom(fields map[string]interface{}) (metadata.MySQLServer, error)
NewMySQLServerInfoWithMapAndRandom returns a new metadata.MySQLServer with given map
func NewMySQLServerRepo ¶
func NewMySQLServerRepo(db middleware.Pool) metadata.MySQLServerRepo
NewMySQLServerRepo returns metadata.MySQLServerRepo with given middleware.Pool
func NewMySQLServerRepoWithGlobal ¶
func NewMySQLServerRepoWithGlobal() metadata.MySQLServerRepo
NewMySQLServerRepoWithGlobal returns metadata.MySQLServerRepo with global mysql pool
func NewMySQLServerService ¶
func NewMySQLServerService(repo metadata.MySQLServerRepo) metadata.MySQLServerService
NewMySQLServerService returns a new metadata.MySQLServerService
func NewMySQLServerServiceWithDefault ¶
func NewMySQLServerServiceWithDefault() metadata.MySQLServerService
NewMySQLServerServiceWithDefault returns a new metadata.MySQLServerService with default repository
func NewResourceGroupInfo ¶ added in v1.1.1
func NewResourceGroupInfo( repo *ResourceGroupRepo, id int, groupUUID string, groupName string, delFlag int, createTime, lastUpdateTime time.Time) metadata.ResourceGroup
NewResourceGroupInfo returns a new ResourceGroupInfo
func NewResourceGroupInfoWithDefault ¶ added in v1.1.1
func NewResourceGroupInfoWithDefault(groupUUID string, groupName string) metadata.ResourceGroup
NewResourceGroupInfoWithDefault returns a new metadata.ResourceGroup with default ResourceGroupRepo
func NewResourceGroupInfoWithGlobal ¶ added in v1.1.1
func NewResourceGroupInfoWithGlobal( id int, groupUUID string, groupName string, delFlag int, createTime, lastUpdateTime time.Time) metadata.ResourceGroup
NewResourceGroupInfoWithGlobal returns a new ResourceGroupInfo with default ResourceGroupRepo
func NewResourceGroupRepo ¶ added in v1.1.1
func NewResourceGroupRepo(db middleware.Pool) metadata.ResourceGroupRepo
NewResourceGroupRepo returns metadata.ResourceGroupRepo with given middleware.Pool
func NewResourceGroupRepoWithGlobal ¶ added in v1.1.1
func NewResourceGroupRepoWithGlobal() metadata.ResourceGroupRepo
NewResourceGroupRepoWithGlobal returns metadata.ResourceGroupRepo with global mysql pool
func NewResourceGroupService ¶ added in v1.1.1
func NewResourceGroupService(repo metadata.ResourceGroupRepo) metadata.ResourceGroupService
NewResourceGroupService returns a new metadata.ResourceGroupService
func NewResourceGroupServiceWithDefault ¶ added in v1.1.1
func NewResourceGroupServiceWithDefault() metadata.ResourceGroupService
NewResourceGroupServiceWithDefault returns a new metadata.ResourceGroupService with default repository
func NewResourceRoleInfo ¶ added in v1.1.1
func NewResourceRoleInfo(repo *ResourceRoleRepo, id int, roleUUID string, roleName string, delFlag int, createTime, lastUpdateTime time.Time) metadata.ResourceRole
NewResourceRoleInfo returns a new ResourceRoleInfo
func NewResourceRoleInfoWithDefault ¶ added in v1.1.1
func NewResourceRoleInfoWithDefault( roleUUID string, resourceGroupID int) metadata.ResourceRole
NewResourceRoleInfoWithDefault returns a new ResourceRoleInfo with default ResourceRoleRepo
func NewResourceRoleInfoWithGlobal ¶ added in v1.1.1
func NewResourceRoleInfoWithGlobal( id int, roleUUID string, roleName string, resourceGroupID int, delFlag int, createTime, lastUpdateTime time.Time) metadata.ResourceRole
NewResourceRoleInfoWithGlobal returns a new ResourceRoleInfo with default ResourceRoleRepo
func NewResourceRoleInfoWithMapAndRandom ¶ added in v1.1.1
func NewResourceRoleInfoWithMapAndRandom(fields map[string]interface{}) (metadata.ResourceRole, error)
NewResourceRoleInfoWithMapAndRandom returns a new metadata.ResourceRole with given map
func NewResourceRoleRepo ¶ added in v1.1.1
func NewResourceRoleRepo(db middleware.Pool) metadata.ResourceRoleRepo
NewResourceRoleRepo returns metadata.ResourceRoleRepo with given middleware.Pool
func NewResourceRoleRepoWithGlobal ¶ added in v1.1.1
func NewResourceRoleRepoWithGlobal() metadata.ResourceRoleRepo
NewResourceRoleRepoWithGlobal returns metadata.ResourceRoleRepo with global mysql pool
func NewResourceRoleService ¶ added in v1.1.1
func NewResourceRoleService(repo metadata.ResourceRoleRepo) metadata.ResourceRoleService
NewResourceRoleService returns a new metadata.ResourceRoleService
func NewResourceRoleServiceWithDefault ¶ added in v1.1.1
func NewResourceRoleServiceWithDefault() metadata.ResourceRoleService
NewResourceRoleServiceWithDefault returns a new metadata.ResourceRoleService with default repository
func NewTableRepo ¶ added in v1.1.1
NewTableRepo returns *TableRepo
func NewTableRepoWithDefault ¶ added in v1.1.1
NewTableRepoWithDefault returns *TableRepo with default value
func NewTableService ¶ added in v1.1.1
func NewTableService(repo metadata.TableRepo) metadata.TableService
NewTableService returns metadata.TableService
func NewTableServiceWithDefault ¶ added in v1.1.1
func NewTableServiceWithDefault() metadata.TableService
NewTableServiceWithDefault returns metadata.TableService
func NewUserInfo ¶
func NewUserInfo(repo metadata.UserRepo, id int, userName string, departmentName string, employeeID string, accountName string, email string, telephone string, mobile string, role int, delFlag int, createTime time.Time, lastUpdateTime time.Time) metadata.User
NewUserInfo returns a new UserInfo
func NewUserInfoWithDefault ¶
func NewUserInfoWithDefault(userName string, departmentName string, accountName string, email string, role int) metadata.User
NewUserInfoWithDefault returns a new UserInfo with default UserRepo
func NewUserInfoWithGlobal ¶
func NewUserInfoWithGlobal(id int, userName string, departmentName string, employeeID string, accountName string, email string, telephone string, mobile string, role int, delFlag int, createTime time.Time, lastUpdateTime time.Time) metadata.User
NewUserInfoWithGlobal returns a new UserInfo with default UserRepo
func NewUserInfoWithMapAndRandom ¶
NewUserInfoWithMapAndRandom returns a new metadata.UserInfo with given map
func NewUserRepo ¶
func NewUserRepo(db middleware.Pool) metadata.UserRepo
NewUserRepo returns metadata.UserRepo with given middleware.Pool
func NewUserRepoWithGlobal ¶
NewUserRepoWithGlobal returns metadata.UserRepo with global mysql pool
func NewUserService ¶
func NewUserService(repo metadata.UserRepo) metadata.UserService
NewUserService returns a new metadata.UserService
func NewUserServiceWithDefault ¶
func NewUserServiceWithDefault() metadata.UserService
NewUserServiceWithDefault returns a new metadata.UserService with default repository
Types ¶
type AppInfo ¶
type AppInfo struct {
metadata.AppRepo
ID int `middleware:"id" json:"id"`
AppName string `middleware:"app_name" json:"app_name"`
Level int `middleware:"level" json:"level"`
DelFlag int `middleware:"del_flag" json:"del_flag"`
CreateTime time.Time `middleware:"create_time" json:"create_time"`
LastUpdateTime time.Time `middleware:"last_update_time" json:"last_update_time"`
}
func (*AppInfo) AddUser ¶ added in v1.1.1
AddUser adds a new map of the app and user in the middleware
func (*AppInfo) DeleteUser ¶ added in v1.1.1
DeleteUser deletes the map of the app and user in the middleware
func (*AppInfo) GetCreateTime ¶
GetCreateTime returns the create time
func (*AppInfo) GetLastUpdateTime ¶
GetLastUpdateTime returns the last update time
func (*AppInfo) MarshalJSON ¶
MarshalJSON marshals App to json bytes
func (*AppInfo) MarshalJSONWithFields ¶
MarshalJSONWithFields marshals only specified fields of the App to json string
type AppRepo ¶
type AppRepo struct {
Database middleware.Pool
}
func (*AppRepo) DeleteUser ¶ added in v1.1.1
DeleteUser delete the map of app and user in the middleware
func (*AppRepo) Execute ¶
func (ar *AppRepo) Execute(command string, args ...interface{}) (middleware.Result, error)
Execute executes command with arguments on the middleware
func (*AppRepo) GetAppByName ¶
GetAppByName gets the app by name from the middleware
func (*AppRepo) GetDBsByAppID ¶ added in v1.1.1
GetDBsByAppID gets databases that app uses
func (*AppRepo) GetUsersByAppID ¶ added in v1.1.1
GetUsersByAppID gets user list that own the app
func (*AppRepo) Transaction ¶
func (ar *AppRepo) Transaction() (middleware.Transaction, error)
Transaction returns a middleware.Transaction that could execute multiple commands as a transaction
type AppService ¶
type AppService struct {
metadata.AppRepo
Apps []metadata.App `json:"apps"`
DBs []metadata.DB `json:"dbs"`
Users []metadata.User `json:"users"`
}
func (*AppService) AddDB ¶
func (as *AppService) AddDB(appID, dbID int) error
AddDB adds a new map of app and database in the middleware
func (*AppService) AddUser ¶ added in v1.1.1
func (as *AppService) AddUser(appID, userID int) error
AddUser adds a new map of app and user in the middleware
func (*AppService) Create ¶
func (as *AppService) Create(fields map[string]interface{}) error
Create creates an app in the middleware
func (*AppService) Delete ¶
func (as *AppService) Delete(id int) error
Delete deletes the app of given id in the middleware
func (*AppService) DeleteDB ¶
func (as *AppService) DeleteDB(appID, dbID int) error
DeleteDB deletes the map of app and database in the middleware
func (*AppService) DeleteUser ¶ added in v1.1.1
func (as *AppService) DeleteUser(appID, userID int) error
DeleteUser deletes the map of app and database in the middleware
func (*AppService) GetAll ¶
func (as *AppService) GetAll() error
GetAll gets all apps from the middleware
func (*AppService) GetAppByName ¶
func (as *AppService) GetAppByName(appName string) error
GetAppByName gets App from the middleware by name
func (*AppService) GetApps ¶
func (as *AppService) GetApps() []metadata.App
GetApps returns apps of the service
func (*AppService) GetByID ¶
func (as *AppService) GetByID(id int) error
GetByID gets an app of the given id from the middleware
func (*AppService) GetDBs ¶ added in v1.1.0
func (as *AppService) GetDBs() []metadata.DB
GetDBs returns dbs of the service
func (*AppService) GetDBsByAppID ¶ added in v1.1.1
func (as *AppService) GetDBsByAppID(id int) error
GetDBsByAppID gets databases that the app uses
func (*AppService) GetUsers ¶ added in v1.1.1
func (as *AppService) GetUsers() []metadata.User
GetUsers returns dbs of the service
func (*AppService) GetUsersByAppID ¶ added in v1.1.1
func (as *AppService) GetUsersByAppID(id int) error
GetUsersByAppID gets Users that own the app
func (*AppService) Marshal ¶
func (as *AppService) Marshal() ([]byte, error)
Marshal marshals AppService.Apps to json bytes
func (*AppService) MarshalWithFields ¶
func (as *AppService) MarshalWithFields(fields ...string) ([]byte, error)
MarshalWithFields marshals only specified fields of the AppService to json bytes
func (*AppService) Update ¶
func (as *AppService) Update(id int, fields map[string]interface{}) error
Update gets the app of the given id from the middleware, and then updates its fields that was specified in fields argument, key is the filed name and value is the new field value, it saves the changes to the middleware
type DBInfo ¶
type DBInfo struct {
metadata.DBRepo
ID int `middleware:"id" json:"id"`
DBName string `middleware:"db_name" json:"db_name"`
ClusterID int `middleware:"cluster_id" json:"cluster_id"`
ClusterType int `middleware:"cluster_type" json:"cluster_type"`
EnvID int `middleware:"env_id" json:"env_id"`
DelFlag int `middleware:"del_flag" json:"del_flag"`
CreateTime time.Time `middleware:"create_time" json:"create_time"`
LastUpdateTime time.Time `middleware:"last_update_time" json:"last_update_time"`
}
func (*DBInfo) DBAddUser ¶ added in v1.1.1
DBAddUser adds a new map of user and database in the middleware
func (*DBInfo) DBDeleteUser ¶ added in v1.1.1
DBDeleteUser delete the map of user and database in the middleware
func (*DBInfo) DeleteApp ¶
DeleteApp delete the map of application system and database in the middleware
func (*DBInfo) GetAllUsers ¶ added in v1.1.1
GetAllUsers gets both application and db users of this db
func (*DBInfo) GetAppUsers ¶ added in v1.1.1
GetAppUsers gets the application users of this db
func (*DBInfo) GetClusterID ¶
GetClusterID returns the cluster id
func (*DBInfo) GetClusterType ¶
GetClusterType returns the cluster type
func (*DBInfo) GetCreateTime ¶
GetCreateTime returns the create time
func (*DBInfo) GetDBUsers ¶ added in v1.1.1
GetDBUsers gets the db users of this db
func (*DBInfo) GetLastUpdateTime ¶
GetLastUpdateTime returns the last update time
func (*DBInfo) GetMySQLCluster ¶ added in v1.1.0
func (di *DBInfo) GetMySQLCluster() (metadata.MySQLCluster, error)
GetMySQLCluster gets the mysql cluster of this db
func (*DBInfo) MarshalJSON ¶
MarshalJSON marshals DB to json string
func (*DBInfo) MarshalJSONWithFields ¶
MarshalJSONWithFields marshals only specified field of the DB to json string
type DBRepo ¶
type DBRepo struct {
Database middleware.Pool
}
func (*DBRepo) DBAddUser ¶ added in v1.1.1
DBAddUser adds a new map of db and user in the middleware
func (*DBRepo) DBDeleteUser ¶ added in v1.1.1
DBDeleteUser delete the map of db and user in the middleware
func (*DBRepo) Execute ¶
func (dr *DBRepo) Execute(command string, args ...interface{}) (middleware.Result, error)
Execute executes given command and placeholders on the middleware
func (*DBRepo) GetAllUsersByDBID ¶ added in v1.1.1
GetAllUsersByDBID gets both application and db users of the given id from the middleware
func (*DBRepo) GetAppUsersByDBID ¶ added in v1.1.1
GetAppUsersByDBID gets the application users of the given id from the middleware
func (*DBRepo) GetAppsByDBID ¶ added in v1.1.1
GetAppsByDBID gets an apps that use this db
func (*DBRepo) GetDBByNameAndClusterInfo ¶ added in v1.1.1
func (dr *DBRepo) GetDBByNameAndClusterInfo(name string, clusterID, clusterType int) (metadata.DB, error)
GetDBByNameAndClusterInfo gets a database by the db name and cluster info from the middleware
func (*DBRepo) GetDBByNameAndHostInfo ¶ added in v1.1.1
GetDBByNameAndHostInfo gets a database by the db name and host info from the middleware
func (*DBRepo) GetDBsByHostInfo ¶ added in v1.1.1
GetDBsByHostInfo gets databases by the host info from the middleware
func (*DBRepo) GetID ¶
GetID gets the identity with given database name, cluster id and cluster type from the middleware
func (*DBRepo) GetMySQLClusterByID ¶ added in v1.1.1
func (dr *DBRepo) GetMySQLClusterByID(id int) (metadata.MySQLCluster, error)
GetMySQLClusterByID gets the mysql cluster of the given id from the middleware
func (*DBRepo) GetUsersByDBID ¶ added in v1.1.1
GetUsersByDBID gets the db users of the given id from the middleware
func (*DBRepo) Transaction ¶
func (dr *DBRepo) Transaction() (middleware.Transaction, error)
Transaction returns a middleware.Transaction that could execute multiple commands as a transaction
type DBService ¶
type DBService struct {
metadata.DBRepo
DBs []metadata.DB `json:"dbs"`
MySQLCluster metadata.MySQLCluster `json:"mysql_cluster"`
Apps []metadata.App `json:"apps"`
Users []metadata.User `json:"users"`
}
func (*DBService) DBAddUser ¶ added in v1.1.1
DBAddUser adds a new map of user and database in the middleware
func (*DBService) DBDeleteUser ¶ added in v1.1.1
DBDeleteUser deletes the map of user and database in the middleware
func (*DBService) GetAllUsersByDBID ¶ added in v1.1.1
GetAllUsersByDBID gets both application and db users of the given id
func (*DBService) GetAppUsersByDBID ¶ added in v1.1.1
GetAppUsersByDBID gets the application users of the given id
func (*DBService) GetAppsByDBID ¶ added in v1.1.1
GetAppsByDBID gets apps that uses this db
func (*DBService) GetDBByNameAndClusterInfo ¶ added in v1.1.1
GetDBByNameAndClusterInfo gets the database of the given db name and cluster info from the middleware
func (*DBService) GetDBByNameAndHostInfo ¶ added in v1.1.1
GetDBByNameAndHostInfo gets the database of the given db name and host info from the middleware
func (*DBService) GetDBsByHostInfo ¶ added in v1.1.1
GetDBsByHostInfo gets the databases of the given host info from the middleware
func (*DBService) GetMySQLCluster ¶ added in v1.1.0
func (ds *DBService) GetMySQLCluster() metadata.MySQLCluster
GetMySQLCluster returns the mysql cluster of the service
func (*DBService) GetMySQLClusterByID ¶ added in v1.1.0
GetMySQLClusterByID gets the cluster of the db
func (*DBService) GetUsersByDBID ¶ added in v1.1.1
GetUsersByDBID gets the db users of the given id
func (*DBService) MarshalWithFields ¶
MarshalWithFields marshals only specified fields of the DBService to json bytes
type EnvInfo ¶
type EnvInfo struct {
metadata.EnvRepo
ID int `middleware:"id" json:"id"`
EnvName string `middleware:"env_name" json:"env_name"`
DelFlag int `middleware:"del_flag" json:"del_flag"`
CreateTime time.Time `middleware:"create_time" json:"create_time"`
LastUpdateTime time.Time `middleware:"last_update_time" json:"last_update_time"`
}
func (*EnvInfo) GetCreateTime ¶
GetCreateTime returns the create time
func (*EnvInfo) GetLastUpdateTime ¶
GetLastUpdateTime returns the last update time
func (*EnvInfo) MarshalJSON ¶
MarshalJSON marshals Env to json string
func (*EnvInfo) MarshalJSONWithFields ¶
MarshalJSONWithFields marshals only specified fields of Env to json string
type EnvRepo ¶
type EnvRepo struct {
Database middleware.Pool
}
func (*EnvRepo) Execute ¶
func (er *EnvRepo) Execute(command string, args ...interface{}) (middleware.Result, error)
Execute executes given command and placeholders on the middleware
func (*EnvRepo) GetEnvByName ¶
GetEnvByName gets Env of given environment name
func (*EnvRepo) Transaction ¶
func (er *EnvRepo) Transaction() (middleware.Transaction, error)
Transaction returns middleware.PoolConn, so it can run multiple statements in the same transaction
type EnvService ¶
func (*EnvService) Create ¶
func (es *EnvService) Create(fields map[string]interface{}) error
Create creates an environment in the middleware
func (*EnvService) Delete ¶
func (es *EnvService) Delete(id int) error
Delete deletes the environment of given id in the middleware
func (*EnvService) GetAll ¶
func (es *EnvService) GetAll() error
GetAll gets all environments from the middleware
func (*EnvService) GetByID ¶
func (es *EnvService) GetByID(id int) error
GetByID gets an environment of the given id from the middleware
func (*EnvService) GetEnvByName ¶
func (es *EnvService) GetEnvByName(envName string) error
GetEnvByName returns Env of given env name
func (*EnvService) GetEnvs ¶
func (es *EnvService) GetEnvs() []metadata.Env
GetEnvs returns environments of the service
func (*EnvService) GetID ¶
func (es *EnvService) GetID(fields map[string]interface{}) (int, error)
GetID gets identity of an entity with given fields
func (*EnvService) Marshal ¶
func (es *EnvService) Marshal() ([]byte, error)
Marshal marshals EnvService.Envs to json bytes
func (*EnvService) MarshalWithFields ¶
func (es *EnvService) MarshalWithFields(fields ...string) ([]byte, error)
MarshalWithFields marshals only specified fields of the EnvService to json bytes
func (*EnvService) Update ¶
func (es *EnvService) Update(id int, fields map[string]interface{}) error
Update gets the environment of the given id from the middleware, and then updates its fields that was specified in fields argument, key is the filed name and value is the new field value, it saves the changes to the middleware
type IndexStatistic ¶ added in v1.1.1
type IndexStatistic struct {
DBName string `middleware:"db_name" json:"db_name"`
TableName string `middleware:"table_name" json:"table_name"`
IndexName string `middleware:"index_name" json:"index_name"`
Sequence int `middleware:"sequence" json:"sequence"`
ColumnName string `middleware:"column_name" json:"column_name"`
Cardinality int `middleware:"cardinality" json:"cardinality"`
Unique bool `middleware:"is_unique" json:"is_unique"`
Nullable bool `middleware:"is_nullable" json:"is_nullable"`
}
IndexStatistic include statistics of index
func NewEmptyIndexStatistic ¶ added in v1.1.1
func NewEmptyIndexStatistic() *IndexStatistic
NewEmptyIndexStatistic returns an empty *IndexStatistic
func (*IndexStatistic) GetCardinality ¶ added in v1.1.1
func (is *IndexStatistic) GetCardinality() int
GetCardinality returns the cardinality
func (*IndexStatistic) GetColumnName ¶ added in v1.1.1
func (is *IndexStatistic) GetColumnName() string
GetColumnName returns the column name
func (*IndexStatistic) GetDBName ¶ added in v1.1.1
func (is *IndexStatistic) GetDBName() string
GetDBName returns the table schema
func (*IndexStatistic) GetIndexName ¶ added in v1.1.1
func (is *IndexStatistic) GetIndexName() string
GetIndexName returns the index name
func (*IndexStatistic) GetSequence ¶ added in v1.1.1
func (is *IndexStatistic) GetSequence() int
GetSequence returns the sequence
func (*IndexStatistic) GetTableName ¶ added in v1.1.1
func (is *IndexStatistic) GetTableName() string
GetTableName returns the table name
func (*IndexStatistic) IsNullable ¶ added in v1.1.1
func (is *IndexStatistic) IsNullable() bool
IsNullable returns the index is nullable or not
func (*IndexStatistic) IsUnique ¶ added in v1.1.1
func (is *IndexStatistic) IsUnique() bool
IsUnique returns unique state of index
func (*IndexStatistic) MarshalJSON ¶ added in v1.1.1
func (is *IndexStatistic) MarshalJSON() ([]byte, error)
MarshalJSON marshals Index to json string
type MiddlewareClusterInfo ¶
type MiddlewareClusterInfo struct {
metadata.MiddlewareClusterRepo
ID int `middleware:"id" json:"id"`
ClusterName string `middleware:"cluster_name" json:"cluster_name"`
EnvID int `middleware:"env_id" json:"env_id"`
DelFlag int `middleware:"del_flag" json:"del_flag"`
CreateTime time.Time `middleware:"create_time" json:"create_time"`
LastUpdateTime time.Time `middleware:"last_update_time" json:"last_update_time"`
}
func (*MiddlewareClusterInfo) AddUser ¶ added in v1.1.1
func (mci *MiddlewareClusterInfo) AddUser(userID int) error
AddUser adds a new map of middleware cluster and user in the middleware
func (*MiddlewareClusterInfo) Delete ¶
func (mci *MiddlewareClusterInfo) Delete()
Delete sets DelFlag to true, need to use Save to write to the middleware
func (*MiddlewareClusterInfo) DeleteUser ¶ added in v1.1.1
func (mci *MiddlewareClusterInfo) DeleteUser(userID int) error
DeleteUser deletes a map of middleware cluster and user in the middleware
func (*MiddlewareClusterInfo) GetClusterName ¶
func (mci *MiddlewareClusterInfo) GetClusterName() string
GetClusterName returns the cluster name
func (*MiddlewareClusterInfo) GetCreateTime ¶
func (mci *MiddlewareClusterInfo) GetCreateTime() time.Time
GetCreateTime returns created time of entity
func (*MiddlewareClusterInfo) GetDelFlag ¶
func (mci *MiddlewareClusterInfo) GetDelFlag() int
GetDelFlag returns the delete flag
func (*MiddlewareClusterInfo) GetEnvID ¶
func (mci *MiddlewareClusterInfo) GetEnvID() int
GetEnvID returns the env id
func (*MiddlewareClusterInfo) GetLastUpdateTime ¶
func (mci *MiddlewareClusterInfo) GetLastUpdateTime() time.Time
GetLastUpdateTime returns last updated time of entity
func (*MiddlewareClusterInfo) GetMiddlewareServers ¶ added in v1.1.0
func (mci *MiddlewareClusterInfo) GetMiddlewareServers() ([]metadata.MiddlewareServer, error)
GetMiddlewareServers gets the middleware server id list of this cluster
func (*MiddlewareClusterInfo) GetUsersByMiddlewareClusterID ¶ added in v1.1.1
func (mci *MiddlewareClusterInfo) GetUsersByMiddlewareClusterID() ([]metadata.User, error)
GetUsersByMiddlewareClusterID gets user list that own the middleware cluster
func (*MiddlewareClusterInfo) Identity ¶
func (mci *MiddlewareClusterInfo) Identity() int
Identity returns ID of entity
func (*MiddlewareClusterInfo) MarshalJSON ¶
func (mci *MiddlewareClusterInfo) MarshalJSON() ([]byte, error)
MarshalJSON marshals entity to json string, it only marshals fields that has default tag
func (*MiddlewareClusterInfo) MarshalJSONWithFields ¶
func (mci *MiddlewareClusterInfo) MarshalJSONWithFields(fields ...string) ([]byte, error)
MarshalJSONWithFields marshals only with specified fields of entity to json string
func (*MiddlewareClusterInfo) Set ¶
func (mci *MiddlewareClusterInfo) Set(fields map[string]interface{}) error
Set sets entity with given fields, key is the field name and value is the relevant value of the key
type MiddlewareClusterRepo ¶
type MiddlewareClusterRepo struct {
Database middleware.Pool
}
func (*MiddlewareClusterRepo) AddUser ¶ added in v1.1.1
func (mcr *MiddlewareClusterRepo) AddUser(middlewareClusterID, userID int) error
AddUser adds a new map of middleware cluster and user in the middleware
func (*MiddlewareClusterRepo) Create ¶
func (mcr *MiddlewareClusterRepo) Create(middlewareCluster metadata.MiddlewareCluster) (metadata.MiddlewareCluster, error)
Create creates data with given entity in the middleware
func (*MiddlewareClusterRepo) Delete ¶
func (mcr *MiddlewareClusterRepo) Delete(id int) error
Delete deletes the middleware cluster in the middleware
func (*MiddlewareClusterRepo) DeleteUser ¶ added in v1.1.1
func (mcr *MiddlewareClusterRepo) DeleteUser(middlewareClusterID, userID int) error
DeleteUser deletes a map of middleware cluster and user in the middleware
func (*MiddlewareClusterRepo) Execute ¶
func (mcr *MiddlewareClusterRepo) Execute(command string, args ...interface{}) (middleware.Result, error)
Execute executes command with arguments on database
func (*MiddlewareClusterRepo) GetAll ¶
func (mcr *MiddlewareClusterRepo) GetAll() ([]metadata.MiddlewareCluster, error)
GetAll gets all middleware clusters from the middleware
func (*MiddlewareClusterRepo) GetByEnv ¶
func (mcr *MiddlewareClusterRepo) GetByEnv(envID int) ([]metadata.MiddlewareCluster, error)
GetByEnv gets middleware clusters of given env id from the middleware
func (*MiddlewareClusterRepo) GetByID ¶
func (mcr *MiddlewareClusterRepo) GetByID(id int) (metadata.MiddlewareCluster, error)
GetByID gets a middleware cluster by the identity from the middleware
func (*MiddlewareClusterRepo) GetByName ¶
func (mcr *MiddlewareClusterRepo) GetByName(clusterName string) (metadata.MiddlewareCluster, error)
GetByName gets a middleware cluster of given cluster name from the middle ware
func (*MiddlewareClusterRepo) GetID ¶
func (mcr *MiddlewareClusterRepo) GetID(clusterName string, envID int) (int, error)
GetID gets the identity with given cluster name and env id from the middleware
func (*MiddlewareClusterRepo) GetUsersByMiddlewareClusterID ¶ added in v1.1.1
func (mcr *MiddlewareClusterRepo) GetUsersByMiddlewareClusterID(clusterID int) ([]metadata.User, error)
GetUsersByMiddlewareClusterID get user list that own the middleware cluster
func (*MiddlewareClusterRepo) Transaction ¶
func (mcr *MiddlewareClusterRepo) Transaction() (middleware.Transaction, error)
Transaction returns a middleware.Transaction that could execute multiple commands as a transaction
func (*MiddlewareClusterRepo) Update ¶
func (mcr *MiddlewareClusterRepo) Update(middlewareCluster metadata.MiddlewareCluster) error
Update updates data with given entity in the middleware
type MiddlewareClusterService ¶
type MiddlewareClusterService struct {
metadata.MiddlewareClusterRepo
MiddlewareClusters []metadata.MiddlewareCluster `json:"middleware_clusters"`
MiddlewareServers []metadata.MiddlewareServer `json:"middleware_servers"`
Users []metadata.User `json:"users"`
}
func (*MiddlewareClusterService) AddUser ¶ added in v1.1.1
func (mcs *MiddlewareClusterService) AddUser(middlewareClusterID, userID int) error
AddUser adds a new map of middleware cluster and user in the middleware
func (*MiddlewareClusterService) Create ¶
func (mcs *MiddlewareClusterService) Create(fields map[string]interface{}) error
Create creates a new middleware cluster entity and insert it into the middleware
func (*MiddlewareClusterService) Delete ¶
func (mcs *MiddlewareClusterService) Delete(id int) error
Delete deletes the middleware cluster entity that contains the given id in the middleware
func (*MiddlewareClusterService) DeleteUser ¶ added in v1.1.1
func (mcs *MiddlewareClusterService) DeleteUser(middlewareClusterID, userID int) error
DeleteUser deletes the map of middleware cluster and user in the middleware
func (*MiddlewareClusterService) GetAll ¶
func (mcs *MiddlewareClusterService) GetAll() error
GetAll gets all middleware cluster entities from the middleware
func (*MiddlewareClusterService) GetByEnv ¶
func (mcs *MiddlewareClusterService) GetByEnv(envID int) error
GetByEnv gets middleware clusters of given env id
func (*MiddlewareClusterService) GetByID ¶
func (mcs *MiddlewareClusterService) GetByID(id int) error
GetByID gets an middleware cluster entity that contains the given id from the middleware
func (*MiddlewareClusterService) GetByName ¶
func (mcs *MiddlewareClusterService) GetByName(clusterName string) error
GetByName gets a middleware cluster of given cluster name
func (*MiddlewareClusterService) GetMiddlewareClusters ¶
func (mcs *MiddlewareClusterService) GetMiddlewareClusters() []metadata.MiddlewareCluster
GetMiddlewareClusters returns middleware clusters of the service
func (*MiddlewareClusterService) GetMiddlewareServers ¶ added in v1.1.0
func (mcs *MiddlewareClusterService) GetMiddlewareServers() []metadata.MiddlewareServer
GetMiddlewareServers returns middleware servers of the service
func (*MiddlewareClusterService) GetMiddlewareServersByID ¶ added in v1.1.0
func (mcs *MiddlewareClusterService) GetMiddlewareServersByID(clusterID int) error
GetMiddlewareServersByID gets the middleware server id list of given cluster id
func (*MiddlewareClusterService) GetUsers ¶ added in v1.1.1
func (mcs *MiddlewareClusterService) GetUsers() []metadata.User
GetUsers returns users of the service
func (*MiddlewareClusterService) GetUsersByMiddlewareClusterID ¶ added in v1.1.1
func (mcs *MiddlewareClusterService) GetUsersByMiddlewareClusterID(clusterID int) error
GetUsersByMiddlewareClusterID gets user list that own the middleware cluster
func (*MiddlewareClusterService) Marshal ¶
func (mcs *MiddlewareClusterService) Marshal() ([]byte, error)
Marshal marshals service.Envs
func (*MiddlewareClusterService) MarshalWithFields ¶
func (mcs *MiddlewareClusterService) MarshalWithFields(fields ...string) ([]byte, error)
MarshalWithFields marshals service.Envs with given fields
func (*MiddlewareClusterService) Update ¶
func (mcs *MiddlewareClusterService) Update(id int, fields map[string]interface{}) error
Update gets an middleware cluster entity that contains the given id from the middleware, and then update its fields that was specified in fields argument, key is the filed name and value is the new field value, it saves the changes to the middleware
type MiddlewareServerInfo ¶
type MiddlewareServerInfo struct {
metadata.MiddlewareServerRepo
ID int `middleware:"id" json:"id"`
ClusterID int `middleware:"cluster_id" json:"cluster_id"`
ServerName string `middleware:"server_name" json:"server_name"`
MiddlewareRole int `middleware:"middleware_role" json:"middleware_role"`
HostIP string `middleware:"host_ip" json:"host_ip"`
PortNum int `middleware:"port_num" json:"port_num"`
DelFlag int `middleware:"del_flag" json:"del_flag"`
CreateTime time.Time `middleware:"create_time" json:"create_time"`
LastUpdateTime time.Time `middleware:"last_update_time" json:"last_update_time"`
}
func (*MiddlewareServerInfo) Delete ¶
func (msi *MiddlewareServerInfo) Delete()
Delete sets DelFlag to true, need to use Save to write to the middleware
func (*MiddlewareServerInfo) GetClusterID ¶
func (msi *MiddlewareServerInfo) GetClusterID() int
GetClusterID returns the middleware cluster id
func (*MiddlewareServerInfo) GetCreateTime ¶
func (msi *MiddlewareServerInfo) GetCreateTime() time.Time
GetCreateTime returns created time of entity
func (*MiddlewareServerInfo) GetDelFlag ¶
func (msi *MiddlewareServerInfo) GetDelFlag() int
GetDelFlag checks if delete flag had been set
func (*MiddlewareServerInfo) GetHostIP ¶
func (msi *MiddlewareServerInfo) GetHostIP() string
GetHostIP returns the host ip
func (*MiddlewareServerInfo) GetLastUpdateTime ¶
func (msi *MiddlewareServerInfo) GetLastUpdateTime() time.Time
GetLastUpdateTime returns last updated time of entity
func (*MiddlewareServerInfo) GetMiddlewareRole ¶
func (msi *MiddlewareServerInfo) GetMiddlewareRole() int
GetMiddlewareRole returns the middleware role
func (*MiddlewareServerInfo) GetPortNum ¶
func (msi *MiddlewareServerInfo) GetPortNum() int
GetPortNum returns the port number
func (*MiddlewareServerInfo) GetServerName ¶
func (msi *MiddlewareServerInfo) GetServerName() string
GetServerName returns the server name
func (*MiddlewareServerInfo) Identity ¶
func (msi *MiddlewareServerInfo) Identity() int
Identity returns ID of entity
func (*MiddlewareServerInfo) MarshalJSON ¶
func (msi *MiddlewareServerInfo) MarshalJSON() ([]byte, error)
MarshalJSON marshals entity to json string, it only marshals fields that has default tag
func (*MiddlewareServerInfo) MarshalJSONWithFields ¶
func (msi *MiddlewareServerInfo) MarshalJSONWithFields(fields ...string) ([]byte, error)
MarshalJSONWithFields marshals only with specified fields of entity to json string
func (*MiddlewareServerInfo) Set ¶
func (msi *MiddlewareServerInfo) Set(fields map[string]interface{}) error
Set sets entity with given fields, key is the field name and value is the relevant value of the key
type MiddlewareServerRepo ¶
type MiddlewareServerRepo struct {
Database middleware.Pool
}
func (*MiddlewareServerRepo) Create ¶
func (msr *MiddlewareServerRepo) Create(middlewareServer metadata.MiddlewareServer) (metadata.MiddlewareServer, error)
Create creates data with given entity in the middleware
func (*MiddlewareServerRepo) Delete ¶
func (msr *MiddlewareServerRepo) Delete(id int) error
Delete deletes the middleware server in the middleware
func (*MiddlewareServerRepo) Execute ¶
func (msr *MiddlewareServerRepo) Execute(command string, args ...interface{}) (middleware.Result, error)
Execute implements dependency.MiddlewareServerRepo interface, it executes command with arguments on database
func (*MiddlewareServerRepo) GetAll ¶
func (msr *MiddlewareServerRepo) GetAll() ([]metadata.MiddlewareServer, error)
GetAll returns all available entities
func (*MiddlewareServerRepo) GetByClusterID ¶
func (msr *MiddlewareServerRepo) GetByClusterID(clusterID int) ([]metadata.MiddlewareServer, error)
GetByClusterID gets middleware servers with given cluster id
func (*MiddlewareServerRepo) GetByHostInfo ¶
func (msr *MiddlewareServerRepo) GetByHostInfo(hostIP string, portNum int) (metadata.MiddlewareServer, error)
GetByHostInfo gets a middleware server with given host ip and port number
func (*MiddlewareServerRepo) GetByID ¶
func (msr *MiddlewareServerRepo) GetByID(id int) (metadata.MiddlewareServer, error)
GetByID gets a middleware server with given id
func (*MiddlewareServerRepo) GetID ¶
func (msr *MiddlewareServerRepo) GetID(hostIP string, portNum int) (int, error)
GetID checks identity of given entity from the middleware
func (*MiddlewareServerRepo) Transaction ¶
func (msr *MiddlewareServerRepo) Transaction() (middleware.Transaction, error)
Transaction returns a middleware.Transaction that could execute multiple commands as a transaction
func (*MiddlewareServerRepo) Update ¶
func (msr *MiddlewareServerRepo) Update(middlewareServer metadata.MiddlewareServer) error
Update updates data with given entity in the middleware
type MiddlewareServerService ¶
type MiddlewareServerService struct {
metadata.MiddlewareServerRepo
MiddlewareServers []metadata.MiddlewareServer `json:"middleware_servers"`
}
func (*MiddlewareServerService) Create ¶
func (mss *MiddlewareServerService) Create(fields map[string]interface{}) error
Create creates a middleware server in the middleware
func (*MiddlewareServerService) Delete ¶
func (mss *MiddlewareServerService) Delete(id int) error
Delete deletes the middleware server of given id in the middleware
func (*MiddlewareServerService) GetAll ¶
func (mss *MiddlewareServerService) GetAll() error
GetAll gets all middleware servers from the middleware
func (*MiddlewareServerService) GetByClusterID ¶
func (mss *MiddlewareServerService) GetByClusterID(clusterID int) error
GetByClusterID gets middleware servers with given cluster id
func (*MiddlewareServerService) GetByHostInfo ¶
func (mss *MiddlewareServerService) GetByHostInfo(hostIP string, portNum int) error
GetByHostInfo gets a middleware server with given host ip and port number
func (*MiddlewareServerService) GetByID ¶
func (mss *MiddlewareServerService) GetByID(id int) error
GetByID gets a middleware server by the identity from the middleware
func (*MiddlewareServerService) GetMiddlewareServers ¶
func (mss *MiddlewareServerService) GetMiddlewareServers() []metadata.MiddlewareServer
GetMiddlewareServers returns middleware servers of the service
func (*MiddlewareServerService) Marshal ¶
func (mss *MiddlewareServerService) Marshal() ([]byte, error)
Marshal marshals MiddlewareServerService.MiddlewareServers to json bytes
func (*MiddlewareServerService) MarshalWithFields ¶
func (mss *MiddlewareServerService) MarshalWithFields(fields ...string) ([]byte, error)
MarshalWithFields marshals only specified fields of the MiddlewareServerService to json bytes
func (*MiddlewareServerService) Update ¶
func (mss *MiddlewareServerService) Update(id int, fields map[string]interface{}) error
Update gets a middleware server of the given id from the middleware, and then updates its fields that was specified in fields argument, key is the filed name and value is the new field value, it saves the changes to the middleware
type MonitorSystemInfo ¶
type MonitorSystemInfo struct {
metadata.MonitorSystemRepo
ID int `middleware:"id" json:"id"`
SystemName string `middleware:"system_name" json:"system_name"`
SystemType int `middleware:"system_type" json:"system_type"`
HostIP string `middleware:"host_ip" json:"host_ip"`
PortNum int `middleware:"port_num" json:"port_num"`
PortNumSlow int `middleware:"port_num_slow" json:"port_num_slow"`
BaseURL string `middleware:"base_url" json:"base_url"`
EnvID int `middleware:"env_id" json:"env_id"`
DelFlag int `middleware:"del_flag" json:"del_flag"`
CreateTime time.Time `middleware:"create_time" json:"create_time"`
LastUpdateTime time.Time `middleware:"last_update_time" json:"last_update_time"`
}
func (*MonitorSystemInfo) Delete ¶
func (msi *MonitorSystemInfo) Delete()
Delete sets DelFlag to true, need to use Save to write to the middleware
func (*MonitorSystemInfo) GetBaseURL ¶
func (msi *MonitorSystemInfo) GetBaseURL() string
GetBaseURL returns the monitor system baseUrl
func (*MonitorSystemInfo) GetCreateTime ¶
func (msi *MonitorSystemInfo) GetCreateTime() time.Time
GetCreateTime returns created time of entity
func (*MonitorSystemInfo) GetDelFlag ¶
func (msi *MonitorSystemInfo) GetDelFlag() int
GetDelFlag returns the delete flag
func (*MonitorSystemInfo) GetEnvID ¶
func (msi *MonitorSystemInfo) GetEnvID() int
GetEnvID returns the monitor system envID
func (*MonitorSystemInfo) GetHostIP ¶
func (msi *MonitorSystemInfo) GetHostIP() string
GetHostIP returns the monitor system hostIP
func (*MonitorSystemInfo) GetLastUpdateTime ¶
func (msi *MonitorSystemInfo) GetLastUpdateTime() time.Time
GetLastUpdateTime returns last updated time of entity
func (*MonitorSystemInfo) GetPortNum ¶
func (msi *MonitorSystemInfo) GetPortNum() int
GetPortNum returns the monitor system portNum
func (*MonitorSystemInfo) GetPortNumSlow ¶
func (msi *MonitorSystemInfo) GetPortNumSlow() int
GetPortNumSlow returns the monitor system portNumSlow
func (*MonitorSystemInfo) GetSystemName ¶
func (msi *MonitorSystemInfo) GetSystemName() string
GetSystemName returns the monitor system name
func (*MonitorSystemInfo) GetSystemType ¶
func (msi *MonitorSystemInfo) GetSystemType() int
GetSystemType returns the monitor system type
func (*MonitorSystemInfo) Identity ¶
func (msi *MonitorSystemInfo) Identity() int
Identity returns the identity
func (*MonitorSystemInfo) MarshalJSON ¶
func (msi *MonitorSystemInfo) MarshalJSON() ([]byte, error)
MarshalJSON marshals entity to json string, it only marshals fields that has default tag
func (*MonitorSystemInfo) MarshalJSONWithFields ¶
func (msi *MonitorSystemInfo) MarshalJSONWithFields(fields ...string) ([]byte, error)
MarshalJSONWithFields marshals only with specified fields of entity to json string
func (*MonitorSystemInfo) Set ¶
func (msi *MonitorSystemInfo) Set(fields map[string]interface{}) error
Set sets monitorSystem with given fields, key is the field name and value is the relevant value of the key
type MonitorSystemRepo ¶
type MonitorSystemRepo struct {
Database middleware.Pool
}
func (*MonitorSystemRepo) Create ¶
func (msr *MonitorSystemRepo) Create(monitorSystem metadata.MonitorSystem) (metadata.MonitorSystem, error)
Create creates a monitor system in the middleware
func (*MonitorSystemRepo) Delete ¶
func (msr *MonitorSystemRepo) Delete(id int) error
Delete deletes the monitor system in the middleware
func (*MonitorSystemRepo) Execute ¶
func (msr *MonitorSystemRepo) Execute(command string, args ...interface{}) (middleware.Result, error)
Execute executes given command and placeholders on the middleware
func (*MonitorSystemRepo) GetAll ¶
func (msr *MonitorSystemRepo) GetAll() ([]metadata.MonitorSystem, error)
GetAll gets all monitor systems from the middleware
func (*MonitorSystemRepo) GetByEnv ¶
func (msr *MonitorSystemRepo) GetByEnv(envID int) ([]metadata.MonitorSystem, error)
GetByEnv gets monitor systems of given env id from the middleware
func (*MonitorSystemRepo) GetByHostInfo ¶
func (msr *MonitorSystemRepo) GetByHostInfo(hostIP string, portNum int) (metadata.MonitorSystem, error)
GetByHostInfo gets a monitor system by the hostInfo from the middleware
func (*MonitorSystemRepo) GetByID ¶
func (msr *MonitorSystemRepo) GetByID(id int) (metadata.MonitorSystem, error)
GetByID gets a monitor system by the identity from the middleware
func (*MonitorSystemRepo) GetID ¶
func (msr *MonitorSystemRepo) GetID(monitorSystemHostIP string, monitorSystemPortNum int) (int, error)
GetID gets the identity with given host ip and port num from the middleware
func (*MonitorSystemRepo) Transaction ¶
func (msr *MonitorSystemRepo) Transaction() (middleware.Transaction, error)
Transaction returns a middleware.Transaction that could execute multiple commands as a transaction
func (*MonitorSystemRepo) Update ¶
func (msr *MonitorSystemRepo) Update(monitorSystem metadata.MonitorSystem) error
Update updates the monitor system in the middleware
type MonitorSystemService ¶
type MonitorSystemService struct {
metadata.MonitorSystemRepo
MonitorSystems []metadata.MonitorSystem `json:"monitor_systems"`
}
func (*MonitorSystemService) Create ¶
func (mss *MonitorSystemService) Create(fields map[string]interface{}) error
Create creates an new monitor system in the middleware
func (*MonitorSystemService) Delete ¶
func (mss *MonitorSystemService) Delete(id int) error
Delete deletes the monitor system of given id in the middleware
func (*MonitorSystemService) GetAll ¶
func (mss *MonitorSystemService) GetAll() error
GetAll gets all monitor systems from the middleware
func (*MonitorSystemService) GetByEnv ¶
func (mss *MonitorSystemService) GetByEnv(envID int) error
GetByEnv gets all monitor systems from the middleware by env_id
func (*MonitorSystemService) GetByHostInfo ¶
func (mss *MonitorSystemService) GetByHostInfo(hostIP string, portNum int) error
GetByHostInfo gets monitor system from the middleware by host_info
func (*MonitorSystemService) GetByID ¶
func (mss *MonitorSystemService) GetByID(id int) error
GetByID gets an monitor system of the given id from the middleware
func (*MonitorSystemService) GetMonitorSystems ¶
func (mss *MonitorSystemService) GetMonitorSystems() []metadata.MonitorSystem
GetMonitorSystems returns monitor systems of the service
func (*MonitorSystemService) Marshal ¶
func (mss *MonitorSystemService) Marshal() ([]byte, error)
Marshal marshals MonitorSystemService.MonitorSystems to json bytes
func (*MonitorSystemService) MarshalWithFields ¶
func (mss *MonitorSystemService) MarshalWithFields(fields ...string) ([]byte, error)
MarshalWithFields marshals only specified fields of the MonitorSystemService to json bytes
func (*MonitorSystemService) Update ¶
func (mss *MonitorSystemService) Update(id int, fields map[string]interface{}) error
Update gets the monitor system of the given id from the middleware, and then update its fields that was specified in fields argument, key is the filed name and value is the new field value, it saves the changes to the middleware
type MySQLClusterInfo ¶
type MySQLClusterInfo struct {
MySQLClusterRepo metadata.MySQLClusterRepo
ID int `middleware:"id" json:"id"`
ClusterName string `middleware:"cluster_name" json:"cluster_name"`
MiddlewareClusterID int `middleware:"middleware_cluster_id" json:"middleware_cluster_id"`
MonitorSystemID int `middleware:"monitor_system_id" json:"monitor_system_id"`
EnvID int `middleware:"env_id" json:"env_id"`
DelFlag int `middleware:"del_flag" json:"del_flag"`
CreateTime time.Time `middleware:"create_time" json:"create_time"`
LastUpdateTime time.Time `middleware:"last_update_time" json:"last_update_time"`
}
MySQLClusterInfo is a struct map to table in the database
func (*MySQLClusterInfo) AddUser ¶ added in v1.1.1
func (mci *MySQLClusterInfo) AddUser(userID int) error
AddUser add a user for mysql cluster in the middleware
func (*MySQLClusterInfo) Delete ¶
func (mci *MySQLClusterInfo) Delete()
Delete sets DelFlag to true, need to use Save to write to the middleware
func (*MySQLClusterInfo) DeleteUser ¶ added in v1.1.1
func (mci *MySQLClusterInfo) DeleteUser(userID int) error
DeleteUser delete a user for mysql cluster in the middleware
func (*MySQLClusterInfo) GetAllUsers ¶ added in v1.1.1
func (mci *MySQLClusterInfo) GetAllUsers() ([]metadata.User, error)
GetAllUsers gets both application and db users of this cluster
func (*MySQLClusterInfo) GetAppUsers ¶ added in v1.1.1
func (mci *MySQLClusterInfo) GetAppUsers() ([]metadata.User, error)
GetAppUsers gets the application users of this cluster
func (*MySQLClusterInfo) GetClusterName ¶
func (mci *MySQLClusterInfo) GetClusterName() string
GetClusterName returns the env name
func (*MySQLClusterInfo) GetCreateTime ¶
func (mci *MySQLClusterInfo) GetCreateTime() time.Time
GetCreateTime returns created time of mysql cluster
func (*MySQLClusterInfo) GetDBUsers ¶ added in v1.1.1
func (mci *MySQLClusterInfo) GetDBUsers() ([]metadata.User, error)
GetDBUsers gets the db users of this cluster
func (*MySQLClusterInfo) GetDBs ¶ added in v1.1.0
func (mci *MySQLClusterInfo) GetDBs() ([]metadata.DB, error)
GetDBs gets the databases of this cluster
func (*MySQLClusterInfo) GetDelFlag ¶
func (mci *MySQLClusterInfo) GetDelFlag() int
GetDelFlag returns the delete flag
func (*MySQLClusterInfo) GetEnvID ¶
func (mci *MySQLClusterInfo) GetEnvID() int
GetEnvID returns the env id
func (*MySQLClusterInfo) GetLastUpdateTime ¶
func (mci *MySQLClusterInfo) GetLastUpdateTime() time.Time
GetLastUpdateTime returns last updated time of mysql cluster
func (*MySQLClusterInfo) GetMasterServers ¶ added in v1.1.0
func (mci *MySQLClusterInfo) GetMasterServers() ([]metadata.MySQLServer, error)
GetMasterServers gets the master servers of this cluster
func (*MySQLClusterInfo) GetMiddlewareClusterID ¶
func (mci *MySQLClusterInfo) GetMiddlewareClusterID() int
GetMiddlewareClusterID returns the middleware cluster id
func (*MySQLClusterInfo) GetMonitorSystemID ¶
func (mci *MySQLClusterInfo) GetMonitorSystemID() int
GetMonitorSystemID returns the monitor system id
func (*MySQLClusterInfo) GetMySQLServers ¶ added in v1.1.0
func (mci *MySQLClusterInfo) GetMySQLServers() ([]metadata.MySQLServer, error)
GetMySQLServers gets the mysql servers of this cluster
func (*MySQLClusterInfo) GetResourceGroup ¶ added in v1.1.1
func (mci *MySQLClusterInfo) GetResourceGroup() (metadata.ResourceGroup, error)
GetResourceGroup get the resource group of the given id from the middleware
func (*MySQLClusterInfo) GetUsers ¶ added in v1.1.1
func (mci *MySQLClusterInfo) GetUsers() ([]metadata.User, error)
GetUsers gets the users of this cluster
func (*MySQLClusterInfo) Identity ¶
func (mci *MySQLClusterInfo) Identity() int
Identity cluster returns ID of mysql cluster
func (*MySQLClusterInfo) MarshalJSON ¶
func (mci *MySQLClusterInfo) MarshalJSON() ([]byte, error)
MarshalJSON marshals mysql cluster to json string, it only marshals fields that has default tag
func (*MySQLClusterInfo) MarshalJSONWithFields ¶
func (mci *MySQLClusterInfo) MarshalJSONWithFields(fields ...string) ([]byte, error)
MarshalJSONWithFields marshals only with specified fields of mysql cluster to json string
func (*MySQLClusterInfo) Set ¶
func (mci *MySQLClusterInfo) Set(fields map[string]interface{}) error
Set sets mysql cluster with given fields, key is the field name and value is the relevant value of the key
type MySQLClusterRepo ¶
type MySQLClusterRepo struct {
Database middleware.Pool
}
MySQLClusterRepo implements dependency.MySQLClusterRepo interface
func (*MySQLClusterRepo) AddUser ¶ added in v1.1.1
func (mcr *MySQLClusterRepo) AddUser(mysqlClusterID, userID int) error
AddUser add a user for mysql cluster in the middleware
func (*MySQLClusterRepo) Create ¶
func (mcr *MySQLClusterRepo) Create(mysqlCluster metadata.MySQLCluster) (metadata.MySQLCluster, error)
Create creates data with given entity in the middleware
func (*MySQLClusterRepo) Delete ¶
func (mcr *MySQLClusterRepo) Delete(id int) error
Delete deletes data in the middleware, it is recommended to use soft deletion, therefore use update instead of delete
func (*MySQLClusterRepo) DeleteUser ¶ added in v1.1.1
func (mcr *MySQLClusterRepo) DeleteUser(mysqlClusterID, userID int) error
DeleteUser delete a user for mysql cluster in the middleware
func (*MySQLClusterRepo) Execute ¶
func (mcr *MySQLClusterRepo) Execute(command string, args ...interface{}) (middleware.Result, error)
Execute implements metadata.MySQLClusterRepo interface, it executes command with arguments on database
func (*MySQLClusterRepo) GetAll ¶
func (mcr *MySQLClusterRepo) GetAll() ([]metadata.MySQLCluster, error)
GetAll returns all available entities
func (*MySQLClusterRepo) GetAllUsersByID ¶ added in v1.1.1
func (mcr *MySQLClusterRepo) GetAllUsersByID(id int) ([]metadata.User, error)
GetAllUsersByID gets both application and db users of the given id from the middleware
func (*MySQLClusterRepo) GetAppUsersByID ¶ added in v1.1.1
func (mcr *MySQLClusterRepo) GetAppUsersByID(id int) ([]metadata.User, error)
GetAppUsersByID gets the application users of the given id from the middleware
func (*MySQLClusterRepo) GetByEnv ¶
func (mcr *MySQLClusterRepo) GetByEnv(envID int) ([]metadata.MySQLCluster, error)
GetByEnv gets mysql clusters of given env id from the middleware
func (*MySQLClusterRepo) GetByID ¶
func (mcr *MySQLClusterRepo) GetByID(id int) (metadata.MySQLCluster, error)
GetByID Select returns an available entity of the given id
func (*MySQLClusterRepo) GetByName ¶
func (mcr *MySQLClusterRepo) GetByName(clusterName string) (metadata.MySQLCluster, error)
GetByName gets a mysql cluster of given cluster name from the middle ware
func (*MySQLClusterRepo) GetDBUsersByID ¶ added in v1.1.1
func (mcr *MySQLClusterRepo) GetDBUsersByID(id int) ([]metadata.User, error)
GetDBUsersByID gets the db users of the given id from the middleware
func (*MySQLClusterRepo) GetDBsByID ¶ added in v1.1.0
func (mcr *MySQLClusterRepo) GetDBsByID(id int) ([]metadata.DB, error)
GetDBsByID gets the databases of the given id from the middleware
func (*MySQLClusterRepo) GetID ¶
func (mcr *MySQLClusterRepo) GetID(clusterName string) (int, error)
GetID checks identity of given entity from the middleware
func (*MySQLClusterRepo) GetResourceGroupByID ¶ added in v1.1.1
func (mcr *MySQLClusterRepo) GetResourceGroupByID(id int) (metadata.ResourceGroup, error)
GetResourceGroupByID get the resource group of the given id from the middleware
func (*MySQLClusterRepo) GetUsersByID ¶ added in v1.1.1
func (mcr *MySQLClusterRepo) GetUsersByID(id int) ([]metadata.User, error)
GetUsersByID gets the users of the given id from the middleware
func (*MySQLClusterRepo) Transaction ¶
func (mcr *MySQLClusterRepo) Transaction() (middleware.Transaction, error)
Transaction returns middleware.PoolConn
func (*MySQLClusterRepo) Update ¶
func (mcr *MySQLClusterRepo) Update(entity metadata.MySQLCluster) error
Update updates data with given entity in the middleware
type MySQLClusterService ¶
type MySQLClusterService struct {
MySQLClusterRepo metadata.MySQLClusterRepo
MySQLClusters []metadata.MySQLCluster `json:"mysql_clusters"`
MySQLServers []metadata.MySQLServer `json:"mysql_servers"`
DBs []metadata.DB `json:"dbs"`
Users []metadata.User `json:"users"`
ResourceGroup metadata.ResourceGroup `json:"resource_group"`
}
MySQLClusterService implements Service interface
func (*MySQLClusterService) AddUser ¶ added in v1.1.1
func (mcs *MySQLClusterService) AddUser(mysqlClusterID, userID int) error
AddUser adds a new map of mysql cluster and user in the middleware
func (*MySQLClusterService) Create ¶
func (mcs *MySQLClusterService) Create(fields map[string]interface{}) error
Create creates a new mysql cluster entity and insert it into the middleware
func (*MySQLClusterService) Delete ¶
func (mcs *MySQLClusterService) Delete(id int) error
Delete deletes the mysql cluster entity that contains the given id in the middleware
func (*MySQLClusterService) DeleteUser ¶ added in v1.1.1
func (mcs *MySQLClusterService) DeleteUser(mysqlClusterID, userID int) error
DeleteUser deletes the map of mysql cluster and user in the middleware
func (*MySQLClusterService) GetAll ¶
func (mcs *MySQLClusterService) GetAll() error
GetAll gets all mysql cluster entities from the middleware
func (*MySQLClusterService) GetAllUsersByID ¶ added in v1.1.1
func (mcs *MySQLClusterService) GetAllUsersByID(id int) error
GetAllUsersByID gets both application and db users of the given id
func (*MySQLClusterService) GetAppUsersByID ¶ added in v1.1.1
func (mcs *MySQLClusterService) GetAppUsersByID(id int) error
GetAppUsersByID gets the application users of the given id
func (*MySQLClusterService) GetByEnv ¶
func (mcs *MySQLClusterService) GetByEnv(envID int) error
GetByEnv gets mysql clusters of given env id
func (*MySQLClusterService) GetByID ¶
func (mcs *MySQLClusterService) GetByID(id int) error
GetByID gets a mysql cluster entity that contains the given id from the middleware
func (*MySQLClusterService) GetByName ¶
func (mcs *MySQLClusterService) GetByName(clusterName string) error
GetByName gets a mysql cluster of given cluster name
func (*MySQLClusterService) GetDBUsersByID ¶ added in v1.1.1
func (mcs *MySQLClusterService) GetDBUsersByID(id int) error
GetDBUsersByID gets the db users of the given id
func (*MySQLClusterService) GetDBs ¶ added in v1.1.0
func (mcs *MySQLClusterService) GetDBs() []metadata.DB
GetDBs returns the dbs of the service
func (*MySQLClusterService) GetDBsByID ¶ added in v1.1.0
func (mcs *MySQLClusterService) GetDBsByID(id int) error
GetDBsByID gets the databases of the given id
func (*MySQLClusterService) GetMasterServersByID ¶ added in v1.1.0
func (mcs *MySQLClusterService) GetMasterServersByID(id int) error
GetMasterServersByID gets the master servers of this cluster
func (*MySQLClusterService) GetMySQLClusters ¶
func (mcs *MySQLClusterService) GetMySQLClusters() []metadata.MySQLCluster
GetMySQLClusters returns the mysql clusters of the service
func (*MySQLClusterService) GetMySQLServers ¶ added in v1.1.0
func (mcs *MySQLClusterService) GetMySQLServers() []metadata.MySQLServer
GetMySQLServers returns the mysql servers of the service
func (*MySQLClusterService) GetMySQLServersByID ¶ added in v1.1.0
func (mcs *MySQLClusterService) GetMySQLServersByID(id int) error
GetMySQLServersByID gets the mysql servers of given id
func (*MySQLClusterService) GetResourceGroup ¶ added in v1.1.1
func (mcs *MySQLClusterService) GetResourceGroup() metadata.ResourceGroup
GetResourceGroup returns the dbs of the service
func (*MySQLClusterService) GetResourceGroupByID ¶ added in v1.1.1
func (mcs *MySQLClusterService) GetResourceGroupByID(id int) error
GetResourceGroupByID get the resource group of the given id from the middleware
func (*MySQLClusterService) GetUsers ¶ added in v1.1.1
func (mcs *MySQLClusterService) GetUsers() []metadata.User
GetUsers returns the users of the service
func (*MySQLClusterService) GetUsersByID ¶ added in v1.1.1
func (mcs *MySQLClusterService) GetUsersByID(id int) error
GetUsersByID gets the users of the given id
func (*MySQLClusterService) Marshal ¶
func (mcs *MySQLClusterService) Marshal() ([]byte, error)
Marshal marshals service.Envs
func (*MySQLClusterService) MarshalWithFields ¶
func (mcs *MySQLClusterService) MarshalWithFields(fields ...string) ([]byte, error)
MarshalWithFields marshals service.Envs with given fields
func (*MySQLClusterService) Update ¶
func (mcs *MySQLClusterService) Update(id int, fields map[string]interface{}) error
Update gets an mysql cluster entity that contains the given id from the middleware, and then update its fields that was specified in fields argument, key is the filed name and value is the new field value, it saves the changes to the middleware
type MySQLServerInfo ¶
type MySQLServerInfo struct {
metadata.MySQLServerRepo
ID int `middleware:"id" json:"id"`
ClusterID int `middleware:"cluster_id" json:"cluster_id"`
ServerName string `middleware:"server_name" json:"server_name"`
ServiceName string `middleware:"service_name" json:"service_name"`
HostIP string `middleware:"host_ip" json:"host_ip"`
PortNum int `middleware:"port_num" json:"port_num"`
DeploymentType int `middleware:"deployment_type" json:"deployment_type"`
Version string `middleware:"version" json:"version"`
DelFlag int `middleware:"del_flag" json:"del_flag"`
CreateTime time.Time `middleware:"create_time" json:"create_time"`
LastUpdateTime time.Time `middleware:"last_update_time" json:"last_update_time"`
}
MySQLServerInfo is a struct map to table in the database
func (*MySQLServerInfo) Delete ¶
func (msi *MySQLServerInfo) Delete()
Delete sets DelFlag to true, need to use Save to write to the middleware
func (*MySQLServerInfo) GetClusterID ¶
func (msi *MySQLServerInfo) GetClusterID() int
GetClusterID returns the mysql cluster id
func (*MySQLServerInfo) GetCreateTime ¶
func (msi *MySQLServerInfo) GetCreateTime() time.Time
GetCreateTime returns created time of entity
func (*MySQLServerInfo) GetDelFlag ¶
func (msi *MySQLServerInfo) GetDelFlag() int
GetDelFlag returns the delete flag
func (*MySQLServerInfo) GetDeploymentType ¶
func (msi *MySQLServerInfo) GetDeploymentType() int
GetDeploymentType returns the deployment type
func (*MySQLServerInfo) GetHostIP ¶
func (msi *MySQLServerInfo) GetHostIP() string
GetHostIP returns the host ip
func (*MySQLServerInfo) GetLastUpdateTime ¶
func (msi *MySQLServerInfo) GetLastUpdateTime() time.Time
GetLastUpdateTime returns last updated time of entity
func (*MySQLServerInfo) GetMonitorSystem ¶
func (msi *MySQLServerInfo) GetMonitorSystem() (metadata.MonitorSystem, error)
GetMonitorSystem gets monitor system of this server
func (*MySQLServerInfo) GetMySQLCluster ¶ added in v1.1.0
func (msi *MySQLServerInfo) GetMySQLCluster() (metadata.MySQLCluster, error)
GetMySQLCluster gets mysql cluster of this server
func (*MySQLServerInfo) GetPortNum ¶
func (msi *MySQLServerInfo) GetPortNum() int
GetPortNum returns the port number
func (*MySQLServerInfo) GetServerName ¶
func (msi *MySQLServerInfo) GetServerName() string
GetServerName returns the server name
func (*MySQLServerInfo) GetServiceName ¶
func (msi *MySQLServerInfo) GetServiceName() string
GetServiceName returns the service name
func (*MySQLServerInfo) GetVersion ¶
func (msi *MySQLServerInfo) GetVersion() string
GetVersion returns the version
func (*MySQLServerInfo) Identity ¶
func (msi *MySQLServerInfo) Identity() int
Identity returns ID of entity
func (*MySQLServerInfo) IsMaster ¶ added in v1.1.0
func (msi *MySQLServerInfo) IsMaster() (bool, error)
IsMaster returns if this mysql server is a master node
func (*MySQLServerInfo) MarshalJSON ¶
func (msi *MySQLServerInfo) MarshalJSON() ([]byte, error)
MarshalJSON marshals entity to json string, it only marshals fields that has default tag
func (*MySQLServerInfo) MarshalJSONWithFields ¶
func (msi *MySQLServerInfo) MarshalJSONWithFields(fields ...string) ([]byte, error)
MarshalJSONWithFields marshals only with specified fields of entity to json string
func (*MySQLServerInfo) Set ¶
func (msi *MySQLServerInfo) Set(fields map[string]interface{}) error
Set sets entity with given fields, key is the field name and value is the relevant value of the key
type MySQLServerRepo ¶
type MySQLServerRepo struct {
Database middleware.Pool
}
MySQLServerRepo implements dependency.MySQLServerRepo interface
func (*MySQLServerRepo) Create ¶
func (msr *MySQLServerRepo) Create(mysqlServer metadata.MySQLServer) (metadata.MySQLServer, error)
Create creates data with given mysqlServer in the middleware
func (*MySQLServerRepo) Delete ¶
func (msr *MySQLServerRepo) Delete(id int) error
Delete deletes data in the middleware, it is recommended to use soft deletion, therefore use update instead of delete
func (*MySQLServerRepo) Execute ¶
func (msr *MySQLServerRepo) Execute(command string, args ...interface{}) (middleware.Result, error)
Execute implements dependency.MySQLServerRepo interface, it executes command with arguments on database
func (*MySQLServerRepo) GetAll ¶
func (msr *MySQLServerRepo) GetAll() ([]metadata.MySQLServer, error)
GetAll returns all available entities
func (*MySQLServerRepo) GetByClusterID ¶
func (msr *MySQLServerRepo) GetByClusterID(clusterID int) ([]metadata.MySQLServer, error)
GetByClusterID Select returns an available mysqlServer of the given cluster id
func (*MySQLServerRepo) GetByHostInfo ¶
func (msr *MySQLServerRepo) GetByHostInfo(hostIP string, portNum int) (metadata.MySQLServer, error)
GetByHostInfo gets a mysql server with given host ip and port number
func (*MySQLServerRepo) GetByID ¶
func (msr *MySQLServerRepo) GetByID(id int) (metadata.MySQLServer, error)
GetByID Select returns an available mysqlServer of the given id
func (*MySQLServerRepo) GetID ¶
func (msr *MySQLServerRepo) GetID(hostIP string, portNum int) (int, error)
GetID gets the identity with given host ip and port number from the mysql
func (*MySQLServerRepo) GetMonitorSystem ¶
func (msr *MySQLServerRepo) GetMonitorSystem(id int) (metadata.MonitorSystem, error)
GetMonitorSystem gets monitor system with given mysql server id from the mysql
func (*MySQLServerRepo) GetMySQLClusterByID ¶ added in v1.1.0
func (msr *MySQLServerRepo) GetMySQLClusterByID(id int) (metadata.MySQLCluster, error)
GetMySQLClusterByID gets the mysql cluster of the given id
func (*MySQLServerRepo) IsMaster ¶ added in v1.1.0
func (msr *MySQLServerRepo) IsMaster(hostIP string, portNum int) (bool, error)
IsMaster returns if mysql server of given host ip and port number is a master node
func (*MySQLServerRepo) Transaction ¶
func (msr *MySQLServerRepo) Transaction() (middleware.Transaction, error)
Transaction returns middleware.PoolConn
func (*MySQLServerRepo) Update ¶
func (msr *MySQLServerRepo) Update(mysqlServer metadata.MySQLServer) error
Update updates data with given mysqlServer in the middleware
type MySQLServerService ¶
type MySQLServerService struct {
MySQLServerRepo metadata.MySQLServerRepo
MySQLServers []metadata.MySQLServer `json:"mysql_servers"`
MySQLCluster metadata.MySQLCluster `json:"mysql_cluster"`
}
MySQLServerService implements Service interface
func (*MySQLServerService) Create ¶
func (mss *MySQLServerService) Create(fields map[string]interface{}) error
Create creates a new mysql server entity and insert it into the middleware
func (*MySQLServerService) Delete ¶
func (mss *MySQLServerService) Delete(id int) error
Delete deletes the mysql server entity that contains the given id in the middleware
func (*MySQLServerService) GetAll ¶
func (mss *MySQLServerService) GetAll() error
GetAll gets all mysql server entities from the middleware
func (*MySQLServerService) GetByClusterID ¶
func (mss *MySQLServerService) GetByClusterID(clusterID int) error
GetByClusterID gets mysql servers with given cluster id
func (*MySQLServerService) GetByHostInfo ¶
func (mss *MySQLServerService) GetByHostInfo(hostIP string, portNum int) error
GetByHostInfo gets a mysql server with given host ip and port number
func (*MySQLServerService) GetByID ¶
func (mss *MySQLServerService) GetByID(id int) error
GetByID gets an mysql server entity that contains the given id from the middleware
func (*MySQLServerService) GetMySQLCluster ¶ added in v1.1.0
func (mss *MySQLServerService) GetMySQLCluster() metadata.MySQLCluster
GetMySQLCluster returns the mysql cluster of the service
func (*MySQLServerService) GetMySQLClusterByID ¶ added in v1.1.0
func (mss *MySQLServerService) GetMySQLClusterByID(id int) error
GetMySQLClusterByID gets the mysql cluster of the given id
func (*MySQLServerService) GetMySQLServers ¶
func (mss *MySQLServerService) GetMySQLServers() []metadata.MySQLServer
GetMySQLServers returns the mysql servers of the service
func (*MySQLServerService) IsMaster ¶ added in v1.1.0
func (mss *MySQLServerService) IsMaster(hostIP string, portNum int) (bool, error)
IsMaster returns if mysql server with given host ip and port number is a master node
func (*MySQLServerService) Marshal ¶
func (mss *MySQLServerService) Marshal() ([]byte, error)
Marshal marshals service.Envs
func (*MySQLServerService) MarshalWithFields ¶
func (mss *MySQLServerService) MarshalWithFields(fields ...string) ([]byte, error)
MarshalWithFields marshals service.Envs with given fields
func (*MySQLServerService) Update ¶
func (mss *MySQLServerService) Update(id int, fields map[string]interface{}) error
Update gets an mysql server entity that contains the given id from the middleware, and then update its fields that was specified in fields argument, key is the filed name and value is the new field value, it saves the changes to the middleware
type ResourceGroupInfo ¶ added in v1.1.1
type ResourceGroupInfo struct {
ResourceGroupRepo metadata.ResourceGroupRepo
ID int `middleware:"id" json:"id"`
GroupUUID string `middleware:"group_uuid" json:"group_uuid"`
GroupName string `middleware:"group_name" json:"group_name"`
DelFlag int `middleware:"del_flag" json:"del_flag"`
CreateTime time.Time `middleware:"create_time" json:"create_time"`
LastUpdateTime time.Time `middleware:"last_update_time" json:"last_update_time"`
}
func (*ResourceGroupInfo) AddMiddlewareCluster ¶ added in v1.1.1
func (rgi *ResourceGroupInfo) AddMiddlewareCluster(mysqlClusterID int) error
AddMiddlewareCluster adds middleware cluster to the resource group
func (*ResourceGroupInfo) AddMySQLCluster ¶ added in v1.1.1
func (rgi *ResourceGroupInfo) AddMySQLCluster(mysqlClusterID int) error
AddMySQLCluster adds mysql cluster to the resource group
func (*ResourceGroupInfo) AddResourceRole ¶ added in v1.1.1
func (rgi *ResourceGroupInfo) AddResourceRole(resourceRoleID int) error
AddResourceRole adds resource role to the resource group
func (*ResourceGroupInfo) Delete ¶ added in v1.1.1
func (rgi *ResourceGroupInfo) Delete()
Delete sets DelFlag to 1
func (*ResourceGroupInfo) DeleteMiddlewareCluster ¶ added in v1.1.1
func (rgi *ResourceGroupInfo) DeleteMiddlewareCluster(middlewareClusterID int) error
DeleteMiddlewareCluster deletes middleware cluster from the resource group
func (*ResourceGroupInfo) DeleteMySQLCluster ¶ added in v1.1.1
func (rgi *ResourceGroupInfo) DeleteMySQLCluster(mysqlClusterID int) error
DeleteMySQLCluster deletes mysql cluster from the resource group
func (*ResourceGroupInfo) DeleteResourceRole ¶ added in v1.1.1
func (rgi *ResourceGroupInfo) DeleteResourceRole(middlewareClusterID int) error
DeleteResourceRole deletes resource role from the resource group
func (*ResourceGroupInfo) GetCreateTime ¶ added in v1.1.1
func (rgi *ResourceGroupInfo) GetCreateTime() time.Time
GetCreateTime returns the CreateTime
func (*ResourceGroupInfo) GetDASAdminUsers ¶ added in v1.1.1
func (rgi *ResourceGroupInfo) GetDASAdminUsers() ([]metadata.User, error)
GetDASAdminUsers gets the das admin users of this resource group
func (*ResourceGroupInfo) GetDelFlag ¶ added in v1.1.1
func (rgi *ResourceGroupInfo) GetDelFlag() int
GetDelFlag returns the DelFlag
func (*ResourceGroupInfo) GetGroupName ¶ added in v1.1.1
func (rgi *ResourceGroupInfo) GetGroupName() string
GetGroupName returns the GroupName
func (*ResourceGroupInfo) GetGroupUUID ¶ added in v1.1.1
func (rgi *ResourceGroupInfo) GetGroupUUID() string
GetGroupUUID returns the GroupUUID
func (*ResourceGroupInfo) GetLastUpdateTime ¶ added in v1.1.1
func (rgi *ResourceGroupInfo) GetLastUpdateTime() time.Time
GetLastUpdateTime returns the LastUpdateTime
func (*ResourceGroupInfo) GetMiddlewareClusters ¶ added in v1.1.1
func (rgi *ResourceGroupInfo) GetMiddlewareClusters() ([]metadata.MiddlewareCluster, error)
GetMiddlewareClusters gets the mysql clusters of this resource group
func (*ResourceGroupInfo) GetMiddlewareServers ¶ added in v1.1.1
func (rgi *ResourceGroupInfo) GetMiddlewareServers() ([]metadata.MiddlewareServer, error)
GetMiddlewareServers gets the mysql servers of this resource group
func (*ResourceGroupInfo) GetMySQLClusters ¶ added in v1.1.1
func (rgi *ResourceGroupInfo) GetMySQLClusters() ([]metadata.MySQLCluster, error)
GetMySQLClusters gets the mysql clusters of this resource group
func (*ResourceGroupInfo) GetMySQLServers ¶ added in v1.1.1
func (rgi *ResourceGroupInfo) GetMySQLServers() ([]metadata.MySQLServer, error)
GetMySQLServers gets the mysql servers of this resource group
func (*ResourceGroupInfo) GetResourceGroupRepo ¶ added in v1.1.1
func (rgi *ResourceGroupInfo) GetResourceGroupRepo() metadata.ResourceGroupRepo
GetResourceGroupRepo returns the ResourceGroupRepo
func (*ResourceGroupInfo) GetResourceRoles ¶ added in v1.1.1
func (rgi *ResourceGroupInfo) GetResourceRoles() ([]metadata.ResourceRole, error)
GetResourceRoles get all resource roles of this resource group
func (*ResourceGroupInfo) GetUsers ¶ added in v1.1.1
func (rgi *ResourceGroupInfo) GetUsers() ([]metadata.User, error)
GetUsers gets the users of this resource group
func (*ResourceGroupInfo) Identity ¶ added in v1.1.1
func (rgi *ResourceGroupInfo) Identity() int
Identity returns the Identity
func (*ResourceGroupInfo) MarshalJSON ¶ added in v1.1.1
func (rgi *ResourceGroupInfo) MarshalJSON() ([]byte, error)
MarshalJSON marshals ResourceGroup to json string
func (*ResourceGroupInfo) MarshalJSONWithFields ¶ added in v1.1.1
func (rgi *ResourceGroupInfo) MarshalJSONWithFields(fields ...string) ([]byte, error)
MarshalJSONWithFields marshals only specified field of the ResourceGroup to json string
func (*ResourceGroupInfo) Set ¶ added in v1.1.1
func (rgi *ResourceGroupInfo) Set(fields map[string]interface{}) error
Set sets the resource group with given fields, key is the field name and value is the relevant value of the key
type ResourceGroupRepo ¶ added in v1.1.1
type ResourceGroupRepo struct {
Database middleware.Pool
}
func (*ResourceGroupRepo) AddMiddlewareCluster ¶ added in v1.1.1
func (rgr *ResourceGroupRepo) AddMiddlewareCluster(resourceGroupID int, middlewareClusterID int) error
AddMiddlewareCluster adds middleware cluster to the resource group
func (*ResourceGroupRepo) AddMySQLCluster ¶ added in v1.1.1
func (rgr *ResourceGroupRepo) AddMySQLCluster(resourceGroupID int, mysqlClusterID int) error
AddMySQLCluster adds mysql cluster to the resource group
func (*ResourceGroupRepo) AddResourceRole ¶ added in v1.1.1
func (rgr *ResourceGroupRepo) AddResourceRole(resourceGroupID int, resourceRoleID int) error
AddResourceRole adds resource role to the resource group
func (*ResourceGroupRepo) Create ¶ added in v1.1.1
func (rgr *ResourceGroupRepo) Create(rg metadata.ResourceGroup) (metadata.ResourceGroup, error)
Create creates data with given entity in the middleware
func (*ResourceGroupRepo) Delete ¶ added in v1.1.1
func (rgr *ResourceGroupRepo) Delete(id int) error
Delete deletes data in the middleware, it will also delete concerning map data
func (*ResourceGroupRepo) DeleteMiddlewareCluster ¶ added in v1.1.1
func (rgr *ResourceGroupRepo) DeleteMiddlewareCluster(resourceGroupID, middlewareClusterID int) error
DeleteMiddlewareCluster deletes middleware cluster from the resource group
func (*ResourceGroupRepo) DeleteMySQLCluster ¶ added in v1.1.1
func (rgr *ResourceGroupRepo) DeleteMySQLCluster(resourceGroupID, mysqlClusterID int) error
DeleteMySQLCluster deletes mysql cluster from the resource group
func (*ResourceGroupRepo) DeleteResourceRole ¶ added in v1.1.1
func (rgr *ResourceGroupRepo) DeleteResourceRole(resourceGroupID, resourceRoleID int) error
DeleteResourceRole deletes resource role from the resource group
func (*ResourceGroupRepo) Execute ¶ added in v1.1.1
func (rgr *ResourceGroupRepo) Execute(command string, args ...interface{}) (middleware.Result, error)
Execute implements metadata.ResourceGroupRepo interface, it executes command with arguments on database
func (*ResourceGroupRepo) GetAll ¶ added in v1.1.1
func (rgr *ResourceGroupRepo) GetAll() ([]metadata.ResourceGroup, error)
GetAll returns all available entities
func (*ResourceGroupRepo) GetByGroupUUID ¶ added in v1.1.1
func (rgr *ResourceGroupRepo) GetByGroupUUID(groupUUID string) (metadata.ResourceGroup, error)
GetByGroupUUID gets the resource group with given resource group id from the middleware
func (*ResourceGroupRepo) GetByID ¶ added in v1.1.1
func (rgr *ResourceGroupRepo) GetByID(id int) (metadata.ResourceGroup, error)
GetByID Select returns an available entity of the given id
func (*ResourceGroupRepo) GetDASAdminUsersByID ¶ added in v1.1.1
func (rgr *ResourceGroupRepo) GetDASAdminUsersByID(id int) ([]metadata.User, error)
GetDASAdminUsersByID gets the users of the given id from the middleware
func (*ResourceGroupRepo) GetID ¶ added in v1.1.1
func (rgr *ResourceGroupRepo) GetID(groupUUID string) (int, error)
GetID gets the identity with given resource group id from the middleware
func (*ResourceGroupRepo) GetMiddlewareClustersByID ¶ added in v1.1.1
func (rgr *ResourceGroupRepo) GetMiddlewareClustersByID(id int) ([]metadata.MiddlewareCluster, error)
GetMiddlewareClustersByID gets the middleware cluster with given resource group id from the middleware
func (*ResourceGroupRepo) GetMiddlewareServersByID ¶ added in v1.1.1
func (rgr *ResourceGroupRepo) GetMiddlewareServersByID(id int) ([]metadata.MiddlewareServer, error)
GetMiddlewareServersByID gets the middleware servers with given resource group uuid from the middleware
func (*ResourceGroupRepo) GetMySQLClustersByID ¶ added in v1.1.1
func (rgr *ResourceGroupRepo) GetMySQLClustersByID(id int) ([]metadata.MySQLCluster, error)
GetMySQLClustersByID gets the mysql cluster with given resource group id from the middleware
func (*ResourceGroupRepo) GetMySQLServersByID ¶ added in v1.1.1
func (rgr *ResourceGroupRepo) GetMySQLServersByID(id int) ([]metadata.MySQLServer, error)
GetMySQLServersByID gets the mysql servers with given resource group uuid from the middleware
func (*ResourceGroupRepo) GetResourceRolesByID ¶ added in v1.1.1
func (rgr *ResourceGroupRepo) GetResourceRolesByID(id int) ([]metadata.ResourceRole, error)
GetResourceRolesByID get all resource roles with given resource group id from the middleware
func (*ResourceGroupRepo) GetUsersByID ¶ added in v1.1.1
func (rgr *ResourceGroupRepo) GetUsersByID(id int) ([]metadata.User, error)
GetUsersByID gets the users of the given id from the middleware
func (*ResourceGroupRepo) Transaction ¶ added in v1.1.1
func (rgr *ResourceGroupRepo) Transaction() (middleware.Transaction, error)
Transaction returns middleware.PoolConn
func (*ResourceGroupRepo) Update ¶ added in v1.1.1
func (rgr *ResourceGroupRepo) Update(rg metadata.ResourceGroup) error
Update updates data with given entity in the middleware
type ResourceGroupService ¶ added in v1.1.1
type ResourceGroupService struct {
ResourceGroupRepo metadata.ResourceGroupRepo
ResourceGroups []metadata.ResourceGroup `json:"resource_groups"`
ResourceRoles []metadata.ResourceRole `json:"resource_roles"`
MySQLClusters []metadata.MySQLCluster `json:"mysql_clusters"`
MySQLServers []metadata.MySQLServer `json:"mysql_servers"`
MiddlewareClusters []metadata.MiddlewareCluster `json:"middleware_clusters"`
MiddlewareServers []metadata.MiddlewareServer `json:"middleware_servers"`
Users []metadata.User `json:"users"`
}
func (*ResourceGroupService) AddMiddlewareCluster ¶ added in v1.1.1
func (rgs *ResourceGroupService) AddMiddlewareCluster(resourceGroupID int, middlewareClusterID int) error
AddMiddlewareCluster adds middleware cluster to the resource group
func (*ResourceGroupService) AddMySQLCluster ¶ added in v1.1.1
func (rgs *ResourceGroupService) AddMySQLCluster(resourceGroupID int, mysqlClusterID int) error
AddMySQLCluster adds mysql cluster to the resource group
func (*ResourceGroupService) AddResourceRole ¶ added in v1.1.1
func (rgs *ResourceGroupService) AddResourceRole(resourceGroupID int, resourceRoleID int) error
AddResourceRole adds resource role to the resource group
func (*ResourceGroupService) Create ¶ added in v1.1.1
func (rgs *ResourceGroupService) Create(fields map[string]interface{}) error
Create creates a mysql server in the mysql
func (*ResourceGroupService) Delete ¶ added in v1.1.1
func (rgs *ResourceGroupService) Delete(id int) error
Delete deletes the mysql server of given id
func (*ResourceGroupService) DeleteMiddlewareCluster ¶ added in v1.1.1
func (rgs *ResourceGroupService) DeleteMiddlewareCluster(resourceGroupID int, middlewareClusterID int) error
DeleteMiddlewareCluster deletes middleware cluster from the resource group
func (*ResourceGroupService) DeleteMySQLCluster ¶ added in v1.1.1
func (rgs *ResourceGroupService) DeleteMySQLCluster(resourceGroupID int, mysqlClusterID int) error
DeleteMySQLCluster deletes mysql cluster from the resource group
func (*ResourceGroupService) DeleteResourceRole ¶ added in v1.1.1
func (rgs *ResourceGroupService) DeleteResourceRole(resourceGroupID int, resourceRoleID int) error
DeleteResourceRole deletes resource role from the resource group
func (*ResourceGroupService) GetAll ¶ added in v1.1.1
func (rgs *ResourceGroupService) GetAll() error
GetAll gets all mysql servers from the mysql
func (*ResourceGroupService) GetByGroupUUID ¶ added in v1.1.1
func (rgs *ResourceGroupService) GetByGroupUUID(groupUUID string) error
GetByGroupUUID gets the resource group by group uuid
func (*ResourceGroupService) GetByID ¶ added in v1.1.1
func (rgs *ResourceGroupService) GetByID(id int) error
GetByID gets the resource group of the given id
func (*ResourceGroupService) GetDASAdminUsersByGroupUUID ¶ added in v1.1.1
func (rgs *ResourceGroupService) GetDASAdminUsersByGroupUUID(groupUUID string) error
GetDASAdminUsersByGroupUUID gets the das admin users with given resource group uuid
func (*ResourceGroupService) GetDASAdminUsersByID ¶ added in v1.1.1
func (rgs *ResourceGroupService) GetDASAdminUsersByID(id int) error
GetDASAdminUsersByID gets the das admin users with given resource group id
func (*ResourceGroupService) GetMiddlewareClusters ¶ added in v1.1.1
func (rgs *ResourceGroupService) GetMiddlewareClusters() []metadata.MiddlewareCluster
GetMiddlewareClusters returns the middleware clusters of the service
func (*ResourceGroupService) GetMiddlewareClustersByGroupUUID ¶ added in v1.1.1
func (rgs *ResourceGroupService) GetMiddlewareClustersByGroupUUID(groupUUID string) error
GetMiddlewareClustersByGroupUUID gets the middleware clusters with given resource group uuid
func (*ResourceGroupService) GetMiddlewareClustersByID ¶ added in v1.1.1
func (rgs *ResourceGroupService) GetMiddlewareClustersByID(id int) error
GetMiddlewareClustersByID gets the middleware clusters with given resource group id
func (*ResourceGroupService) GetMiddlewareServers ¶ added in v1.1.1
func (rgs *ResourceGroupService) GetMiddlewareServers() []metadata.MiddlewareServer
GetMiddlewareServers returns the middleware servers of the service
func (*ResourceGroupService) GetMiddlewareServersByGroupUUID ¶ added in v1.1.1
func (rgs *ResourceGroupService) GetMiddlewareServersByGroupUUID(groupUUID string) error
GetMiddlewareServersByGroupUUID gets the middleware servers with given resource group uuid
func (*ResourceGroupService) GetMiddlewareServersByID ¶ added in v1.1.1
func (rgs *ResourceGroupService) GetMiddlewareServersByID(id int) error
GetMiddlewareServersByID gets the middleware servers with given resource group id
func (*ResourceGroupService) GetMySQLClusters ¶ added in v1.1.1
func (rgs *ResourceGroupService) GetMySQLClusters() []metadata.MySQLCluster
GetMySQLClusters returns the mysql clusters of the service
func (*ResourceGroupService) GetMySQLClustersByGroupUUID ¶ added in v1.1.1
func (rgs *ResourceGroupService) GetMySQLClustersByGroupUUID(groupUUID string) error
GetMySQLClustersByGroupUUID gets the mysql clusters with given resource group uuid
func (*ResourceGroupService) GetMySQLClustersByID ¶ added in v1.1.1
func (rgs *ResourceGroupService) GetMySQLClustersByID(id int) error
GetMySQLClustersByID gets the mysql clusters with given resource group id
func (*ResourceGroupService) GetMySQLServers ¶ added in v1.1.1
func (rgs *ResourceGroupService) GetMySQLServers() []metadata.MySQLServer
GetMySQLServers returns the mysql servers of the service
func (*ResourceGroupService) GetMySQLServersByGroupUUID ¶ added in v1.1.1
func (rgs *ResourceGroupService) GetMySQLServersByGroupUUID(groupUUID string) error
GetMySQLServersByGroupUUID gets the mysql servers with given resource group uuid
func (*ResourceGroupService) GetMySQLServersByID ¶ added in v1.1.1
func (rgs *ResourceGroupService) GetMySQLServersByID(id int) error
GetMySQLServersByID gets the mysql servers with given resource group id
func (*ResourceGroupService) GetResourceGroups ¶ added in v1.1.1
func (rgs *ResourceGroupService) GetResourceGroups() []metadata.ResourceGroup
GetResourceGroups returns resource groups of the service
func (*ResourceGroupService) GetResourceRoles ¶ added in v1.1.1
func (rgs *ResourceGroupService) GetResourceRoles() []metadata.ResourceRole
GetResourceRoles returns the resource roles of the service
func (*ResourceGroupService) GetResourceRolesByGroupUUID ¶ added in v1.1.1
func (rgs *ResourceGroupService) GetResourceRolesByGroupUUID(groupUUID string) error
GetResourceRolesByGroupUUID get all resource roles with given resource group uuid
func (*ResourceGroupService) GetResourceRolesByID ¶ added in v1.1.1
func (rgs *ResourceGroupService) GetResourceRolesByID(id int) error
GetResourceRolesByID get all resource roles with given resource group id
func (*ResourceGroupService) GetUsers ¶ added in v1.1.1
func (rgs *ResourceGroupService) GetUsers() []metadata.User
GetUsers returns the users of the service
func (*ResourceGroupService) GetUsersByGroupUUID ¶ added in v1.1.1
func (rgs *ResourceGroupService) GetUsersByGroupUUID(groupUUID string) error
GetUsersByGroupUUID gets the users with given resource group uuid
func (*ResourceGroupService) GetUsersByID ¶ added in v1.1.1
func (rgs *ResourceGroupService) GetUsersByID(id int) error
GetUsersByID gets the users with given resource group id
func (*ResourceGroupService) Marshal ¶ added in v1.1.1
func (rgs *ResourceGroupService) Marshal() ([]byte, error)
Marshal marshals ResourceGroupService.ResourceGroups to json bytes
func (*ResourceGroupService) MarshalWithFields ¶ added in v1.1.1
func (rgs *ResourceGroupService) MarshalWithFields(fields ...string) ([]byte, error)
MarshalWithFields marshals only specified fields of the ResourceGroupService to json bytes
func (*ResourceGroupService) Update ¶ added in v1.1.1
func (rgs *ResourceGroupService) Update(id int, fields map[string]interface{}) error
Update gets a mysql server of the given id from the mysql, and then updates its fields that was specified in fields argument, key is the filed name and value is the new field value, it saves the changes to the mysql
type ResourceRoleInfo ¶ added in v1.1.1
type ResourceRoleInfo struct {
ResourceRoleRepo metadata.ResourceRoleRepo
ID int `middleware:"id" json:"id"`
RoleUUID string `middleware:"role_uuid" json:"role_uuid"`
RoleName string `middleware:"role_name" json:"role_name"`
DelFlag int `middleware:"del_flag" json:"del_flag"`
CreateTime time.Time `middleware:"create_time" json:"create_time"`
LastUpdateTime time.Time `middleware:"last_update_time" json:"last_update_time"`
}
ResourceRoleInfo is the entity interface
func (*ResourceRoleInfo) AddResourceGroup ¶ added in v1.1.1
func (rri *ResourceRoleInfo) AddResourceGroup(resourceGroupID int) error
AddResourceGroup adds a map of resource role and resource group
func (*ResourceRoleInfo) AddUser ¶ added in v1.1.1
func (rri *ResourceRoleInfo) AddUser(userID int) error
AddUser adds a map of the resource role and user
func (*ResourceRoleInfo) Delete ¶ added in v1.1.1
func (rri *ResourceRoleInfo) Delete()
Delete sets DelFlag to 1
func (*ResourceRoleInfo) DeleteResourceGroup ¶ added in v1.1.1
func (rri *ResourceRoleInfo) DeleteResourceGroup(resourceGroupID int) error
DeleteResourceGroup deletes the map of resource role and resource
func (*ResourceRoleInfo) DeleteUser ¶ added in v1.1.1
func (rri *ResourceRoleInfo) DeleteUser(userID int) error
DeleteUser deletes the map of the resource role and user
func (*ResourceRoleInfo) GetCreateTime ¶ added in v1.1.1
func (rri *ResourceRoleInfo) GetCreateTime() time.Time
GetCreateTime returns created time
func (*ResourceRoleInfo) GetDelFlag ¶ added in v1.1.1
func (rri *ResourceRoleInfo) GetDelFlag() int
GetDelFlag returns the delete flag
func (*ResourceRoleInfo) GetLastUpdateTime ¶ added in v1.1.1
func (rri *ResourceRoleInfo) GetLastUpdateTime() time.Time
GetLastUpdateTime returns last updated time
func (*ResourceRoleInfo) GetResourceGroups ¶ added in v1.1.1
func (rri *ResourceRoleInfo) GetResourceGroups() ([]metadata.ResourceGroup, error)
GetResourceGroups gets the resource group which this role belongs to
func (*ResourceRoleInfo) GetRoleName ¶ added in v1.1.1
func (rri *ResourceRoleInfo) GetRoleName() string
GetRoleName returns the role name
func (*ResourceRoleInfo) GetRoleUUID ¶ added in v1.1.1
func (rri *ResourceRoleInfo) GetRoleUUID() string
GetRoleUUID returns the role uuid
func (*ResourceRoleInfo) GetUsers ¶ added in v1.1.1
func (rri *ResourceRoleInfo) GetUsers() ([]metadata.User, error)
GetUsers gets the users of this resource role
func (*ResourceRoleInfo) Identity ¶ added in v1.1.1
func (rri *ResourceRoleInfo) Identity() int
Identity cluster returns ID of mysql cluster
func (*ResourceRoleInfo) MarshalJSON ¶ added in v1.1.1
func (rri *ResourceRoleInfo) MarshalJSON() ([]byte, error)
MarshalJSON marshals ResourceRole to json string
func (*ResourceRoleInfo) MarshalJSONWithFields ¶ added in v1.1.1
func (rri *ResourceRoleInfo) MarshalJSONWithFields(fields ...string) ([]byte, error)
MarshalJSONWithFields marshals only specified field of the ResourceRole to json string
func (*ResourceRoleInfo) Set ¶ added in v1.1.1
func (rri *ResourceRoleInfo) Set(fields map[string]interface{}) error
Set sets the resource group with given fields, key is the field name and value is the relevant value of the key
type ResourceRoleRepo ¶ added in v1.1.1
type ResourceRoleRepo struct {
Database middleware.Pool
}
ResourceRoleRepo implements dependency.ResourceRoleRepo interface
func (*ResourceRoleRepo) AddResourceGroup ¶ added in v1.1.1
func (rrr *ResourceRoleRepo) AddResourceGroup(resourceRoleID int, resourceGroupID int) error
AddResourceGroup adds a map of resource role and resource group in the middleware
func (*ResourceRoleRepo) AddUser ¶ added in v1.1.1
func (rrr *ResourceRoleRepo) AddUser(resourceRoleID int, userID int) error
AddUser adds a map of the resource role and user from the middleware
func (*ResourceRoleRepo) Create ¶ added in v1.1.1
func (rrr *ResourceRoleRepo) Create(resourceRole metadata.ResourceRole) (metadata.ResourceRole, error)
Create creates data with given entity in the middleware
func (*ResourceRoleRepo) Delete ¶ added in v1.1.1
func (rrr *ResourceRoleRepo) Delete(id int) error
Delete deletes data in the middleware, it is recommended to use soft deletion, therefore use update instead of delete
func (*ResourceRoleRepo) DeleteResourceGroup ¶ added in v1.1.1
func (rrr *ResourceRoleRepo) DeleteResourceGroup(resourceRoleID int, resourceGroupID int) error
DeleteResourceGroup deletes the map of resource role and resource group from the middleware
func (*ResourceRoleRepo) DeleteUser ¶ added in v1.1.1
func (rrr *ResourceRoleRepo) DeleteUser(resourceRoleID int, userID int) error
DeleteUser deletes the map of the resource role and user from the middleware
func (*ResourceRoleRepo) Execute ¶ added in v1.1.1
func (rrr *ResourceRoleRepo) Execute(command string, args ...interface{}) (middleware.Result, error)
Execute executes given command and placeholders on the middleware it executes command with arguments on database
func (*ResourceRoleRepo) GetAll ¶ added in v1.1.1
func (rrr *ResourceRoleRepo) GetAll() ([]metadata.ResourceRole, error)
GetAll gets all resource groups from the middleware
func (*ResourceRoleRepo) GetByID ¶ added in v1.1.1
func (rrr *ResourceRoleRepo) GetByID(id int) (metadata.ResourceRole, error)
GetByID gets the resource role by the identity from the middleware
func (*ResourceRoleRepo) GetByRoleUUID ¶ added in v1.1.1
func (rrr *ResourceRoleRepo) GetByRoleUUID(roleUUID string) (metadata.ResourceRole, error)
GetByRoleUUID gets the resource role with given resource role id from the middleware
func (*ResourceRoleRepo) GetID ¶ added in v1.1.1
func (rrr *ResourceRoleRepo) GetID(roleUUID string) (int, error)
GetID gets the identity with given resource role id from the middleware
func (*ResourceRoleRepo) GetResourceGroupsByID ¶ added in v1.1.1
func (rrr *ResourceRoleRepo) GetResourceGroupsByID(id int) ([]metadata.ResourceGroup, error)
GetResourceGroupsByID gets the resource group which this role belongs to with given resource role id from the middleware
func (*ResourceRoleRepo) GetUsersByID ¶ added in v1.1.1
func (rrr *ResourceRoleRepo) GetUsersByID(id int) ([]metadata.User, error)
GetUsersByID gets the users of the given id from the middleware
func (*ResourceRoleRepo) Transaction ¶ added in v1.1.1
func (rrr *ResourceRoleRepo) Transaction() (middleware.Transaction, error)
Transaction returns a mysql.Transaction that could execute multiple commands as a transaction
func (*ResourceRoleRepo) Update ¶ added in v1.1.1
func (rrr *ResourceRoleRepo) Update(entity metadata.ResourceRole) error
Update updates data with given entity in the middleware
type ResourceRoleService ¶ added in v1.1.1
type ResourceRoleService struct {
ResourceRoleRepo metadata.ResourceRoleRepo
ResourceRoles []metadata.ResourceRole `json:"resource_roles"`
ResourceGroups []metadata.ResourceGroup `json:"resource_groups"`
Users []metadata.User `json:"users"`
}
ResourceRoleService implements Service interface
func (*ResourceRoleService) AddResourceGroup ¶ added in v1.1.1
func (rrs *ResourceRoleService) AddResourceGroup(resourceRoleID int, resourceGroupID int) error
AddResourceGroup adds a map of resource role and resource group in the middleware
func (*ResourceRoleService) AddUser ¶ added in v1.1.1
func (rrs *ResourceRoleService) AddUser(resourceRoleID, userID int) error
AddUser adds a map of the resource role and user
func (*ResourceRoleService) Create ¶ added in v1.1.1
func (rrs *ResourceRoleService) Create(fields map[string]interface{}) error
Create creates a resource role in resource group
func (*ResourceRoleService) Delete ¶ added in v1.1.1
func (rrs *ResourceRoleService) Delete(id int) error
Delete deletes the resource role of given id
func (*ResourceRoleService) DeleteResourceGroup ¶ added in v1.1.1
func (rrs *ResourceRoleService) DeleteResourceGroup(resourceRoleID int, resourceGroupID int) error
DeleteResourceGroup deletes the map of resource role and resource group from the middleware
func (*ResourceRoleService) DeleteUser ¶ added in v1.1.1
func (rrs *ResourceRoleService) DeleteUser(resourceRoleID, userID int) error
DeleteUser deletes the map of the resource role and user
func (*ResourceRoleService) GetAll ¶ added in v1.1.1
func (rrs *ResourceRoleService) GetAll() error
GetAll gets all resource roles
func (*ResourceRoleService) GetByID ¶ added in v1.1.1
func (rrs *ResourceRoleService) GetByID(id int) error
GetByID gets the resource role of the given id
func (*ResourceRoleService) GetByRoleUUID ¶ added in v1.1.1
func (rrs *ResourceRoleService) GetByRoleUUID(groupUUID string) error
GetByRoleUUID gets the resource role by role uuid
func (*ResourceRoleService) GetResourceGroups ¶ added in v1.1.1
func (rrs *ResourceRoleService) GetResourceGroups() []metadata.ResourceGroup
GetResourceGroups returns the resource group of the service
func (*ResourceRoleService) GetResourceGroupsByID ¶ added in v1.1.1
func (rrs *ResourceRoleService) GetResourceGroupsByID(id int) error
GetResourceGroupsByID gets the resource group with given resource role id
func (*ResourceRoleService) GetResourceRoles ¶ added in v1.1.1
func (rrs *ResourceRoleService) GetResourceRoles() []metadata.ResourceRole
GetResourceRoles returns the resource roles of the service
func (*ResourceRoleService) GetUsers ¶ added in v1.1.1
func (rrs *ResourceRoleService) GetUsers() []metadata.User
GetUsers returns the users of the service
func (*ResourceRoleService) GetUsersByID ¶ added in v1.1.1
func (rrs *ResourceRoleService) GetUsersByID(id int) error
GetUsersByID gets the users with given resource role id
func (*ResourceRoleService) GetUsersByRoleUUID ¶ added in v1.1.1
func (rrs *ResourceRoleService) GetUsersByRoleUUID(roleUUID string) error
GetUsersByRoleUUID gets the users with given resource role uuid
func (*ResourceRoleService) Marshal ¶ added in v1.1.1
func (rrs *ResourceRoleService) Marshal() ([]byte, error)
Marshal marshals ResourceRoleService.ResourceRoles to json bytes
func (*ResourceRoleService) MarshalWithFields ¶ added in v1.1.1
func (rrs *ResourceRoleService) MarshalWithFields(fields ...string) ([]byte, error)
MarshalWithFields marshals only specified fields of the ResourceRoleService to json bytes
func (*ResourceRoleService) Update ¶ added in v1.1.1
func (rrs *ResourceRoleService) Update(id int, fields map[string]interface{}) error
Update gets a resource role of the given id from the middleware, and then updates its fields that was specified in fields argument, key is the filed name and value is the new field value, it saves the changes to the middleware
type TableInfo ¶ added in v1.1.1
type TableInfo struct {
TableRepo metadata.TableRepo
DBName string `middleware:"db_name" json:"db_name"`
TableName string `middleware:"table_name" json:"table_name"`
}
TableInfo include information of logic table
func NewEmptyTableInfo ¶ added in v1.1.1
func NewEmptyTableInfo() *TableInfo
NewEmptyTableInfo return *TableInfo
func NewTableInfo ¶ added in v1.1.1
NewTableInfo returns a new TableInfo
func NewTableInfoWithMapAndRandom ¶ added in v1.1.1
NewTableInfoWithMapAndRandom returns a new *TableInfo with given map
func (*TableInfo) GetCreateStatement ¶ added in v1.1.1
GetCreateStatement returns the create statement
func (*TableInfo) GetIndexStatistics ¶ added in v1.1.1
func (ti *TableInfo) GetIndexStatistics() ([]metadata.IndexStatistic, error)
GetIndexStatistics returns the index statistics
func (*TableInfo) GetTableName ¶ added in v1.1.1
GetTableName returns the table name
func (*TableInfo) GetTableStatistics ¶ added in v1.1.1
func (ti *TableInfo) GetTableStatistics() ([]metadata.TableStatistic, error)
GetTableStatistics returns the table statistics
func (*TableInfo) MarshalJSON ¶ added in v1.1.1
MarshalJSON marshals Table to json string
type TableRepo ¶ added in v1.1.1
TableRepo implements dependency.TableRepo interface
func (*TableRepo) AnalyzeTableByDBNameAndTableName ¶ added in v1.1.1
AnalyzeTableByDBNameAndTableName analyzes the table by DB name and table name
func (*TableRepo) Execute ¶ added in v1.1.1
func (tr *TableRepo) Execute(command string, args ...interface{}) (middleware.Result, error)
Execute implements dependency.MySQLServerRepo interface, it executes command with arguments on database
func (*TableRepo) GetByDBName ¶ added in v1.1.1
GetByDBName gets the table info by db name from middleware
func (*TableRepo) GetCreateStatement ¶ added in v1.1.1
GetCreateStatement gets the create statement of the table
func (*TableRepo) GetIndexStatistics ¶ added in v1.1.1
func (tr *TableRepo) GetIndexStatistics(dbName, tableName string) ([]metadata.IndexStatistic, error)
GetIndexStatistics gets index statistics from the middleware
func (*TableRepo) GetStatisticsByDBNameAndTableName ¶ added in v1.1.1
func (tr *TableRepo) GetStatisticsByDBNameAndTableName(dbName string, tableName string) ([]metadata.TableStatistic, []metadata.IndexStatistic, string, error)
GetStatisticsByDBNameAndTableName gets the full table info by db name and table name from middleware
func (*TableRepo) GetTableStatistics ¶ added in v1.1.1
func (tr *TableRepo) GetTableStatistics(dbName, tableName string) ([]metadata.TableStatistic, error)
GetTableStatistics gets table statistics from the middleware
type TableService ¶ added in v1.1.1
type TableService struct {
metadata.TableRepo
Tables []metadata.Table `middleware:"tables" json:"tables"`
TableStatistics []metadata.TableStatistic `middleware:"table_statistics" json:"table_statistics"`
IndexStatistics []metadata.IndexStatistic `middleware:"index_statistics" json:"index_statistics"`
CreateStatement string `middleware:"create_statement" json:"create_statement"`
}
TableService implements dependency.TableService
func (*TableService) AnalyzeTableByDBIDAndTableName ¶ added in v1.1.1
func (ts *TableService) AnalyzeTableByDBIDAndTableName(dbID int, tableName string) error
AnalyzeTableByDBIDAndTableName analyzes the table by db id and table name
func (*TableService) AnalyzeTableByHostInfoAndDBNameAndTableName ¶ added in v1.1.1
func (ts *TableService) AnalyzeTableByHostInfoAndDBNameAndTableName(hostIP string, portNum int, dbName, tableName string) error
AnalyzeTableByHostInfoAndDBNameAndTableName analyzes the table by host info and db name and table name
func (*TableService) GetByDBID ¶ added in v1.1.1
func (ts *TableService) GetByDBID(dbID int) error
GetByDBID return table service by db id
func (*TableService) GetCreateStatement ¶ added in v1.1.1
func (ts *TableService) GetCreateStatement() string
GetCreateStatement returns the create statement of table
func (*TableService) GetIndexStatistics ¶ added in v1.1.1
func (ts *TableService) GetIndexStatistics() []metadata.IndexStatistic
GetIndexStatistics returns the index statistics list
func (*TableService) GetStatisticsByDBIDAndTableName ¶ added in v1.1.1
func (ts *TableService) GetStatisticsByDBIDAndTableName(dbID int, tableName string) error
GetStatisticsByDBIDAndTableName gets the table statistics by db id and table name
func (*TableService) GetStatisticsByHostInfoAndDBNameAndTableName ¶ added in v1.1.1
func (ts *TableService) GetStatisticsByHostInfoAndDBNameAndTableName(hostIP string, portNum int, dbName, tableName string) error
GetStatisticsByHostInfoAndDBNameAndTableName gets the table statistics by host info and db name and table name
func (*TableService) GetTableStatistics ¶ added in v1.1.1
func (ts *TableService) GetTableStatistics() []metadata.TableStatistic
GetTableStatistics returns the table statistics list
func (*TableService) GetTables ¶ added in v1.1.1
func (ts *TableService) GetTables() []metadata.Table
GetTables returns the tables list
func (*TableService) Marshal ¶ added in v1.1.1
func (ts *TableService) Marshal() ([]byte, error)
Marshal marshals TableService.Tables to json bytes
func (*TableService) MarshalWithFields ¶ added in v1.1.1
func (ts *TableService) MarshalWithFields(fields ...string) ([]byte, error)
MarshalWithFields marshals only specified fields of the TableService to json bytes
type TableStatistic ¶ added in v1.1.1
type TableStatistic struct {
DBName string `middleware:"db_name" json:"db_name"`
TableName string `middleware:"table_name" json:"table_name"`
Rows int `middleware:"table_rows" json:"table_rows"`
Size int `middleware:"size" json:"size"`
SizeMB float64 `middleware:"size_mb" json:"size_mb"`
AvgRowLength int `middleware:"avg_row_length" json:"avg_row_length"`
AutoIncrement int `middleware:"auto_increment" json:"auto_increment"`
Engine string `middleware:"engine" json:"engine"`
CharSet string `middleware:"char_set" json:"char_set"`
Collation string `middleware:"collation" json:"collation"`
CreateTime time.Time `middleware:"create_time" json:"create_time"`
}
TableStatistic include statistics of table
func NewEmptyTableStatistic ¶ added in v1.1.1
func NewEmptyTableStatistic() *TableStatistic
NewEmptyTableStatistic returns an empty *TableStatistic
func (*TableStatistic) GetAutoIncrement ¶ added in v1.1.1
func (ts *TableStatistic) GetAutoIncrement() int
GetAutoIncrement returns the state of auto increment
func (*TableStatistic) GetAvgRowLength ¶ added in v1.1.1
func (ts *TableStatistic) GetAvgRowLength() int
GetAvgRowLength returns the average row length of the table
func (*TableStatistic) GetCharSet ¶ added in v1.1.1
func (ts *TableStatistic) GetCharSet() string
GetCharSet returns the charset of the table
func (*TableStatistic) GetCollation ¶ added in v1.1.1
func (ts *TableStatistic) GetCollation() string
GetCollation returns the collation of the table
func (*TableStatistic) GetCreateTime ¶ added in v1.1.1
func (ts *TableStatistic) GetCreateTime() time.Time
GetCreateTime returns the create time of the table
func (*TableStatistic) GetDBName ¶ added in v1.1.1
func (ts *TableStatistic) GetDBName() string
GetDBName returns the table schema
func (*TableStatistic) GetEngine ¶ added in v1.1.1
func (ts *TableStatistic) GetEngine() string
GetEngine returns the engine type of the table
func (*TableStatistic) GetSize ¶ added in v1.1.1
func (ts *TableStatistic) GetSize() int
GetSize returns the size of the table
func (*TableStatistic) GetSizeMB ¶ added in v1.1.1
func (ts *TableStatistic) GetSizeMB() float64
GetSizeMB returns the size(MB) of the table
func (*TableStatistic) GetTableName ¶ added in v1.1.1
func (ts *TableStatistic) GetTableName() string
GetTableName returns the table name
func (*TableStatistic) GetTableRows ¶ added in v1.1.1
func (ts *TableStatistic) GetTableRows() int
GetTableRows returns the rows of the table
func (*TableStatistic) MarshalJSON ¶ added in v1.1.1
func (ts *TableStatistic) MarshalJSON() ([]byte, error)
MarshalJSON marshals Table to json string
type UserInfo ¶
type UserInfo struct {
metadata.UserRepo
ID int `middleware:"id" json:"id"`
UserName string `middleware:"user_name" json:"user_name"`
DepartmentName string `middleware:"department_name" json:"department_name"`
EmployeeID string `middleware:"employee_id" json:"employee_id"`
AccountName string `middleware:"account_name" json:"account_name"`
Email string `middleware:"email" json:"email"`
Telephone string `middleware:"telephone" json:"telephone"`
Mobile string `middleware:"mobile" json:"mobile"`
Role int `middleware:"role" json:"role"`
DelFlag int `middleware:"del_flag" json:"del_flag"`
CreateTime time.Time `middleware:"create_time" json:"create_time"`
LastUpdateTime time.Time `middleware:"last_update_time" json:"last_update_time"`
}
UserInfo create userinfo struct
func (*UserInfo) GetAccountName ¶
GetAccountName returns the account name
func (*UserInfo) GetAllMySQLServers ¶ added in v1.1.1
func (ui *UserInfo) GetAllMySQLServers() ([]metadata.MySQLServer, error)
GetAllMySQLServers gets all mysql servers of this user from the middleware
func (*UserInfo) GetCreateTime ¶
GetCreateTime returns the create time
func (*UserInfo) GetDelFlag ¶
GetDelFlag returns the delete flag
func (*UserInfo) GetDepartmentName ¶
GetDepartmentName returns the department name
func (*UserInfo) GetEmployeeID ¶
GetEmployeeID returns the employee id
func (*UserInfo) GetLastUpdateTime ¶
GetLastUpdateTime returns the last update time
func (*UserInfo) GetTelephone ¶
GetEmail returns the telephone
func (*UserInfo) GetUserName ¶
GetUserName returns the user name
func (*UserInfo) MarshalJSON ¶
MarshalJSON marshals User to json string
func (*UserInfo) MarshalJSONWithFields ¶
MarshalJSONWithFields marshals only specified field of the User to json string
type UserRepo ¶
type UserRepo struct {
Database middleware.Pool
}
UserRepo struct
func (*UserRepo) Execute ¶
func (ur *UserRepo) Execute(command string, args ...interface{}) (middleware.Result, error)
Execute implements dependency.UserRepo interface, it executes command with arguments on database Execute executes given command and placeholders on the middleware
func (*UserRepo) GetAllMySQLServersByUserID ¶ added in v1.1.1
func (ur *UserRepo) GetAllMySQLServersByUserID(id int) ([]metadata.MySQLServer, error)
GetAllMySQLServersByUserID gets mysql server list that this user owns
func (*UserRepo) GetAppsByUserID ¶ added in v1.1.1
GetAppsByUserID gets app list that this user owns
func (*UserRepo) GetByAccountName ¶
GetByAccountName gets a user of given account name from the middleware
func (*UserRepo) GetByAccountNameOrEmployeeID ¶ added in v1.1.1
GetByAccountNameOrEmployeeID gets a user of given login name from the middleware
func (*UserRepo) GetByEmail ¶
GetByEmail gets a user of given email from the middleware
func (*UserRepo) GetByEmployeeID ¶
GetByEmployeeID gets a user of given employee id from the middleware
func (*UserRepo) GetByMobile ¶
GetByTelephone gets a user of given mobile from the middleware
func (*UserRepo) GetByTelephone ¶
GetByTelephone gets a user of given telephone from the middleware
func (*UserRepo) GetByUserName ¶ added in v1.1.1
GetByUserName gets users of given username from the middleware
func (*UserRepo) GetDBsByUserID ¶ added in v1.1.1
GetDBsByUserID gets dbs that this user owns
func (*UserRepo) GetMiddlewareClustersByUserID ¶ added in v1.1.1
func (ur *UserRepo) GetMiddlewareClustersByUserID(userID int) ([]metadata.MiddlewareCluster, error)
GetMiddlewareClustersByUserID gets middleware clusters that this user owns
func (*UserRepo) GetMySQLClustersByUserID ¶ added in v1.1.1
func (ur *UserRepo) GetMySQLClustersByUserID(userID int) ([]metadata.MySQLCluster, error)
GetMySQLClustersByUserID gets mysql clusters that this user owns
func (*UserRepo) Transaction ¶
func (ur *UserRepo) Transaction() (middleware.Transaction, error)
Transaction returns a middleware.Transaction that could execute multiple commands as a transaction
type UserService ¶
type UserService struct {
metadata.UserRepo
Users []metadata.User `json:"users"`
Apps []metadata.App `json:"apps"`
DBs []metadata.DB `json:"dbs"`
MiddlewareClusters []metadata.MiddlewareCluster `json:"middleware_clusters"`
MySQLClusters []metadata.MySQLCluster `json:"mysql_clusters"`
MySQLServers []metadata.MySQLServer `json:"mysql_servers"`
}
UserService struct
func (*UserService) Create ¶
func (us *UserService) Create(fields map[string]interface{}) error
Create creates a user in the middleware
func (*UserService) Delete ¶
func (us *UserService) Delete(id int) error
Delete deletes the user of given id in the middleware
func (*UserService) GetAllMySQLServersByUserID ¶ added in v1.1.1
func (us *UserService) GetAllMySQLServersByUserID(id int) error
GetAllMySQLServersByUserID gets mysql servers that this user owns
func (*UserService) GetApps ¶ added in v1.1.1
func (us *UserService) GetApps() []metadata.App
GetApps returns the apps of the service
func (*UserService) GetAppsByUserID ¶ added in v1.1.1
func (us *UserService) GetAppsByUserID(userID int) error
GetAppsByUserID gets apps that this user owns
func (*UserService) GetByAccountName ¶
func (us *UserService) GetByAccountName(accountName string) error
GetByAccountName gets a user of given account name
func (*UserService) GetByAccountNameOrEmployeeID ¶ added in v1.1.1
func (us *UserService) GetByAccountNameOrEmployeeID(loginName string) error
GetByAccountNameOrEmployeeID gets a user of given login name
func (*UserService) GetByEmail ¶
func (us *UserService) GetByEmail(email string) error
GetByEmail gets a user of given email
func (*UserService) GetByEmployeeID ¶
func (us *UserService) GetByEmployeeID(employeeID string) error
GetByEmployeeID gets a user of given employee id
func (*UserService) GetByID ¶
func (us *UserService) GetByID(id int) error
GetByID gets a user by the identity
func (*UserService) GetByMobile ¶
func (us *UserService) GetByMobile(mobile string) error
GetByTelephone gets a user of given mobile
func (*UserService) GetByTelephone ¶
func (us *UserService) GetByTelephone(telephone string) error
GetByTelephone gets a user of given telephone
func (*UserService) GetByUserName ¶ added in v1.1.1
func (us *UserService) GetByUserName(userName string) error
GetByUserName gets users of given user name
func (*UserService) GetDBs ¶ added in v1.1.1
func (us *UserService) GetDBs() []metadata.DB
GetDBs returns the dbs of the service
func (*UserService) GetDBsByUserID ¶ added in v1.1.1
func (us *UserService) GetDBsByUserID(userID int) error
GetDBsByUserID gets dbs that this user owns
func (*UserService) GetMiddlewareClusters ¶ added in v1.1.1
func (us *UserService) GetMiddlewareClusters() []metadata.MiddlewareCluster
GetMiddlewareClusters returns the middleware clusters of the service
func (*UserService) GetMiddlewareClustersByUserID ¶ added in v1.1.1
func (us *UserService) GetMiddlewareClustersByUserID(userID int) error
GetMiddlewareClustersByUserID gets middleware clusters that this user owns
func (*UserService) GetMySQLClusters ¶ added in v1.1.1
func (us *UserService) GetMySQLClusters() []metadata.MySQLCluster
GetMySQLClusters returns the mysql clusters of the service
func (*UserService) GetMySQLClustersByUserID ¶ added in v1.1.1
func (us *UserService) GetMySQLClustersByUserID(userID int) error
GetMySQLClustersByUserID gets mysql clusters that this user owns
func (*UserService) GetMySQLServers ¶ added in v1.1.1
func (us *UserService) GetMySQLServers() []metadata.MySQLServer
GetMySQLServers returns the mysql servers of the service
func (*UserService) GetUsers ¶
func (us *UserService) GetUsers() []metadata.User
GetUsers returns users of the service
func (*UserService) Marshal ¶
func (us *UserService) Marshal() ([]byte, error)
Marshal marshals UserService.Users to json bytes
func (*UserService) MarshalWithFields ¶
func (us *UserService) MarshalWithFields(fields ...string) ([]byte, error)
MarshalWithFields marshals only specified fields of the UserService to json bytes
func (*UserService) Update ¶
func (us *UserService) Update(id int, fields map[string]interface{}) error
Update gets a user of the given id from the middleware, and then updates its fields that was specified in fields argument, key is the filed name and value is the new field value, it saves the changes to the middleware
Source Files
¶
- app_entity.go
- app_repository.go
- app_service.go
- db_entity.go
- db_repository.go
- db_service.go
- env_entity.go
- env_repository.go
- env_service.go
- middleware_cluster_entity.go
- middleware_cluster_repository.go
- middleware_cluster_service.go
- middleware_server_entity.go
- middleware_server_repository.go
- middleware_server_service.go
- monitor_system_entity.go
- monitor_system_repository.go
- monitor_system_service.go
- mysql_cluster_entity.go
- mysql_cluster_repository.go
- mysql_cluster_service.go
- mysql_server_entity.go
- mysql_server_repository.go
- mysql_server_service.go
- resource_group_entity.go
- resource_group_repository.go
- resource_group_service.go
- resource_role_entity.go
- resource_role_repository.go
- resource_role_service.go
- table_entity.go
- table_repository.go
- table_service.go
- user_entity.go
- user_repository.go
- user_service.go