metadata

package
v1.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddApp

func AddApp(c *gin.Context)

@Tags application @Summary add a new application @Accept application/json @Param token body string true "token" @Param app_name body string true "app name" @Param level body int true "app level" @Produce application/json @Success 200 {string} string "{"apps": [ {"id": 2,"app_name": "app2","level": 2,"del_flag": 0,"create_time": "2021-10-25T09:46:04.275796+08:00","last_update_time": "2021-12-21T09:15:47.688546+08:00"}]}" @Router /api/v1/metadata/app [post]

func AddDB

func AddDB(c *gin.Context)

@Tags database @Summary add a new database @Accept application/json @Param token body string true "token" @Param db_name body string true "db name" @Param cluster_id body int true "cluster id" @Param cluster_type body int false "cluster type" @Param env_id body int true "env id" @Produce application/json @Success 200 {string} string "{"dbs": [{"id": 1, "db_name": "db1", "cluster_id": 1, "cluster_type": 1, "env_id": 1, "del_flag": 0, "create_time": "2021-01-22T09:59:21.379851+08:00", "last_update_time": "2021-01-22T09:59:21.379851+08:00"}]}" @Router /api/v1/metadata/db [post]

func AddEnv

func AddEnv(c *gin.Context)

@Tags environment @Summary add a new environment @Accept application/json @Param token body string true "token" @Param env_name body string true "env name" @Produce application/json @Success 200 {string} string "{"envs": [{"id": 1, "env_name": "online", "del_flag": 0, "create_time": "2021-01-22T09:59:21.379851+08:00", "last_update_time": "2021-01-22T09:59:21.379851+08:00"}]}" @Router /api/v1/metadata/env [post]

func AddMiddlewareCluster

func AddMiddlewareCluster(c *gin.Context)

@Tags middleware cluster @Summary add a new middleware cluster @Accept application/json @Param token body string true "token" @Param cluster_name body string true "middleware cluster name" @Param env_id body int true "env id" @Produce application/json @Success 200 {string} string {"middleware_clusters":[{"id":65,"cluster_name":"new_middleware_cluster","env_id":1,"del_flag":0,"create_time":"2022-03-02T10:39:06.206145+08:00","last_update_time":"2022-03-02T10:39:06.206145+08:00"}]} @Router /api/v1/metadata/middleware-cluster/add [post]

func AddMiddlewareServer

func AddMiddlewareServer(c *gin.Context)

@Tags middleware server @Summary add a new middleware server @Accept application/json @Param token body string true "token" @Param cluster_id body int true "middleware cluster id" @Param server_name body string true "middleware server name" @Param middleware_role body int true "middleware role" @Param host_ip body string true "host ip" @Param port_num body int true "port number" @Produce application/json @Success 200 {string} string "{"middleware_servers":[{"host_ip":"192.168.10.219","del_flag":0,"create_time":"2022-03-02T10:18:28.021994+08:00","last_update_time":"2022-03-02T10:18:28.021994+08:00","cluster_id":1,"server_name":"new_middleware_server","middleware_role":1,"id":42,"port_num":33062}]}" @Router /api/v1/metadata/middleware-server/add [post]

func AddMonitorSystem

func AddMonitorSystem(c *gin.Context)

@Tags monitor system @Summary add a new monitor system @Accept application/json @Param token body string true "token" @Param system_name body string true "system name" @Param system_type body int true "system type" @Param host_ip body string true "host ip" @Param port_num body int true "port num" @Param port_num_slow body int true "port num slow" @Param base_url body string true "base url" @Param env_id body int true "env id" @Produce application/json @Success 200 {string} string "{"monitor_systems": [{"id":40,"system_name":"new_monitor_system","system_type":2,"host_ip":"192.168.10.219","port_num":8080,"port_num_slow":9000,"create_time":"2022-03-02T12:06:38.622752+08:00","env_id":1,"del_flag":0,"last_update_time":"2022-03-02T12:06:38.622752+08:00","base_url":"/prometheus"}]}" @Router /api/v1/metadata/monitor-system [post]

func AddMySQLCluster

func AddMySQLCluster(c *gin.Context)

@Tags mysql cluster @Summary add a new mysql cluster @Accept application/json @Param token body string true "token" @Param cluster_name body string true "mysql cluster name" @Param middleware_cluster_id body int false "middleware cluster id" @Param monitor_system_id body int false "monitor system id" @Param env_id body string true "env id" @Produce application/json @Success 200 {string} string "{"mysql_clusters":[{"id":3,"cluster_name":"api_test","monitor_system_id":0,"env_id":1,"create_time":"2022-03-01T08:30:43.428343+08:00","middleware_cluster_id":0,"del_flag":0,"last_update_time":"2022-03-01T08:30:43.428343+08:00"}]}" @Router /api/v1/metadata/mysql-cluster/add [post]

func AddMySQLServer

func AddMySQLServer(c *gin.Context)

@Tags mysql server @Summary add a new mysql server @Accept application/json @Param token body string true "token" @Param cluster_id body int true "mysql cluster id" @Param server_name body string true "mysql server name" @Param service_name body string false "mysql server service name" @Param host_ip body string true "mysql server host ip" @Param port_num body int true "mysql server port num" @Param deployment_type body int true "mysql deployment type" @Produce application/json @Success 200 {string} string "{"mysql_servers":[{"deployment_type":1,"version":"","id":26,"server_name":"test","service_name":"test","port_num":3306,"del_flag":0,"create_time":"2022-03-02T01:26:32.107625+08:00","last_update_time":"2022-03-02T01:26:32.107625+08:00","cluster_id":97,"host_ip":"192.168.1.1"}]}" @Router /api/v1/metadata/mysql-server/add [post]

func AddResourceGroup added in v1.1.1

func AddResourceGroup(c *gin.Context)

@Tags resource group @Summary add a new resource group @Accept application/json @Param token body string true "token" @Param group_uuid body string true "resource group uuid" @Param group_name body string true "resource group name" @Produce application/json @Success 200 {string} string "{"resource_groups":[{"id":1,"group_uuid":"5c6c6d73-eac2-11ec-8183-001c42d502a6","group_name":"resource-group-01","del_flag":0,"create_time":"2022-06-13T10:42:15.082892+08:00","last_update_time":"2022-06-13T17:26:53.625206+08:00"}]}" @Router /api/v1/metadata/resource-group/add [post]

func AddResourceRole added in v1.1.1

func AddResourceRole(c *gin.Context)

@Tags resource role @Summary add a new resource role @Accept application/json @Param token body string true "token" @Param role_name body string false "resource role name" @Param role_uuid body int true "resource role uuid" @Param resource_group_id body int true "resource group id" @Produce application/json @Success 200 {string} string "{"resource_roles":[{"id":2,"role_uuid":"new_test_role_uuid","role_name":"new_test_role","resource_group_id":1,"del_flag":0,"create_time":"2022-06-13T01:08:21.739904+08:00","last_update_time":"2022-06-13T01:08:21.739904+08:00"}]}" @Router /api/v1/metadata/resource-role/add [post]

func AddUser

func AddUser(c *gin.Context)

@Tags user @Summary add a new user @Accept application/json @Param token body string true "token" @Param user_name body string true "user name" @Param department_name body string true "department name" @Param employee_id body string true "employee id" @Param telephone body string true "user telephone" @Param role body int true "user role" @Param account_name body string true "account name" @Param email body string true "email" @Param mobile body string true "mobile" @Produce application/json @Success 200 {string} string "{"users": [{"id": 18,"employee_id": "21213434","account_name": "kf-Tom","mobile": "18088888888","role": 2,"user_name": "Tom","department_name": "kf","email": "test@test.com.cn","telephone": "02188888888","del_flag": 0,"create_time": "2022-03-07T15:56:32.277857+08:00","last_update_time": "2022-03-07T15:56:32.277857+08:00"}]}" @Router /api/v1/metadata/user [post]

func AnalyzeTableByDBIDAndTableName added in v1.1.1

func AnalyzeTableByDBIDAndTableName(c *gin.Context)

@Tags Tables @Summary analyze table by db id and table name @Accept application/json @Param token body string true "token" @Param db_id body int true "db id" @Param table_name body string true "table name" @Param login_name body string true "account name or employee id" @Produce application/json @Success 200 {string} string "{"message": "analyze table completed. db id: 1, table name: t_meta_db_info"}" @Router /api/v1/metadata/table/analyze/db [post]

func AnalyzeTableByHostInfoAndDBNameAndTableName added in v1.1.1

func AnalyzeTableByHostInfoAndDBNameAndTableName(c *gin.Context)

@Tags Tables @Summary analyze table by host info and db name and table name @Accept application/json @Param token body string true "token" @Param host_ip body string true "host ip" @Param port_num body int true "port num" @Param db_name body string true "db name" @Param table_name body string true "table name" @Param login_name body string true "account name or employee id" @Produce application/json @Success 200 {string} string "{"message": "analyze table completed. host ip: 192.168.137.11, port num: 3306, db name: das, table name: t_meta_db_info"}" @Router /api/v1/metadata/table/analyze/host-info-db [post]

func AppAddDB

func AppAddDB(c *gin.Context)

@Tags application @Summary add database map @Accept application/json @Param token body string true "token" @Param id body int true "app id" @Param db_id body int true "db id" @Produce application/json @Success 200 {string} string "{"dbs": [{"id": 1,"db_name": "db2","cluster_id": 3,"cluster_type": 1,"env_id": 1,"del_flag": 0,"create_time": "2022-01-04T15:08:33.418288+08:00","last_update_time": "2022-01-25T16:17:26.284761+08:00"},}]}" @Router /api/v1/metadata/app/add-db [post]

func AppAddUser added in v1.1.1

func AppAddUser(c *gin.Context)

@Tags application @Summary add user map @Accept application/json @Param token body string true "token" @Param id body int true "app id" @Param user_id body int false "user id" @Produce application/json @Success 200 {string} string "{"users": [{"id": 18,"employee_id": "21213434","account_name": "kf-Tom","mobile": "18088888888","role": 2,"user_name": "Tom","department_name": "kf","email": "test@test.com.cn","telephone": "02188888888","del_flag": 0,"create_time": "2022-03-07T15:56:32.277857+08:00","last_update_time": "2022-03-07T15:56:32.277857+08:00"}]}" @Router /api/v1/metadata/app/add-user [post]

func AppDeleteDB

func AppDeleteDB(c *gin.Context)

@Tags application @Summary delete database map @Accept application/json @Param token body string true "token" @Param id body int true "app id" @Param db_id body int false "db id" @Produce application/json @Success 200 {string} string "{"dbs": [{"id": 1,"db_name": "db2","cluster_id": 3,"cluster_type": 1,"env_id": 1,"del_flag": 0,"create_time": "2022-01-04T15:08:33.418288+08:00","last_update_time": "2022-01-25T16:17:26.284761+08:00"},}]}" @Router /api/v1/metadata/app/delete-db [post]

func AppDeleteUser added in v1.1.1

func AppDeleteUser(c *gin.Context)

@Tags application @Summary delete user map @Accept application/json @Param token body string true "token" @Param id body int true "app id" @Param user_id body int true "user id" @Produce application/json @Success 200 {string} string "{"users": [{"id": 18,"employee_id": "21213434","account_name": "kf-Tom","mobile": "18088888888","role": 2,"user_name": "Tom","department_name": "kf","email": "test@test.com.cn","telephone": "02188888888","del_flag": 0,"create_time": "2022-03-07T15:56:32.277857+08:00","last_update_time": "2022-03-07T15:56:32.277857+08:00"}]}" @Router /api/v1/metadata/app/delete-user [post]

func DBAddApp

func DBAddApp(c *gin.Context)

@Tags database @Summary add application map @Param token body string true "token" @Param id body int true "db id" @Param app_id body int true "app id" @Produce application/json @Success 200 {string} string "{"apps": [{"create_time":"2021-11-10T18:39:12.395612+08:00","last_update_time":"2021-12-21T09:15:47.688546+08:00","id":1,"app_name":"app1","level":1,"del_flag":0},{"last_update_time":"2021-12-21T09:15:47.688546+08:00","id":3,"app_name":"app3","level":3,"del_flag":0,"create_time":"2021-11-02T18:02:34.153234+08:00"}]}" @Router /api/v1/metadata/db/add-app [post]

func DBAddUser added in v1.1.1

func DBAddUser(c *gin.Context)

@Tags database @Summary add user map @Param token body string true "token" @Param id body int true "db id" @Param user_id body int true "user id" @Produce application/json @Success 200 {string} string "{"users": [{"employee_id":"","telephone":"","create_time":"2022-03-01T17:53:21.046511+08:00","last_update_time":"2022-03-01T17:53:21.046511+08:00","mobile":"","role":3,"id":2,"user_name":"test","department_name":"","account_name":"aaaa","email":"qqqq","del_flag":0},{"role":3,"create_time":"2022-01-25T12:21:05.19953+08:00","user_name":"test1","employee_id":"","account_name":"aaa","email":"aaa","telephone":"","mobile":"","last_update_time":"2022-01-25T12:21:05.19953+08:00","id":3,"department_name":"","del_flag":0}]}" @Router /api/v1/metadata/db/add-user [post]

func DBDeleteApp

func DBDeleteApp(c *gin.Context)

@Tags database @Summary delete application map @Param token body string true "token" @Param id body int true "db id" @Param app_id body int true "app id" @Produce application/json @Success 200 {string} string "{"apps": [{"last_update_time":"2021-12-21T09:15:47.688546+08:00","id":1,"app_name":"app1","level":1,"del_flag":0,"create_time":"2021-11-10T18:39:12.395612+08:00"}]}" @Router /api/v1/metadata/db/delete-app [post]

func DBDeleteUser added in v1.1.1

func DBDeleteUser(c *gin.Context)

@Tags database @Summary delete user map @Param id path int true "db id" @Param token body string true "token" @Param user_id body int true "user id" @Produce application/json @Success 200 {string} string "{"users": [{"id":2,"employee_id":"","role":3,"del_flag":0,"create_time":"2022-03-01T17:53:21.046511+08:00","last_update_time":"2022-03-01T17:53:21.046511+08:00","user_name":"test","department_name":"","account_name":"aaaa","email":"qqqq","telephone":"","mobile":""}]}" @Router /api/v1/metadata/db/delete-user/:id [post]

func DeleteAppByID

func DeleteAppByID(c *gin.Context)

@Tags application @Summary delete app by id @Accept application/json @Param token body string true "token" @Param id body int true "app id" @Produce application/json @Success 200 {string} string "{"apps": [ {"id": 2,"app_name": "app2","level": 2,"del_flag": 0,"create_time": "2021-10-25T09:46:04.275796+08:00","last_update_time": "2021-12-21T09:15:47.688546+08:00"}]}" @Router /api/v1/metadata/app/delete [post]

func DeleteDBByID

func DeleteDBByID(c *gin.Context)

@Tags database @Summary delete database by id @Accept application/json @Param token body string true "token" @Param id body int true "db id" @Produce application/json @Success 200 {string} string "{"dbs": [{"id": 1, "db_name": "db1", "cluster_id": 1, "cluster_type": 1, "env_id": 1, "del_flag": 0, "create_time": "2021-01-22T09:59:21.379851+08:00", "last_update_time": "2021-01-22T09:59:21.379851+08:00"}]}" @Router /api/v1/metadata/db/delete [post]

func DeleteEnvByID

func DeleteEnvByID(c *gin.Context)

@Tags environment @Summary delete environment by id @Accept application/json @Param token body string true "token" @Param id body int true "env id" @Produce application/json @Success 200 {string} string "{"envs": [{"id": 1, "env_name": "online", "del_flag": 0, "create_time": "2021-01-22T09:59:21.379851+08:00", "last_update_time": "2021-01-22T09:59:21.379851+08:00"}]}" @Router /api/v1/metadata/env/delete [post]

func DeleteMiddlewareClusterByID

func DeleteMiddlewareClusterByID(c *gin.Context)

@Tags middleware cluster @Summary delete middleware cluster by id @Accept application/json @Param token body string true "token" @Param id body int true "middleware cluster id" @Produce application/json @Success 200 {string} string {"middleware_clusters":[{"id":65,"cluster_name":"new_middleware_cluster","env_id":1,"del_flag":0,"create_time":"2022-03-02T10:39:06.206145+08:00","last_update_time":"2022-03-02T10:39:06.206145+08:00"}]} @Router /api/v1/metadata/app/delete [post]

func DeleteMiddlewareServerByID

func DeleteMiddlewareServerByID(c *gin.Context)

@Tags middleware server @Summary delete middleware server by id @Accept application/json @Param token body string true "token" @Param id body int true "middleware server id" @Produce application/json @Success 200 {string} string "{"middleware_servers":[{"server_name":"new_middleware_server","host_ip":"192.168.10.219","port_num":33062,"create_time":"2022-03-02T10:18:28.021994+08:00","last_update_time":"2022-03-02T10:18:28.021994+08:00","id":42,"cluster_id":1,"middleware_role":1,"del_flag":0}]}" @Router /api/v1/metadata/middleware-server/delete [post]

func DeleteMonitorSystemByID

func DeleteMonitorSystemByID(c *gin.Context)

@Tags monitor system @Summary delete monitor system by id @Accept application/json @Param token body string true "token" @Param id body int true "monitor system id" @Produce application/json @Success 200 {string} string "{"monitor_systems": [{"id":40,"system_type":2,"port_num_slow":9000,"env_id":1,"create_time":"2022-03-02T12:06:38.622752+08:00","system_name":"new_monitor_system","host_ip":"192.168.10.219","port_num":8080,"base_url":"/prometheus","del_flag":0,"last_update_time":"2022-03-02T12:06:38.622752+08:00"}]}" @Router /api/v1/metadata/monitor-system/delete [post]

func DeleteMySQLClusterByID

func DeleteMySQLClusterByID(c *gin.Context)

@Tags mysql cluster @Summary update mysql cluster by id @Accept application/json @Param token body string true "token" @Param id body int true "mysql cluster id" @Produce application/json @Success 200 {string} string "{"mysql_clusters":[{"cluster_name":"test","env_id":1,"del_flag":0,"create_time":"2022-03-01T08:30:43.428343+08:00","last_update_time":"2022-03-01T08:32:25.715563+08:00","id":3,"middleware_cluster_id":0,"monitor_system_id":0}]}" @Router /api/v1/metadata/mysql-cluster/delete [post]

func DeleteMySQLServerByID

func DeleteMySQLServerByID(c *gin.Context)

@Tags mysql server @Summary get mysql servers by host info @Accept application/json @Param token body string true "token" @Param id body int true "mysql server id" @Produce application/json @Success 200 {string} string "{"mysql_servers":[{"id":1,"port_num":3306,"create_time":"2021-09-02T11:16:06.561525+08:00","last_update_time":"2022-03-02T01:14:14.13647+08:00","deployment_type":1,"version":"5.7","del_flag":0,"cluster_id":1,"server_name":"192-168-10-219","service_name":"192-168-10-219:3306","host_ip":"192.168.10.219"}]}" @Router /api/v1/metadata/mysql-server/delete [post]

func DeleteResourceGroupByID added in v1.1.1

func DeleteResourceGroupByID(c *gin.Context)

@Tags resource group @Summary delete resource group by id @Accept application/json @Param token body string true "token" @Param id body int true "resource group id" @Produce application/json @Success 200 {string} string "{"resource_groups":[{"id":1,"group_uuid":"5c6c6d73-eac2-11ec-8183-001c42d502a6","group_name":"resource-group-01","del_flag":0,"create_time":"2022-06-13T10:42:15.082892+08:00","last_update_time":"2022-06-13T17:26:53.625206+08:00"}]}" @Router /api/v1/metadata/resource-group/delete [post]

func DeleteResourceRoleByID added in v1.1.1

func DeleteResourceRoleByID(c *gin.Context)

@Tags resource role @Summary delete resource role by id @Accept application/json @Param token body string true "token" @Param id body int true "resource role id" @Produce application/json @Success 200 {string} string "{"resource_roles":[{"role_name":"update_test_role","resource_group_id":1,"del_flag":0,"create_time":"2022-06-13T01:08:21.739904+08:00","last_update_time":"2022-06-13T01:10:42.472215+08:00","id":2,"role_uuid":"update_test_role_id"}]}" @Router /api/v1/metadata/resource-role/delete [post]

func DeleteUserByID

func DeleteUserByID(c *gin.Context)

@Tags user @Summary delete user by id @Accept application/json @Param token body string true "token" @Param id body int true "user id" @Produce application/json @Success 200 {string} string "{"users": [{"id": 18,"employee_id": "21213434","account_name": "kf-Tom","mobile": "18088888888","role": 2,"user_name": "Tom","department_name": "kf","email": "test@test.com.cn","telephone": "02188888888","del_flag": 0,"create_time": "2022-03-07T15:56:32.277857+08:00","last_update_time": "2022-03-07T15:56:32.277857+08:00"}]}" @Router /api/v1/metadata/user/delete [post]

func GetAllMySQLServersByUserID added in v1.1.1

func GetAllMySQLServersByUserID(c *gin.Context)

@Tags user @Summary get all mysql servers by id @Accept application/json @Param token body string true "token" @Param id body int true "user id" @Produce application/json @Success 200 {string} string "{"mysql_servers":[{"port_num":3306,"create_time":"2021-09-02T11:16:06.561525+08:00","last_update_time":"2022-03-01T08:19:09.779365+08:00","cluster_id":1,"server_name":"192-168-10-219","service_name":"192-168-10-219:3306","host_ip":"192.168.10.219","id":1,"deployment_type":1,"version":"5.7","del_flag":0}]}" @Router /api/v1/metadata/user/all-mysql-server [post]

func GetAllUsersByDBID added in v1.1.1

func GetAllUsersByDBID(c *gin.Context)

@Tags database @Summary get all users @Accept application/json @Param token body string true "token" @Param id body int true "db id" @Produce application/json @Success 200 {string} string "{"users": [{"department_name": "dn","account_name": "da", "mobile": "m", "del_flag": 0,"last_update_time": "2021-01-21T13:00:00+08:00","user_name": "un","create_time": "2021-01-21T13:00:00+08:00","employee_id": 1,"email": "e","telephone": "t","role": 1, "id": 1}]}" @Router /api/v1/metadata/db/all-user [post]

func GetAllUsersByMySQLClusterID added in v1.1.1

func GetAllUsersByMySQLClusterID(c *gin.Context)

@Tags mysql cluster @Summary get all users @Accept application/json @Param token body string true "token" @Param id body int true "mysql cluster id" @Produce application/json @Success 200 {string} string "{"users":[{"id":1,"employee_id":"100001","account_name":"zs001","last_update_time":"2021-11-22T13:46:20.430926+08:00","mobile":"13012345678","role":3,"del_flag":0,"user_name":"zhangsan","department_name":"arch","email":"allinemailtest@163.com","telephone":"01012345678","create_time":"2021-10-25T09:21:50.364327+08:00"}]}" @Router /api/v1/metadata/mysql-cluster/all-user [post]

func GetApp

func GetApp(c *gin.Context)

@Tags application @Summary get all applications @Accept application/json @Param token body string true "token" @Produce application/json @Success 200 {string} string "{"apps": [ {"id": 2,"app_name": "app2","level": 2,"del_flag": 0,"create_time": "2021-10-25T09:46:04.275796+08:00","last_update_time": "2021-12-21T09:15:47.688546+08:00"}]}" @Router /api/v1/metadata/app/all [post]

func GetAppByID

func GetAppByID(c *gin.Context)

@Tags application @Summary get application by id @Accept application/json @Param token body string true "token" @Param id body int true "app id" @Produce application/json @Success 200 {string} string "{"apps": [ {"id": 2,"app_name": "app2","level": 2,"del_flag": 0,"create_time": "2021-10-25T09:46:04.275796+08:00","last_update_time": "2021-12-21T09:15:47.688546+08:00"}]}" @Router /api/v1/metadata/app/id [post]

func GetAppByName

func GetAppByName(c *gin.Context)

@Tags application @Summary get application by system name @Accept application/json @Param token body string true "token" @Param app_name body string true "app name" @Produce application/json @Success 200 {string} string "{"apps": [ {"id": 2,"app_name": "app2","level": 2,"del_flag": 0,"create_time": "2021-10-25T09:46:04.275796+08:00","last_update_time": "2021-12-21T09:15:47.688546+08:00"}]}" @Router /api/v1/metadata/app/app-name [post]

func GetAppUsersByDBID added in v1.1.1

func GetAppUsersByDBID(c *gin.Context)

@Tags database @Summary get app users @Accept application/json @Param token body string true "token" @Param id body int true "db id" @Produce application/json @Success 200 {string} string "{"users": [{"department_name": "dn","account_name": "da", "mobile": "m", "del_flag": 0,"last_update_time": "2021-01-21T13:00:00+08:00","user_name": "un","create_time": "2021-01-21T13:00:00+08:00","employee_id": 1,"email": "e","telephone": "t","role": 1, "id": 1}]}" @Router /api/v1/metadata/db/app-user [post]

func GetAppUsersByMySQLClusterID added in v1.1.1

func GetAppUsersByMySQLClusterID(c *gin.Context)

@Tags mysql cluster @Summary get app users @Accept application/json @Param token body string true "token" @Param id body int true "mysql cluster id" @Produce application/json @Success 200 {string} string "{"users":[{"id":1,"employee_id":"100001","account_name":"zs001","last_update_time":"2021-11-22T13:46:20.430926+08:00","mobile":"13012345678","role":3,"del_flag":0,"user_name":"zhangsan","department_name":"arch","email":"allinemailtest@163.com","telephone":"01012345678","create_time":"2021-10-25T09:21:50.364327+08:00"}]}" @Router /api/v1/metadata/mysql-cluster/app-user [post]

func GetAppsByDBID added in v1.1.1

func GetAppsByDBID(c *gin.Context)

@Tags database @Summary get apps by id @Accept application/json @Param token body string true "token" @Param id body int true "db id" @Produce application/json @Success 200 {string} string "{"apps": [{"id": 66, "system_name": "kkk", "del_flag": 0, "create_time": "2021-01-21T10:00:00+08:00", "last_update_time": "2021-01-21T10:00:00+08:00", "level": 8, "owner_group": "k"}]}" @Router /api/v1/metadata/db/app [post]

func GetAppsByUserID added in v1.1.1

func GetAppsByUserID(c *gin.Context)

@Tags user @Summary get apps by id @Accept application/json @Param token body string true "token" @Param id body int true "user id" @Produce application/json @Success 200 {string} string "{"apps": [ {"id": 2,"app_name": "app2","level": 2,"del_flag": 0,"create_time": "2021-10-25T09:46:04.275796+08:00","last_update_time": "2021-12-21T09:15:47.688546+08:00"}]}" @Router /api/v1/metadata/user/app [post]

func GetByAccountNameOrEmployeeID added in v1.1.1

func GetByAccountNameOrEmployeeID(c *gin.Context)

@Tags user @Summary get user by loginName @Accept application/json @Param token body string true "token" @Param login_name body string true "login name" @Produce application/json @Success 200 {string} string "{"users": [{"id": 18,"employee_id": "21213434","account_name": "kf-Tom","mobile": "18088888888","role": 2,"user_name": "Tom","department_name": "kf","email": "test@test.com.cn","telephone": "02188888888","del_flag": 0,"create_time": "2022-03-07T15:56:32.277857+08:00","last_update_time": "2022-03-07T15:56:32.277857+08:00"}]}" @Router /api/v1/metadata/user/login-name [post]

func GetByUserName added in v1.1.1

func GetByUserName(c *gin.Context)

@Tags user @Summary get user by name @Accept application/json @Param token body string true "token" @Param user_name body string true "user name" @Produce application/json @Success 200 {string} string "{"users": [{"id": 18,"employee_id": "21213434","account_name": "kf-Tom","mobile": "18088888888","role": 2,"user_name": "Tom","department_name": "kf","email": "test@test.com.cn","telephone": "02188888888","del_flag": 0,"create_time": "2022-03-07T15:56:32.277857+08:00","last_update_time": "2022-03-07T15:56:32.277857+08:00"}]}" @Router /api/v1/metadata/user/user-name [post]

func GetDASAdminUsersByGroupID added in v1.1.1

func GetDASAdminUsersByGroupID(c *gin.Context)

@Tags resource group @Summary get users by id @Accept application/json @Param token body string true "token" @Param id body int true "resource group id" @Produce application/json @Success 200 {string} string {"users":[{"id":1,"email":"allinemailtest@163.com","role":3,"del_flag":0,"last_update_time":"2021-11-22T13:46:20.430926+08:00","create_time":"2021-10-25T09:21:50.364327+08:00","user_name":"zhangsan","department_name":"arch","employee_id":"100001","account_name":"zs001","telephone":"01012345678","mobile":"13012345678"}]} @Router /api/vi/metadata/resource-group/das-admin/id [post]

func GetDASAdminUsersByGroupUUID added in v1.1.1

func GetDASAdminUsersByGroupUUID(c *gin.Context)

@Tags resource group @Summary get users by resource group uuid @Accept application/json @Param token body string true "token" @Param group_uuid body string true "resource group uuid" @Produce application/json @Success 200 {string} string {"users":[{"id":1,"email":"allinemailtest@163.com","role":3,"del_flag":0,"last_update_time":"2021-11-22T13:46:20.430926+08:00","create_time":"2021-10-25T09:21:50.364327+08:00","user_name":"zhangsan","department_name":"arch","employee_id":"100001","account_name":"zs001","telephone":"01012345678","mobile":"13012345678"}]} @Router /api/vi/metadata/resource-group/das-admin/group-uuid [post]

func GetDB

func GetDB(c *gin.Context)

@Tags database @Summary get all databases @Accept application/json @Param token body string true "token" @Produce application/json @Success 200 {string} string "{"dbs": [{"id": 1, "db_name": "db1", "cluster_id": 1, "cluster_type": 1, "env_id": 1, "del_flag": 0, "create_time": "2021-01-22T09:59:21.379851+08:00", "last_update_time": "2021-01-22T09:59:21.379851+08:00"}]}" @Router /api/v1/metadata/db/all [post]

func GetDBByEnv

func GetDBByEnv(c *gin.Context)

@Tags database @Summary get database by env_id @Accept application/json @Param token body string true "token" @Param env_id body int true "env id" @Produce application/json @Success 200 {string} string "{"dbs": [{"id": 1, "db_name": "db1", "cluster_id": 1, "cluster_type": 1, "env_id": 1, "del_flag": 0, "create_time": "2021-01-22T09:59:21.379851+08:00", "last_update_time": "2021-01-22T09:59:21.379851+08:00"}]}" @Router /api/v1/metadata/db/env [post]

func GetDBByID

func GetDBByID(c *gin.Context)

@Tags database @Summary get database by id @Accept application/json @Param token body string true "token" @Param id body int true "db id" @Produce application/json @Success 200 {string} string "{"dbs": [{"id": 1, "db_name": "db1", "cluster_id": 1, "cluster_type": 1, "env_id": 1, "del_flag": 0, "create_time": "2021-01-22T09:59:21.379851+08:00", "last_update_time": "2021-01-22T09:59:21.379851+08:00"}]}" @Router /api/v1/metadata/db/id [post]

func GetDBByNameAndClusterInfo

func GetDBByNameAndClusterInfo(c *gin.Context)

@Tags database @Summary get database by db name and cluster info @Accept application/json @Param token body string true "token" @Param db_name body string true "db name" @Param cluster_id body int true "cluster id" @Param cluster_type body int true "cluster type" @Produce application/json @Success 200 {string} string "{"dbs": [{"id": 1, "db_name": "db1", "cluster_id": 1, "cluster_type": 1, "env_id": 1, "del_flag": 0, "create_time": "2021-01-22T09:59:21.379851+08:00", "last_update_time": "2021-01-22T09:59:21.379851+08:00"}]}" @Router /api/v1/metadata/db/name-and-cluster-info [post]

func GetDBByNameAndHostInfo added in v1.1.1

func GetDBByNameAndHostInfo(c *gin.Context)

@Tags database @Summary get database by db name and host info @Accept application/json @Param token body string true "token" @Param db_name body string true "db name" @Param host_ip body string true "host_ip" @Param port_num body int true "port_num" @Produce application/json @Success 200 {string} string "{"dbs": [{"id": 1, "db_name": "pmm_test", "cluster_id": 1, "cluster_type": 1, "env_id": 1, "del_flag": 0, "create_time": "2022-03-14T09:59:21.379851+08:00", "last_update_time": "2022-03-14T09:59:21.379851+08:00"}]}" @Router /api/v1/metadata/db/name-and-host-info [post]

func GetDBUsersByMySQLClusterID added in v1.1.1

func GetDBUsersByMySQLClusterID(c *gin.Context)

@Tags mysql cluster @Summary get db users @Accept application/json @Param token body string true "token" @Param id body int true "mysql cluster id" @Produce application/json @Success 200 {string} string "{"users":[{"id":1,"employee_id":"100001","account_name":"zs001","last_update_time":"2021-11-22T13:46:20.430926+08:00","mobile":"13012345678","role":3,"del_flag":0,"user_name":"zhangsan","department_name":"arch","email":"allinemailtest@163.com","telephone":"01012345678","create_time":"2021-10-25T09:21:50.364327+08:00"}]}" @Router /api/v1/metadata/mysql-cluster/db-user [post]

func GetDBsByAppID added in v1.1.0

func GetDBsByAppID(c *gin.Context)

@Tags application @Summary get dbs @Accept application/json @Param token body string true "token" @Param id body int true "app id" @Produce application/json @Success 200 {string} string "{"dbs": [{"id": 1,"db_name": "db2","cluster_id": 3,"cluster_type": 1,"env_id": 1,"del_flag": 0,"create_time": "2022-01-04T15:08:33.418288+08:00","last_update_time": "2022-01-25T16:17:26.284761+08:00"},}]}" @Router /api/vi/metadata/app/db [post]

func GetDBsByHostInfo added in v1.1.1

func GetDBsByHostInfo(c *gin.Context)

@Tags database @Summary get databases by host info @Accept application/json @Param token body string true "token" @Param host_ip body string true "host_ip" @Param port_num body int true "port_num" @Produce application/json @Success 200 {string} string "{"dbs": [{"id": 1, "db_name": "pmm_test", "cluster_id": 1, "cluster_type": 1, "env_id": 1, "del_flag": 0, "create_time": "2022-03-14T09:59:21.379851+08:00", "last_update_time": "2022-03-14T09:59:21.379851+08:00"}]}" @Router /api/v1/metadata/db/host-info [post]

func GetDBsByMySQLClusterID added in v1.1.1

func GetDBsByMySQLClusterID(c *gin.Context)

@Tags mysql cluster @Summary get dbs by id @Accept application/json @Param token body string true "token" @Param id body int true "mysql cluster id" @Produce application/json @Success 200 {string} string "{"dbs":[{"cluster_type":1,"del_flag":0,"last_update_time":"2021-12-29T14:11:06.500863+08:00","id":2,"db_name":"das","cluster_id":1,"env_id":1,"create_time":"2021-09-02T15:14:40.782387+08:00"}]}" @Router /api/v1/metadata/mysql-cluster/db [post]

func GetDBsByUserID added in v1.1.1

func GetDBsByUserID(c *gin.Context)

@Tags user @Summary get dbs by id @Accept application/json @Param token body string true "token" @Param id body int true "user id" @Produce application/json @Success 200 {string} string "{"dbs": [{"id": 1,"db_name": "db2","cluster_id": 3,"cluster_type": 1,"env_id": 1,"del_flag": 0,"create_time": "2022-01-04T15:08:33.418288+08:00","last_update_time": "2022-01-25T16:17:26.284761+08:00"},}]}" @Router /api/v1/metadata/user/db [post]

func GetEnv

func GetEnv(c *gin.Context)

@Tags environment @Summary get all environments @Accept application/json @Param token body string true "token" @Produce application/json @Success 200 {string} string "{"envs": [{"id": 1, "env_name": "online", "del_flag": 0, "create_time": "2021-01-22T09:59:21.379851+08:00", "last_update_time": "2021-01-22T09:59:21.379851+08:00"}]}" @Router /api/v1/metadata/env/all [post]

func GetEnvByID

func GetEnvByID(c *gin.Context)

@Tags environment @Summary get environment by id @Accept application/json @Param token body string true "token" @Param id body int true "env id" @Produce application/json @Success 200 {string} string "{"envs": [{"id": 1, "env_name": "online", "del_flag": 0, "create_time": "2021-01-22T09:59:21.379851+08:00", "last_update_time": "2021-01-22T09:59:21.379851+08:00"}]}" @Router /api/v1/metadata/env/id [post]

func GetEnvByName

func GetEnvByName(c *gin.Context)

@Tags environment @Summary get environment by Name @Accept application/json @Param token body string true "token" @Param env_name body string true "env name" @Produce application/json @Success 200 {string} string "{"envs": [{"id": 1, "env_name": "online", "del_flag": 0, "create_time": "2021-01-22T09:59:21.379851+08:00", "last_update_time": "2021-01-22T09:59:21.379851+08:00"}]}" @Router /api/v1/metadata/env/env-name [post]

func GetMasterServersByID added in v1.1.0

func GetMasterServersByID(c *gin.Context)

@Tags mysql cluster @Summary get master servers by id @Accept application/json @Param token body string true "token" @Param id body int true "mysql cluster id" @Produce application/json @Success 200 {string} string "{"mysql_server":{"id":1,"server_name":"192-168-10-219","service_name":"192-168-10-219:3306","deployment_type":1,"last_update_time":"2021-12-21T09:16:20.184065+08:00","cluster_id":1,"host_ip":"192.168.10.219","port_num":3306,"version":"5.7","del_flag":0,"create_time":"2021-09-02T11:16:06.561525+08:00"}}" @Router /api/v1/metadata/mysql-cluster/master-server [post]

func GetMiddlewareCluster

func GetMiddlewareCluster(c *gin.Context)

@Tags middleware cluster @Summary get all middleware clusters @Accept application/json @Param token body string true "token" @Produce application/json @Success 200 {string} string {"middleware_clusters":[{"id":1,"cluster_name":"middleware-cluster-1","env_id":1,"del_flag":0,"create_time":"2021-11-09T18:06:57.917596+08:00","last_update_time":"2021-11-18T15:39:52.927116+08:00"}]} @Router /api/v1/metadata/middleware-cluster/all [post]

func GetMiddlewareClusterByEnv

func GetMiddlewareClusterByEnv(c *gin.Context)

@Tags middleware cluster @Summary get middleware cluster by env_id @Accept application/json @Param token body string true "token" @Param env_id body int true "env id" @Produce application/json @Success 200 {string} string {"middleware_clusters":[{"del_flag":0,"create_time":"2021-11-09T18:06:57.917596+08:00","last_update_time":"2021-11-18T15:39:52.927116+08:00","id":1,"cluster_name":"middleware-cluster-1","env_id":1}]} @Router /api/v1/metadata/middleware-cluster/env [post]

func GetMiddlewareClusterByID

func GetMiddlewareClusterByID(c *gin.Context)

@Tags middleware cluster @Summary get middleware cluster by id @Accept application/json @Param token body string true "token" @Param id body int true "middleware cluster id" @Produce application/json @Success 200 {string} string {"middleware_clusters":[{"del_flag":0,"create_time":"2021-11-09T18:06:57.917596+08:00","last_update_time":"2021-11-18T15:39:52.927116+08:00","id":1,"cluster_name":"middleware-cluster-1","env_id":1}]} @Router /api/v1/metadata/middleware-cluster/id [post]

func GetMiddlewareClusterByName

func GetMiddlewareClusterByName(c *gin.Context)

@Tags middleware cluster @Summary get middleware cluster by name @Accept application/json @Param token body string true "token" @Param cluster_name body string true "middleware cluster name" @Produce application/json @Success 200 {string} string {"middleware_clusters":[{"cluster_name":"middleware-cluster-1","env_id":1,"del_flag":0,"create_time":"2021-11-09T18:06:57.917596+08:00","last_update_time":"2021-11-18T15:39:52.927116+08:00","id":1}]} @Router /api/v1/metadata/middleware-cluster/cluster-name [post]

func GetMiddlewareClustersByGroupID added in v1.1.1

func GetMiddlewareClustersByGroupID(c *gin.Context)

@Tags resource group @Summary get middleware clusters by id @Accept application/json @Param token body string true "token" @Param id body string true "resource group id" @Produce application/json @Success 200 {string} string "{"middleware_clusters":[{"id":1,"cluster_name":"middleware-cluster-1","env_id":1,"del_flag":0,"create_time":"2021-11-09T18:06:57.917596+08:00","last_update_time":"2021-11-18T15:39:52.927116+08:00"}]}" @Router /api/v1/metadata/resource-group/middleware-cluster/id [post]

func GetMiddlewareClustersByGroupUUID added in v1.1.1

func GetMiddlewareClustersByGroupUUID(c *gin.Context)

@Tags resource group @Summary get middleware clusters by resource group uuid @Accept application/json @Param token body string true "token" @Param group_uuid body string true "resource group uuid" @Produce application/json @Success 200 {string} string "{"middleware_clusters":[{"id":1,"cluster_name":"middleware-cluster-1","env_id":1,"del_flag":0,"create_time":"2021-11-09T18:06:57.917596+08:00","last_update_time":"2021-11-18T15:39:52.927116+08:00"}]}" @Router /api/v1/metadata/resource-group/middleware-cluster/group-uuid [post]

func GetMiddlewareClustersByUserID added in v1.1.1

func GetMiddlewareClustersByUserID(c *gin.Context)

@Tags user @Summary get middleware clusters by id @Accept application/json @Param token body string true "token" @Param id body int true "user id" @Produce application/json @Success 200 {string} string "{"middleware_clusters": [{"id": 1,"cluster_name": "middleware-cluster-1","env_id": 1,"del_flag": 0,"create_time": "2021-11-09T18:06:57.917596+08:00","last_update_time": "2021-11-18T15:39:52.927116+08:00"}]}" @Router /api/v1/metadata/user/middleware-cluster [post]

func GetMiddlewareServer

func GetMiddlewareServer(c *gin.Context)

@Tags middleware server @Summary get all middleware servers @Accept application/json @Param token body string true "token" @Produce application/json @Success 200 {string} string "{"middleware_servers":[{"last_update_time":"2021-11-18T15:54:10.599097+08:00","cluster_id":1,"server_name":"middleware-server-1","port_num":33061,"del_flag":0,"create_time":"2021-11-17T14:47:10.521279+08:00","id":1,"middleware_role":1,"host_ip":"192.168.10.219"}]}" @Router /api/v1/metadata/middleware-server/all [post]

func GetMiddlewareServerByClusterID

func GetMiddlewareServerByClusterID(c *gin.Context)

@Tags middleware server @Summary get middleware servers by cluster id @Accept application/json @Param token body string true "token" @Param cluster_id body int true "middleware cluster id" @Produce application/json @Success 200 {string} string "{"middleware_servers":[{"id":1,"cluster_id":1,"server_name":"middleware-server-1","host_ip":"192.168.10.219","port_num":33061,"del_flag":0,"create_time":"2021-11-17T14:47:10.521279+08:00","last_update_time":"2021-11-18T15:54:10.599097+08:00","middleware_role":1}]}" @Router /api/v1/metadata/middleware-server/cluster-id [post]

func GetMiddlewareServerByHostInfo

func GetMiddlewareServerByHostInfo(c *gin.Context)

@Tags middleware server @Summary get middleware server by host info @Accept application/json @Param token body string true "token" @Param host_ip body string true "host ip" @Param port_num body int true "port number" @Produce application/json @Success 200 {string} string "{"middleware_servers":[{"middleware_role":1,"host_ip":"192.168.10.219","del_flag":0,"last_update_time":"2021-11-18T15:54:10.599097+08:00","id":1,"server_name":"middleware-server-1","cluster_id":1,"port_num":33061,"create_time":"2021-11-17T14:47:10.521279+08:00"}]}" @Router /api/v1/metadata/middleware-server/host-info [post]

func GetMiddlewareServerByID

func GetMiddlewareServerByID(c *gin.Context)

@Tags middleware server @Summary get middleware server by id @Accept application/json @Param token body string true "token" @Param id body int true "middleware server id" @Produce application/json @Success 200 {string} string "{"middleware_servers":[{"last_update_time":"2021-11-18T15:54:10.599097+08:00","id":1,"server_name":"middleware-server-1","middleware_role":1,"port_num":33061,"cluster_id":1,"host_ip":"192.168.10.219","del_flag":0,"create_time":"2021-11-17T14:47:10.521279+08:00"}]}" @Router /api/v1/metadata/middleware-server/id [post]

func GetMiddlewareServers added in v1.1.0

func GetMiddlewareServers(c *gin.Context)

@Tags middleware cluster @Summary get middleware servers by cluster id @Accept application/json @Param token body string true "token" @Param id body int true "middleware cluster id" @Produce application/json @Success 200 {string} string {"middleware_servers":[{"id":1,"cluster_id":1,"server_name":"update_middeware_server","middleware_role":1,"port_num":33061,"del_flag":0,"create_time":"2021-11-17T14:47:10.521279+08:00","last_update_time":"2022-03-02T10:18:52.564191+08:00","host_ip":"192.168.10.219"}]} @Router /api/vi/metadata/middleware-cluster/middleware-server [post]

func GetMiddlewareServersByGroupID added in v1.1.1

func GetMiddlewareServersByGroupID(c *gin.Context)

@Tags resource group @Summary get middleware servers by id @Accept application/json @Param token body string true "token" @Param id body string true "resource group id" @Produce application/json @Success 200 {string} string "{"middleware_servers":[{"id":1,"middleware_role":1,"host_ip":"192.168.137.11","port_num":33061,"del_flag":0,"last_update_time":"2022-04-25T14:50:59.847396+08:00","create_time":"2022-04-25T14:32:41.275617+08:00","cluster_id":1,"server_name":"middleware-server-1"}]}" @Router /api/v1/metadata/resource-group/middleware-server/id [post]

func GetMiddlewareServersByGroupUUID added in v1.1.1

func GetMiddlewareServersByGroupUUID(c *gin.Context)

@Tags resource group @Summary get middleware servers by resource group uuid @Accept application/json @Param token body string true "token" @Param group_uuid body string true "resource group uuid" @Produce application/json @Success 200 {string} string "{"middleware_clusters":[{"id":1,"cluster_name":"middleware-cluster-1","env_id":1,"del_flag":0,"create_time":"2021-11-09T18:06:57.917596+08:00","last_update_time":"2021-11-18T15:39:52.927116+08:00"}]}" @Router /api/v1/metadata/resource-group/middleware-server/group-uuid [post]

func GetMonitorSystem

func GetMonitorSystem(c *gin.Context)

@Tags monitor system @Summary get all monitor systems @Accept application/json @Param token body string true "token" @Produce application/json @Success 200 {string} string "{"monitor_systems": [{"id": 1, "system_name": "pmm", "system_type": 1, "host_ip": "127.0.0.1", "port_num": 3306, "port_num_slow": 3307, "base_url": "http://127.0.0.1/prometheus/api/v1/", "env_id": 1, "del_flag": 0, "create_time": "2021-01-22T09:59:21.379851+08:00", "last_update_time": "2021-01-22T09:59:21.379851+08:00"}]}" @Router /api/v1/metadata/monitor-system/all [post]

func GetMonitorSystemByEnv

func GetMonitorSystemByEnv(c *gin.Context)

@Tags monitor system @Summary get monitor system by env_id @Accept application/json @Param token body string true "token" @Param env_id body int true "env id" @Produce application/json @Success 200 {string} string "{"monitor_systems": [{"id": 1, "system_name": "pmm", "system_type": 1, "host_ip": "127.0.0.1", "port_num": 3306, "port_num_slow": 3307, "base_url": "http://127.0.0.1/prometheus/api/v1/", "env_id": 1, "del_flag": 0, "create_time": "2021-01-22T09:59:21.379851+08:00", "last_update_time": "2021-01-22T09:59:21.379851+08:00"}]}" @Router /api/v1/metadata/monitor-system/env [post]

func GetMonitorSystemByHostInfo

func GetMonitorSystemByHostInfo(c *gin.Context)

@Tags monitor system @Summary get monitor system by host info @Accept application/json @Param token body string true "token" @Param host_ip body string true "host ip" @Param port_num body int true "port num" @Produce application/json @Success 200 {string} string "{"monitor_systems": [{"port_num_slow":9000,"base_url":"/prometheus","create_time":"2021-09-02T09:06:30.736111+08:00","last_update_time":"2021-11-18T16:16:18.702104+08:00","host_ip":"192.168.10.219","port_num":80,"env_id":1,"del_flag":0,"id":1,"system_name":"pmm2","system_type":2},{"base_url":"/prometheus","env_id":1,"del_flag":0,"create_time":"2021-09-02T15:11:19.558733+08:00","id":2,"port_num":80,"port_num_slow":33061,"last_update_time":"2021-11-10T10:01:52.717786+08:00","system_name":"pmm1","system_type":1,"host_ip":"192.168.10.220"}]}" @Router /api/v1/metadata/monitor-system/host-info [post]

func GetMonitorSystemByID

func GetMonitorSystemByID(c *gin.Context)

@Tags monitor system @Summary get monitor system by id @Accept application/json @Param token body string true "token" @Param id body int true "monitor system id" @Produce application/json @Success 200 {string} string "{"monitor_systems": [{"id": 1, "system_name": "pmm", "system_type": 1, "host_ip": "127.0.0.1", "port_num": 3306, "port_num_slow": 3307, "base_url": "http://127.0.0.1/prometheus/api/v1/", "env_id": 1, "del_flag": 0, "create_time": "2021-01-22T09:59:21.379851+08:00", "last_update_time": "2021-01-22T09:59:21.379851+08:00"}]}" @Router /api/v1/metadata/monitor-system/id [post]

func GetMySQLCluster

func GetMySQLCluster(c *gin.Context)

@Tags mysql cluster @Summary get all mysql clusters @Accept application/json @Produce application/json @Param token body string true "token" @Success 200 {string} string "{"mysql_clusters":[{"middleware_cluster_id":1,"monitor_system_id":1,"env_id":1,"del_flag":0,"create_time":"2021-02-23T20:57:24.603009+08:00","last_update_time":"2021-02-23T20:57:24.603009+08:00","id":1,"cluster_name":"cluster_name_init"}]}" @Router /api/v1/metadata/mysql-cluster/all [post]

func GetMySQLClusterByDBID added in v1.1.0

func GetMySQLClusterByDBID(c *gin.Context)

@Tags database @Summary get mysql cluster by id @Accept application/json @Param token body string true "token" @Param id body int true "db id" @Produce application/json @Success 200 {string} string "{"mysql_cluster": [{"middleware_cluster_id":1,"monitor_system_id":1,"env_id":1,"del_flag":0,"create_time":"2021-02-23T20:57:24.603009+08:00","last_update_time":"2021-02-23T20:57:24.603009+08:00","id":1,"cluster_name":"cluster_name_init"},{"monitor_system_id":1, "env_id":1,"create_time":"2021-02-23T04:14:23.707238+08:00","last_update_time":"2021-02-23T04:14:23.707238+08:00","id":2,"cluster_name":"newTest","middleware_cluster_id":1,"del_flag":0}]}" @Router /api/v1/metadata/db/mysql-cluster [post]

func GetMySQLClusterByEnv

func GetMySQLClusterByEnv(c *gin.Context)

@Tags mysql cluster @Summary get mysql cluster by env id @Accept application/json @Param token body string true "token" @Param env_id body int true "env id" @Produce application/json @Success 200 {string} string "{"mysql_clusters":[{"del_flag":0,"create_time":"2021-02-23T20:57:24.603009+08:00","id":1,"monitor_system_id":1,"env_id":1,"last_update_time":"2021-02-23T20:57:24.603009+08:00","cluster_name":"cluster_name_init","middleware_cluster_id":1}]}" @Router /api/v1/metadata/mysql-cluster/env [post]

func GetMySQLClusterByID

func GetMySQLClusterByID(c *gin.Context)

@Tags mysql cluster @Summary get mysql cluster by id @Accept application/json @Param token body string true "token" @Param id body int true "mysql cluster id" @Produce application/json @Success 200 {string} string "{"mysql_clusters":[{"del_flag":0,"create_time":"2021-02-23T20:57:24.603009+08:00","id":1,"monitor_system_id":1,"env_id":1,"last_update_time":"2021-02-23T20:57:24.603009+08:00","cluster_name":"cluster_name_init","middleware_cluster_id":1}]}" @Router /api/v1/metadata/mysql-cluster/id [post]

func GetMySQLClusterByMySQLServerID added in v1.1.0

func GetMySQLClusterByMySQLServerID(c *gin.Context)

@Tags mysql server @Summary get mysql cluster by id @Accept application/json @Param token body string true "token" @Param id body int true "mysql server id" @Produce application/json @Success 200 {string} string "{"mysql_servers":[{"server_name":"test","service_name":"test","host_ip":"192.168.1.1","port_num":3306,"del_flag":0,"create_time":"2022-03-02T01:26:32.107625+08:00","last_update_time":"2022-03-02T01:26:32.107625+08:00","id":26,"cluster_id":1,"deployment_type":1,"version":""}]}" @Router /api/v1/metadata/mysql-server/mysql-cluster/id [post]

func GetMySQLClusterByName

func GetMySQLClusterByName(c *gin.Context)

@Tags mysql cluster @Summary get mysql cluster by name @Accept application/json @Param token body string true "token" @Param name body string true "mysql cluster name" @Produce application/json @Success 200 {string} string "{"mysql_clusters":[{"del_flag":0,"create_time":"2021-02-23T20:57:24.603009+08:00","id":1,"monitor_system_id":1,"env_id":1,"last_update_time":"2021-02-23T20:57:24.603009+08:00","cluster_name":"cluster_name_init","middleware_cluster_id":1}]}" @Router /api/v1/metadata/mysql-cluster/cluster-name [post]

func GetMySQLClustersByGroupID added in v1.1.1

func GetMySQLClustersByGroupID(c *gin.Context)

@Tags resource group @Summary get mysql clusters by id @Accept application/json @Param token body string true "token" @Param id body string true "resource group id" @Produce application/json @Success 200 {string} string "{"mysql_clusters":[{"middleware_cluster_id":1,"monitor_system_id":1,"env_id":1,"del_flag":0,"create_time":"2021-02-23T20:57:24.603009+08:00","last_update_time":"2021-02-23T20:57:24.603009+08:00","id":1,"cluster_name":"cluster_name_init"}]}" @Router /api/v1/metadata/resource-group/mysql-cluster/id [post]

func GetMySQLClustersByGroupUUID added in v1.1.1

func GetMySQLClustersByGroupUUID(c *gin.Context)

@Tags resource group @Summary get mysql clusters by resource group uuid @Accept application/json @Param token body string true "token" @Param group_uuid body string true "resource group uuid" @Produce application/json @Success 200 {string} string "{"mysql_clusters":[{"middleware_cluster_id":1,"monitor_system_id":1,"env_id":1,"del_flag":0,"create_time":"2021-02-23T20:57:24.603009+08:00","last_update_time":"2021-02-23T20:57:24.603009+08:00","id":1,"cluster_name":"cluster_name_init"}]}" @Router /api/v1/metadata/resource-group/mysql-cluster/group-uuid [post]

func GetMySQLClustersByUserID added in v1.1.1

func GetMySQLClustersByUserID(c *gin.Context)

@Tags user @Summary get mysql clusters by id @Accept application/json @Param token body string true "token" @Param id body int true "user id" @Produce application/json @Success 200 {string} string "{"mysql_clusters": [{"id": 1,"cluster_name": "mysql-cluster-pmm2","middleware_cluster_id": 0,"env_id": 1"monitor_system_id": 1,"del_flag": 0,"last_update_time": "2021-12-21T09:16:10.750725+08:00","create_time": "2021-09-02T09:02:22.346672+08:00",},]}" @Router /api/v1/metadata/user/mysql-cluster [post]

func GetMySQLServer

func GetMySQLServer(c *gin.Context)

@Tags mysql server @Summary get all mysql servers @Accept application/json @Produce application/json @Param token body string true "token" @Success 200 {string} string "{"mysql_servers":[{"port_num":3306,"create_time":"2021-09-02T11:16:06.561525+08:00","last_update_time":"2022-03-01T08:19:09.779365+08:00","cluster_id":1,"server_name":"192-168-10-219","service_name":"192-168-10-219:3306","host_ip":"192.168.10.219","id":1,"deployment_type":1,"version":"5.7","del_flag":0}]}" @Router /api/v1/metadata/mysql-server/all [post]

func GetMySQLServerByClusterID

func GetMySQLServerByClusterID(c *gin.Context)

@Tags mysql server @Summary get mysql servers by cluster id @Accept application/json @Param token body string true "token" @Param cluster_id body int true "mysql cluster id" @Produce application/json @Success 200 {string} string "{"mysql_servers":[{"port_num":3306,"create_time":"2021-09-02T11:16:06.561525+08:00","last_update_time":"2022-03-01T08:19:09.779365+08:00","cluster_id":1,"server_name":"192-168-10-219","service_name":"192-168-10-219:3306","host_ip":"192.168.10.219","id":1,"deployment_type":1,"version":"5.7","del_flag":0}]}" @Router /api/v1/metadata/mysql-server/cluster-id [post]

func GetMySQLServerByHostInfo

func GetMySQLServerByHostInfo(c *gin.Context)

@Tags mysql server @Summary get mysql servers by host info @Accept application/json @Param token body string true "token" @Param host_ip body string true "host ip" @Param port_num body int true "host port number" @Produce application/json @Success 200 {string} string "{"mysql_servers":[{"port_num":3306,"create_time":"2021-09-02T11:16:06.561525+08:00","last_update_time":"2022-03-01T08:19:09.779365+08:00","cluster_id":1,"server_name":"192-168-10-219","service_name":"192-168-10-219:3306","host_ip":"192.168.10.219","id":1,"deployment_type":1,"version":"5.7","del_flag":0}]}" @Router /api/v1/metadata/mysql-server/host-info [post]

func GetMySQLServerByID

func GetMySQLServerByID(c *gin.Context)

@Tags mysql server @Summary get mysql server by id @Accept application/json @Param token body string true "token" @Param id body int true "mysql server id" @Produce application/json @Success 200 {string} string "{"mysql_servers":[{"port_num":3306,"create_time":"2021-09-02T11:16:06.561525+08:00","last_update_time":"2022-03-01T08:19:09.779365+08:00","cluster_id":1,"server_name":"192-168-10-219","service_name":"192-168-10-219:3306","host_ip":"192.168.10.219","id":1,"deployment_type":1,"version":"5.7","del_flag":0}]}" @Router /api/v1/metadata/mysql-server/id [post]

func GetMySQLServersByGroupID added in v1.1.1

func GetMySQLServersByGroupID(c *gin.Context)

@Tags resource group @Summary get mysql servers by id @Accept application/json @Param token body string true "token" @Param id body string true "resource group id" @Produce application/json @Success 200 {string} string "{"mysql_servers":[{"id":1,"server_name":"192-168-137-11","host_ip":"192.168.137.11","deployment_type":1,"version":"8.0.29","del_flag":0,"cluster_id":1,"create_time":"2021-09-02T11:16:06.561525+08:00","service_name":"192-168-137-11-mysql","port_num":3306,"last_update_time":"2022-06-13T16:22:59.178465+08:00"}]}" @Router /api/v1/metadata/resource-group/mysql-server/id [post]

func GetMySQLServersByGroupUUID added in v1.1.1

func GetMySQLServersByGroupUUID(c *gin.Context)

@Tags resource group @Summary get mysql servers by resource group uuid @Accept application/json @Param token body string true "token" @Param group_uuid body string true "resource group uuid" @Produce application/json @Success 200 {string} string "{"mysql_servers":[{"id":1,"server_name":"192-168-137-11","host_ip":"192.168.137.11","deployment_type":1,"version":"8.0.29","del_flag":0,"cluster_id":1,"create_time":"2021-09-02T11:16:06.561525+08:00","service_name":"192-168-137-11-mysql","port_num":3306,"last_update_time":"2022-06-13T16:22:59.178465+08:00"}]}" @Router /api/v1/metadata/resource-group/mysql-server/group-uuid [post]

func GetMySQLServersByID added in v1.1.0

func GetMySQLServersByID(c *gin.Context)

@Tags mysql cluster @Summary get mysql servers by id @Accept application/json @Param token body string true "token" @Param id body int true "mysql cluster id" @Produce application/json @Success 200 {string} string "{"mysql_servers":[{"id":1,"server_name":"192-168-10-219","service_name":"192-168-10-219:3306","deployment_type":1,"last_update_time":"2021-12-21T09:16:20.184065+08:00","cluster_id":1,"host_ip":"192.168.10.219","port_num":3306,"version":"5.7","del_flag":0,"create_time":"2021-09-02T11:16:06.561525+08:00"}]}" @Router /api/v1/metadata/mysql-cluster/mysql-server [post]

func GetResourceGroup added in v1.1.1

func GetResourceGroup(c *gin.Context)

@Tags resource group @Summary get all resource groups @Accept application/json @Param token body string true "token" @Produce application/json @Success 200 {string} string "{"resource_groups":[{"id":1,"group_uuid":"5c6c6d73-eac2-11ec-8183-001c42d502a6","group_name":"resource-group-01","del_flag":0,"create_time":"2022-06-13T10:42:15.082892+08:00","last_update_time":"2022-06-13T17:26:53.625206+08:00"}]}" @Router /api/v1/metadata/resource-group/all [post]

func GetResourceGroupByGroupUUID added in v1.1.1

func GetResourceGroupByGroupUUID(c *gin.Context)

@Tags resource group @Summary get resource group by resource group uuid @Accept application/json @Param token body string true "token" @Param group_uuid body int true "resource group uuid" @Produce application/json @Success 200 {string} string "{"resource_groups":[{"id":1,"group_uuid":"5c6c6d73-eac2-11ec-8183-001c42d502a6","group_name":"resource-group-01","del_flag":0,"create_time":"2022-06-13T10:42:15.082892+08:00","last_update_time":"2022-06-13T17:26:53.625206+08:00"}]}" @Router /api/v1/metadata/resource-group/group-uuid [post]

func GetResourceGroupByID added in v1.1.1

func GetResourceGroupByID(c *gin.Context)

@Tags resource group @Summary get resource group by id @Accept application/json @Param token body string true "token" @Param id body int true "resource group id" @Produce application/json @Success 200 {string} string "{"resource_groups":[{"id":1,"group_uuid":"5c6c6d73-eac2-11ec-8183-001c42d502a6","group_name":"resource-group-01","del_flag":0,"create_time":"2022-06-13T10:42:15.082892+08:00","last_update_time":"2022-06-13T17:26:53.625206+08:00"}]}" @Router /api/v1/metadata/resource-group/id [post]

func GetResourceGroupByMySQLClusterID added in v1.1.1

func GetResourceGroupByMySQLClusterID(c *gin.Context)

@Tags mysql cluster @Summary get resource group by id @Accept application/json @Param token body string true "token" @Param id body int true "mysql cluster id" @Produce application/json @Success 200 {string} string "" @Router /api/v1/metadata/mysql-cluster/resource-group [post]

func GetResourceGroupByResourceRoleID added in v1.1.1

func GetResourceGroupByResourceRoleID(c *gin.Context)

@Tags resource role @Summary get resource group by resource role id @Accept application/json @Param token body string true "token" @Param id body int true "resource role id" @Produce application/json @Success 200 {string} string "{"resource_group":{"id":1,"group_uuid":"uuid","group_name":"test","del_flag":0,"create_time":"2022-06-12T09:02:39.376944+08:00","last_update_time":"2022-06-12T09:02:39.376944+08:00"}}" @Router /api/v1/metadata/resource-role/resource-group [post]

func GetResourceRole added in v1.1.1

func GetResourceRole(c *gin.Context)

@Tags resource role @Summary get all resource roles @Accept application/json @Produce application/json @Param token body string true "token" @Success 200 {string} string "{"resource_roles":[{"del_flag":0,"create_time":"2022-06-12T09:03:23.298572+08:00","last_update_time":"2022-06-12T09:21:36.667854+08:00","id":1,"role_uuid":"test_role_uuid","role_name":"test_role","resource_group_id":1}]}" @Router /api/v1/metadata/resource-role/all [post]

func GetResourceRoleByID added in v1.1.1

func GetResourceRoleByID(c *gin.Context)

@Tags resource role @Summary get resource role by id @Accept application/json @Param token body string true "token" @Param id body int true "resource role id" @Produce application/json @Success 200 {string} string "{"resource_roles":[{"id":1,"role_uuid":"test_role_uuid","role_name":"test_role","resource_group_id":1,"del_flag":0,"create_time":"2022-06-12T09:03:23.298572+08:00","last_update_time":"2022-06-12T09:21:36.667854+08:00"}]}" @Router /api/v1/metadata/resource-role/id [post]

func GetResourceRoleByUUID added in v1.1.1

func GetResourceRoleByUUID(c *gin.Context)

@Tags resource role @Summary get resource role by uuid @Accept application/json @Param token body string true "token" @Param role_uuid body string true "resource role uuid" @Produce application/json @Success 200 {string} string "{"resource_roles":[{"id":1,"role_uuid":"test_role_uuid","role_name":"test_role","resource_group_id":1,"del_flag":0,"create_time":"2022-06-12T09:03:23.298572+08:00","last_update_time":"2022-06-12T09:21:36.667854+08:00"}]}" @Router /api/v1/metadata/resource-role/role-uuid [post]

func GetResourceRolesByGroupID added in v1.1.1

func GetResourceRolesByGroupID(c *gin.Context)

@Tags resource group @Summary get resource roles by id @Accept application/json @Param token body string true "token" @Param id body string true "resource group id" @Produce application/json @Success 200 {string} string "{"resource_roles":[{"id":2,"role_uuid":"c319e33a-eac3-11ec-8183-001c42d502a6","role_name":"das-admin","resource_group_id":1,"del_flag":0,"create_time":"2022-06-13T10:53:56.439107+08:00","last_update_time":"2022-06-13T17:27:09.037353+08:00"}]}" @Router /api/v1/metadata/resource-group/resource-role/id [post]

func GetResourceRolesByGroupUUID added in v1.1.1

func GetResourceRolesByGroupUUID(c *gin.Context)

@Tags resource group @Summary get resource roles by resource group uuid @Accept application/json @Param token body string true "token" @Param group_uuid body string true "resource group uuid" @Produce application/json @Success 200 {string} string "{"resource_groups":[{"id":1,"group_uuid":"5c6c6d73-eac2-11ec-8183-001c42d502a6","group_name":"resource-group-01","del_flag":0,"create_time":"2022-06-13T10:42:15.082892+08:00","last_update_time":"2022-06-13T17:26:53.625206+08:00"}]}" @Router /api/v1/metadata/resource-group/resource-role/group-uuid [post]

func GetStatisticsByDBIDAndTableName added in v1.1.1

func GetStatisticsByDBIDAndTableName(c *gin.Context)

@Tags Tables @Summary get table statistics by db id and table name @Accept application/json @Param token body string true "token" @Param db_id body int true "db id" @Param table_name body string true "table name" @Param login_name body string true "account name or employee id" @Produce application/json @Success 200 {string} string "{"table_statistics": [{"size_mb": 0.015, "engine": "InnoDB", "char_set": "utf8mb4", "collation": "utf8mb4_general_ci", "create_time": "2022-03-04T14:24:11+08:00", "table_name": "t_meta_db_info", "size": 16384, "avg_row_length": 16384, "auto_increment": 2, "db_name": "das", "table_rows": 1}], "index_statistics": [{"is_nullable": false,"db_name": "das", "table_name": "t_meta_db_info", "index_name": "PRIMARY", "sequence":1, "column_name": "id", "cardinality": 1, "is_unique": true}, {"is_nullable": false, "db_name": "das", "table_name": "t_meta_db_info", "index_name": "idx01_db_name_cluster_id_cluster_type_env_id", "sequence": 1, "column_name": "db_name", "cardinality": 1, "is_unique": true}, {"column_name": "cluster_id", "cardinality": 1, "is_unique": true, "is_nullable": false, "db_name": "das", "table_name": "t_meta_db_info", "index_name": "idx01_db_name_cluster_id_cluster_type_env_id", "sequence": 2}, {"cardinality": 1, "is_unique": true, "is_nullable": false, "db_name": "das", "table_name": "t_meta_db_info", "index_name": "idx01_db_name_cluster_id_cluster_type_env_id", "sequence":3 ,"column_name": "cluster_type"}, {"sequence": 4,"column_name": "env_id", "cardinality": 1, "is_unique":true, "is_nullable": false, "db_name": "das", "table_name": "t_meta_db_info", "index_name": "idx01_db_name_cluster_id_cluster_type_env_id"}], "create_statement": "CREATE TABLE `t_meta_db_info` (\n `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',\n `db_name` varchar(100) NOT NULL COMMENT '数据库名称',\n `cluster_id` int(11) NOT NULL COMMENT '数据库集群ID',\n `cluster_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '集群类型: 1-单库, 2-分库分表',\n `env_id` int(11) NOT NULL COMMENT '环境: 1-online, 2-rel, 3-uat, 4-sit, 5-pt, 6-dev',\n `del_flag` tinyint(4) NOT NULL DEFAULT '0' COMMENT '删除标记: 0-未删除, 1-已删除',\n `create_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) COMMENT '创建时间',\n `last_update_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) COMMENT '最后更新时间',\n PRIMARY KEY (`id`),\n UNIQUE KEY `idx01_db_name_cluster_id_cluster_type_env_id` (`db_name`,`cluster_id`,`cluster_type`,`env_id`)\n) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='数据库信息表'"}" @Router /api/v1/metadata/table/statistic/db [post]

func GetStatisticsByHostInfoAndDBNameAndTableName added in v1.1.1

func GetStatisticsByHostInfoAndDBNameAndTableName(c *gin.Context)

@Tags Tables @Summary get table statistics by host info and db name and table name @Accept application/json @Param token body string true "token" @Param host_ip body string true "host ip" @Param port_num body int true "port num" @Param db_name body string true "db name" @Param table_name body string true "table name" @Param login_name body string true "account name or employee id" @Produce application/json @Success 200 {string} string "{"table_statistics": [{"size_mb": 0.015, "engine": "InnoDB", "char_set": "utf8mb4", "collation": "utf8mb4_general_ci", "create_time": "2022-03-04T14:24:11+08:00", "table_name": "t_meta_db_info", "size": 16384, "avg_row_length": 16384, "auto_increment": 2, "db_name": "das", "table_rows": 1}], "index_statistics": [{"is_nullable": false,"db_name": "das", "table_name": "t_meta_db_info", "index_name": "PRIMARY", "sequence":1, "column_name": "id", "cardinality": 1, "is_unique": true}, {"is_nullable": false, "db_name": "das", "table_name": "t_meta_db_info", "index_name": "idx01_db_name_cluster_id_cluster_type_env_id", "sequence": 1, "column_name": "db_name", "cardinality": 1, "is_unique": true}, {"column_name": "cluster_id", "cardinality": 1, "is_unique": true, "is_nullable": false, "db_name": "das", "table_name": "t_meta_db_info", "index_name": "idx01_db_name_cluster_id_cluster_type_env_id", "sequence": 2}, {"cardinality": 1, "is_unique": true, "is_nullable": false, "db_name": "das", "table_name": "t_meta_db_info", "index_name": "idx01_db_name_cluster_id_cluster_type_env_id", "sequence":3 ,"column_name": "cluster_type"}, {"sequence": 4,"column_name": "env_id", "cardinality": 1, "is_unique":true, "is_nullable": false, "db_name": "das", "table_name": "t_meta_db_info", "index_name": "idx01_db_name_cluster_id_cluster_type_env_id"}], "create_statement": "CREATE TABLE `t_meta_db_info` (\n `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',\n `db_name` varchar(100) NOT NULL COMMENT '数据库名称',\n `cluster_id` int(11) NOT NULL COMMENT '数据库集群ID',\n `cluster_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '集群类型: 1-单库, 2-分库分表',\n `env_id` int(11) NOT NULL COMMENT '环境: 1-online, 2-rel, 3-uat, 4-sit, 5-pt, 6-dev',\n `del_flag` tinyint(4) NOT NULL DEFAULT '0' COMMENT '删除标记: 0-未删除, 1-已删除',\n `create_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) COMMENT '创建时间',\n `last_update_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) COMMENT '最后更新时间',\n PRIMARY KEY (`id`),\n UNIQUE KEY `idx01_db_name_cluster_id_cluster_type_env_id` (`db_name`,`cluster_id`,`cluster_type`,`env_id`)\n) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='数据库信息表'"}" @Router /api/v1/metadata/table/statistic/host-info-db [post]

func GetTablesByDBID added in v1.1.1

func GetTablesByDBID(c *gin.Context)

@Tags Tables @Summary get tables by db id @Accept application/json @Param token body string true "token" @Param db_id body int true "db id" @Param login_name body string true "account name or employee id" @Produce application/json @Success 200 {string} string "{"tables": [{"db_name": "das","table_name": "t_meta_db_info"}]}" @Router /api/v1/metadata/table/db [post]

func GetUser

func GetUser(c *gin.Context)

func GetUserByAccountName

func GetUserByAccountName(c *gin.Context)

@Tags user @Summary get user by account name @Accept application/json @Param token body string true "token" @Param account_name body string true "account name" @Produce application/json @Success 200 {string} string "{"users": [{"id": 18,"employee_id": "21213434","account_name": "kf-Tom","mobile": "18088888888","role": 2,"user_name": "Tom","department_name": "kf","email": "test@test.com.cn","telephone": "02188888888","del_flag": 0,"create_time": "2022-03-07T15:56:32.277857+08:00","last_update_time": "2022-03-07T15:56:32.277857+08:00"}]}" @Router /api/v1/metadata/user/account-name [post]

func GetUserByEmail

func GetUserByEmail(c *gin.Context)

@Tags user @Summary get user by email @Accept application/json @Param token body string true "token" @Param email body string true "email" @Produce application/json @Success 200 {string} string "{"users": [{"id": 18,"employee_id": "21213434","account_name": "kf-Tom","mobile": "18088888888","role": 2,"user_name": "Tom","department_name": "kf","email": "test@test.com.cn","telephone": "02188888888","del_flag": 0,"create_time": "2022-03-07T15:56:32.277857+08:00","last_update_time": "2022-03-07T15:56:32.277857+08:00"}]}" @Router /api/v1/metadata/user/email [post]

func GetUserByEmployeeID

func GetUserByEmployeeID(c *gin.Context)

@Tags user @Summary get user by employee id @Accept application/json @Param token body string true "token" @Param employee_id body string true "employee id" @Produce application/json @Success 200 {string} string "{"users": [{"id": 18,"employee_id": "21213434","account_name": "kf-Tom","mobile": "18088888888","role": 2,"user_name": "Tom","department_name": "kf","email": "test@test.com.cn","telephone": "02188888888","del_flag": 0,"create_time": "2022-03-07T15:56:32.277857+08:00","last_update_time": "2022-03-07T15:56:32.277857+08:00"}]}" @Router /api/v1/metadata/user/employee-id [post]

func GetUserByID

func GetUserByID(c *gin.Context)

@Tags user @Summary get user by id @Accept application/json @Param token body string true "token" @Param id body int true "user id" @Produce application/json @Success 200 {string} string "{"users": [{"id": 18,"employee_id": "21213434","account_name": "kf-Tom","mobile": "18088888888","role": 2,"user_name": "Tom","department_name": "kf","email": "test@test.com.cn","telephone": "02188888888","del_flag": 0,"create_time": "2022-03-07T15:56:32.277857+08:00","last_update_time": "2022-03-07T15:56:32.277857+08:00"}]}" @Router /api/v1/metadata/user/id [post]

func GetUserByMobile

func GetUserByMobile(c *gin.Context)

@Tags user @Summary get user by mobile @Accept application/json @Param token body string true "token" @Param mobile body string true "mobile" @Produce application/json @Success 200 {string} string "{"users": [{"id": 18,"employee_id": "21213434","account_name": "kf-Tom","mobile": "18088888888","role": 2,"user_name": "Tom","department_name": "kf","email": "test@test.com.cn","telephone": "02188888888","del_flag": 0,"create_time": "2022-03-07T15:56:32.277857+08:00","last_update_time": "2022-03-07T15:56:32.277857+08:00"}]}" @Router /api/v1/metadata/user/mobile [post]

func GetUserByTelephone

func GetUserByTelephone(c *gin.Context)

@Tags user @Summary get user by telephone @Accept application/json @Param token body string true "token" @Param telephone body string true "telephone" @Produce application/json @Success 200 {string} string "{"users": [{"id": 18,"employee_id": "21213434","account_name": "kf-Tom","mobile": "18088888888","role": 2,"user_name": "Tom","department_name": "kf","email": "test@test.com.cn","telephone": "02188888888","del_flag": 0,"create_time": "2022-03-07T15:56:32.277857+08:00","last_update_time": "2022-03-07T15:56:32.277857+08:00"}]}" @Router /api/v1/metadata/user/telephone [post]

func GetUsersByAppID added in v1.1.1

func GetUsersByAppID(c *gin.Context)

@Tags application @Summary get users @Accept application/json @Param token body string true "token" @Param id body int true "app id" @Produce application/json @Success 200 {string} string "{"users": [{"id": 18,"employee_id": "21213434","account_name": "kf-Tom","mobile": "18088888888","role": 2,"user_name": "Tom","department_name": "kf","email": "test@test.com.cn","telephone": "02188888888","del_flag": 0,"create_time": "2022-03-07T15:56:32.277857+08:00","last_update_time": "2022-03-07T15:56:32.277857+08:00"}]}" @Router /api/vi/metadata/app/user [post]

func GetUsersByDBID added in v1.1.1

func GetUsersByDBID(c *gin.Context)

@Tags database @Summary get db users @Accept application/json @Param token body string true "token" @Param id body int true "db id" @Produce application/json @Success 200 {string} string "{"users": [{"department_name": "dn","account_name": "da", "mobile": "m", "del_flag": 0,"last_update_time": "2021-01-21T13:00:00+08:00","user_name": "un","create_time": "2021-01-21T13:00:00+08:00","employee_id": 1,"email": "e","telephone": "t","role": 1, "id": 1}]}" @Router /api/v1/metadata/db/db-user [post]

func GetUsersByGroupID added in v1.1.1

func GetUsersByGroupID(c *gin.Context)

@Tags resource group @Summary get users by id @Accept application/json @Param token body string true "token" @Param id body int true "resource group id" @Produce application/json @Success 200 {string} string {"users":[{"id":1,"email":"allinemailtest@163.com","role":3,"del_flag":0,"last_update_time":"2021-11-22T13:46:20.430926+08:00","create_time":"2021-10-25T09:21:50.364327+08:00","user_name":"zhangsan","department_name":"arch","employee_id":"100001","account_name":"zs001","telephone":"01012345678","mobile":"13012345678"}]} @Router /api/vi/metadata/resource-group/user/id [post]

func GetUsersByGroupUUID added in v1.1.1

func GetUsersByGroupUUID(c *gin.Context)

@Tags resource group @Summary get users by resource group uuid @Accept application/json @Param token body string true "token" @Param group_uuid body string true "resource group uuid" @Produce application/json @Success 200 {string} string {"users":[{"id":1,"email":"allinemailtest@163.com","role":3,"del_flag":0,"last_update_time":"2021-11-22T13:46:20.430926+08:00","create_time":"2021-10-25T09:21:50.364327+08:00","user_name":"zhangsan","department_name":"arch","employee_id":"100001","account_name":"zs001","telephone":"01012345678","mobile":"13012345678"}]} @Router /api/vi/metadata/resource-group/user/group-uuid [post]

func GetUsersByMiddlewareClusterID added in v1.1.1

func GetUsersByMiddlewareClusterID(c *gin.Context)

@Tags middleware cluster @Summary get middleware servers by cluster id @Accept application/json @Param token body string true "token" @Param id body int true "middleware cluster id" @Produce application/json @Success 200 {string} string {"users":[{"id":1,"email":"allinemailtest@163.com","role":3,"del_flag":0,"last_update_time":"2021-11-22T13:46:20.430926+08:00","create_time":"2021-10-25T09:21:50.364327+08:00","user_name":"zhangsan","department_name":"arch","employee_id":"100001","account_name":"zs001","telephone":"01012345678","mobile":"13012345678"}]} @Router /api/vi/metadata/middleware-cluster/user [post]

func GetUsersByMySQLClusterID added in v1.1.1

func GetUsersByMySQLClusterID(c *gin.Context)

@Tags mysql cluster @Summary get mysql cluster users @Accept application/json @Param token body string true "token" @Param id body int true "mysql cluster id" @Produce application/json @Success 200 {string} string "{"users":[{"id":1,"employee_id":"100001","account_name":"zs001","last_update_time":"2021-11-22T13:46:20.430926+08:00","mobile":"13012345678","role":3,"del_flag":0,"user_name":"zhangsan","department_name":"arch","email":"allinemailtest@163.com","telephone":"01012345678","create_time":"2021-10-25T09:21:50.364327+08:00"}]}" @Router /api/v1/metadata/mysql-cluster/user [post]

func GetUsersByResourceRoleID added in v1.1.1

func GetUsersByResourceRoleID(c *gin.Context)

@Tags resource role @Summary get resource role users @Accept application/json @Param token body string true "token" @Param id body int true "resource role id" @Produce application/json @Success 200 {string} string "{"users":[{"id":14,"mobile":"","role":3,"del_flag":0,"user_name":"tester","department_name":"","employee_id":"","account_name":"test","email":"929059501@qq.com","telephone":"","create_time":"2021-12-06T18:08:03.736262+08:00","last_update_time":"2021-12-06T18:08:03.736262+08:00"}]}" @Router /api/v1/metadata/resource-role/user/id [post]

func GetUsersByResourceRoleUUID added in v1.1.1

func GetUsersByResourceRoleUUID(c *gin.Context)

@Tags resource role @Summary get resource role users by resource role uuid @Accept application/json @Param token body string true "token" @Param role_uuid body int true "resource role uuid" @Produce application/json @Success 200 {string} string "{"users":[{"account_name":"test","email":"929059501@qq.com","telephone":"","mobile":"","role":3,"user_name":"tester","employee_id":"","del_flag":0,"create_time":"2021-12-06T18:08:03.736262+08:00","id":14,"department_name":"","last_update_time":"2021-12-06T18:08:03.736262+08:00"}]}" @Router /api/v1/metadata/resource-role/user/role-uuid [post]

func IsMaster added in v1.1.0

func IsMaster(c *gin.Context)

@Tags mysql server @Summary check if mysql server is a master node @Accept application/json @Param token body string true "token" @Param host_ip body string true "host ip" @Param port_num body int true "host port number" @Produce application/json @Success 200 {string} string "{"host_ip":"192.168.1.2","port_num":"3306"}" @Router /api/v1/metadata/mysql-server/is-master/host-info [post]

func MiddlewareClusterAddUser added in v1.1.1

func MiddlewareClusterAddUser(c *gin.Context)

@Tags middleware cluster @Summary add user map @Accept application/json @Param token body string true "token" @Param id body int true "middleware cluster id" @Param user_id body int true "user id" @Produce application/json @Success 200 {string} string {"users":[{"account_name":"zs001","email":"allinemailtest@163.com","mobile":"13012345678","del_flag":0,"create_time":"2021-10-25T09:21:50.364327+08:00","user_name":"zhangsan","department_name":"arch","employee_id":"100001","telephone":"01012345678","role":3,"last_update_time":"2021-11-22T13:46:20.430926+08:00","id":1}]} @Router /api/v1/metadata/middleware-cluster/add-user [post]

func MiddlewareClusterDeleteUser added in v1.1.1

func MiddlewareClusterDeleteUser(c *gin.Context)

@Tags middleware cluster @Summary delete user map @Accept application/json @Param token body string true "token" @Param id body int true "middleware cluster id" @Param user_id body int true "user id" @Produce application/json @Success 200 {string} string {"users":[]} @Router /api/v1/metadata/middleware-cluster/delete-user [post]

func MySQLClusterAddUser added in v1.1.1

func MySQLClusterAddUser(c *gin.Context)

@Tags mysql cluster @Summary add user map @Accept application/json @Param token body string true "token" @Param id body int true "mysql cluster id" @Param user_id body int true "user id" @Produce application/json @Success 200 {string} string "{"users":[{"id":1,"employee_id":"100001","email":"allinemailtest@163.com","role":3,"del_flag":0,"user_name":"zhangsan","department_name":"arch","account_name":"zs001","telephone":"01012345678","mobile":"13012345678","create_time":"2021-10-25T09:21:50.364327+08:00","last_update_time":"2021-11-22T13:46:20.430926+08:00"}}" @Router /api/v1/metadata/mysql-cluster/add-user [post]

func MySQLClusterDeleteUser added in v1.1.1

func MySQLClusterDeleteUser(c *gin.Context)

@Tags mysql cluster @Summary delete user map @Accept application/json @Param token body string true "token" @Param id body int true "mysql cluster id" @Param user_id body int true "user id" @Produce application/json @Success 200 {string} string "{"users":[{"id":1,"employee_id":"100001","email":"allinemailtest@163.com","role":3,"del_flag":0,"user_name":"zhangsan","department_name":"arch","account_name":"zs001","telephone":"01012345678","mobile":"13012345678","create_time":"2021-10-25T09:21:50.364327+08:00","last_update_time":"2021-11-22T13:46:20.430926+08:00"}]}" @Router /api/v1/metadata/mysql-cluster/delete-user [post]

func ResourceGroupAddMiddlewareCluster added in v1.1.1

func ResourceGroupAddMiddlewareCluster(c *gin.Context)

@Tags resource group @Summary add middleware cluster map @Accept application/json @Param token body string true "token" @Param id body int true "resource group id" @Param middleware_cluster_id body int true "middleware cluster id" @Produce application/json @Success 200 {string} string "{"middleware_clusters":[{"id":1,"cluster_name":"middleware-cluster-1","env_id":1,"del_flag":0,"create_time":"2021-11-09T18:06:57.917596+08:00","last_update_time":"2021-11-18T15:39:52.927116+08:00"}]}" @Router /api/v1/metadata/resource-group/add-middleware-cluster [post]

func ResourceGroupAddMySQLCluster added in v1.1.1

func ResourceGroupAddMySQLCluster(c *gin.Context)

@Tags resource group @Summary add mysql cluster map @Accept application/json @Param token body string true "token" @Param id body int true "resource group id" @Param mysql_cluster_id body int true "mysql cluster id" @Produce application/json @Success 200 {string} string "{"mysql_clusters":[{"middleware_cluster_id":1,"monitor_system_id":1,"env_id":1,"del_flag":0,"create_time":"2021-02-23T20:57:24.603009+08:00","last_update_time":"2021-02-23T20:57:24.603009+08:00","id":1,"cluster_name":"cluster_name_init"}]}" @Router /api/v1/metadata/resource-group/add-mysql-cluster [post]

func ResourceGroupAddResourceRole added in v1.1.1

func ResourceGroupAddResourceRole(c *gin.Context)

@Tags resource group @Summary add resource role map @Accept application/json @Param token body string true "token" @Param id body int true "resource group id" @Param resource_role_id body int true "resource role id" @Produce application/json @Success 200 {string} string "{"resource_roles":[{"id":2,"role_uuid":"c319e33a-eac3-11ec-8183-001c42d502a6","role_name":"das-admin","resource_group_id":1,"del_flag":0,"create_time":"2022-06-13T10:53:56.439107+08:00","last_update_time":"2022-06-13T17:27:09.037353+08:00"}]}" @Router /api/v1/metadata/resource-group/add-resource-role [post]

func ResourceGroupDeleteMiddlewareCluster added in v1.1.1

func ResourceGroupDeleteMiddlewareCluster(c *gin.Context)

@Tags resource group @Summary delete middleware cluster map @Accept application/json @Param token body string true "token" @Param id body int true "resource group id" @Param middleware_cluster_id body int true "middleware cluster id" @Produce application/json @Success 200 {string} string "{"middleware_clusters":[{"id":1,"cluster_name":"middleware-cluster-1","env_id":1,"del_flag":0,"create_time":"2021-11-09T18:06:57.917596+08:00","last_update_time":"2021-11-18T15:39:52.927116+08:00"}]}" @Router /api/v1/metadata/resource-group/delete-middleware-cluster [post]

func ResourceGroupDeleteMySQLCluster added in v1.1.1

func ResourceGroupDeleteMySQLCluster(c *gin.Context)

@Tags resource group @Summary delete mysql cluster map @Accept application/json @Param token body string true "token" @Param id body int true "resource group id" @Param mysql_cluster_id body int true "mysql cluster id" @Produce application/json @Success 200 {string} string "{"mysql_clusters":[{"middleware_cluster_id":1,"monitor_system_id":1,"env_id":1,"del_flag":0,"create_time":"2021-02-23T20:57:24.603009+08:00","last_update_time":"2021-02-23T20:57:24.603009+08:00","id":1,"cluster_name":"cluster_name_init"}]}" @Router /api/v1/metadata/resource-group/delete-mysql-cluster [post]

func ResourceGroupDeleteResourceRole added in v1.1.1

func ResourceGroupDeleteResourceRole(c *gin.Context)

@Tags resource group @Summary delete resource role map @Accept application/json @Param token body string true "token" @Param id body int true "resource group id" @Param resource_role_id body int true "resource role id" @Produce application/json @Success 200 {string} string "{"resource_roles":[{"id":2,"role_uuid":"c319e33a-eac3-11ec-8183-001c42d502a6","role_name":"das-admin","resource_group_id":1,"del_flag":0,"create_time":"2022-06-13T10:53:56.439107+08:00","last_update_time":"2022-06-13T17:27:09.037353+08:00"}]}" @Router /api/v1/metadata/resource-group/delete-resource-role [post]

func ResourceRoleAddResourceGroup added in v1.1.1

func ResourceRoleAddResourceGroup(c *gin.Context)

@Tags resource role @Summary add resourceGroup map @Accept application/json @Param token body string true "token" @Param id body int true "resource role id" @Param resourceGroup_id body int true "resourceGroup id" @Produce application/json @Success 200 {string} string "{"resourceGroups":[{"account_name":"test","email":"929059501@qq.com","telephone":"","mobile":"","role":3,"id":14,"department_name":"","employee_id":"","del_flag":0,"create_time":"2021-12-06T18:08:03.736262+08:00","last_update_time":"2021-12-06T18:08:03.736262+08:00","resourceGroup_name":"tester"}]}" @Router /api/v1/metadata/resource-role/add-resourceGroup [post]

func ResourceRoleAddUser added in v1.1.1

func ResourceRoleAddUser(c *gin.Context)

@Tags resource role @Summary add user map @Accept application/json @Param token body string true "token" @Param id body int true "resource role id" @Param user_id body int true "user id" @Produce application/json @Success 200 {string} string "{"users":[{"account_name":"test","email":"929059501@qq.com","telephone":"","mobile":"","role":3,"id":14,"department_name":"","employee_id":"","del_flag":0,"create_time":"2021-12-06T18:08:03.736262+08:00","last_update_time":"2021-12-06T18:08:03.736262+08:00","user_name":"tester"}]}" @Router /api/v1/metadata/resource-role/add-user [post]

func ResourceRoleDeleteResourceGroup added in v1.1.1

func ResourceRoleDeleteResourceGroup(c *gin.Context)

@Tags resource role @Summary delete resourceGroup map @Accept application/json @Param token body string true "token" @Param id body int true "resource role id" @Param resourceGroup_id body int true "resourceGroup id" @Produce application/json @Success 200 {string} string "{"resourceGroups":[]}" @Router /api/v1/metadata/resource-role/delete-resourceGroup [post]

func ResourceRoleDeleteUser added in v1.1.1

func ResourceRoleDeleteUser(c *gin.Context)

@Tags resource role @Summary delete user map @Accept application/json @Param token body string true "token" @Param id body int true "resource role id" @Param user_id body int true "user id" @Produce application/json @Success 200 {string} string "{"users":[]}" @Router /api/v1/metadata/resource-role/delete-user [post]

func UpdateAppByID

func UpdateAppByID(c *gin.Context)

@Tags application @Summary update application by id @Accept application/json @Param token body string true "token" @Param id body int true "app id" @Param app_name body string false "app name" @Param level body int false "app level" @Param del_flag body int false "delete flag" @Produce application/json @Success 200 {string} string "{"apps": [ {"id": 2,"app_name": "app2","level": 2,"del_flag": 0,"create_time": "2021-10-25T09:46:04.275796+08:00","last_update_time": "2021-12-21T09:15:47.688546+08:00"}]}" @Router /api/v1/metadata/app [post]

func UpdateDBByID

func UpdateDBByID(c *gin.Context)

@Tags database @Summary update database by id @Accept application/json @Param token body string true "token" @Param id body int true "db id" @Param db_name body string false "db name" @Param cluster_id body int false "cluster id" @Param cluster_type body int false "cluster type" @Param env_id body int false "env id" @Param del_flag body int false "delete flag" @Produce application/json @Success 200 {string} string "{"dbs": [{"id": 1, "db_name": "db1", "cluster_id": 1, "cluster_type": 1, "env_id": 1, "del_flag": 0, "create_time": "2021-01-22T09:59:21.379851+08:00", "last_update_time": "2021-01-22T09:59:21.379851+08:00"}]}" @Router /api/v1/metadata/db/update [post]

func UpdateEnvByID

func UpdateEnvByID(c *gin.Context)

@Tags environment @Summary update environment by id @Accept application/json @Param token body string true "token" @Param id body int true "env id" @Param env_name body string false "env name" @Param del_flag body int false "delete flag" @Produce application/json @Success 200 {string} string "{"envs": [{"id": 1, "env_name": "online", "del_flag": 0, "create_time": "2021-01-22T09:59:21.379851+08:00", "last_update_time": "2021-01-22T09:59:21.379851+08:00"}]}" @Router /api/v1/metadata/env/update [post]

func UpdateMiddlewareClusterByID

func UpdateMiddlewareClusterByID(c *gin.Context)

@Tags middleware cluster @Summary update middleware cluster by id @Accept application/json @Param token body string true "token" @Param id body int true "middleware cluster id" @Param cluster_name body string false "middleware cluster name" @Param env_id body int false "env id" @Param del_flag body int false "delete flag" @Produce application/json @Success 200 {string} string {"middleware_clusters":[{"last_update_time":"2021-11-18T15:39:52.927116+08:00","id":1,"cluster_name":"update_middleware_cluster","env_id":1,"del_flag":0,"create_time":"2021-11-09T18:06:57.917596+08:00"}]} @Router /api/v1/metadata/middleware-cluster/update [post]

func UpdateMiddlewareServerByID

func UpdateMiddlewareServerByID(c *gin.Context)

@Tags middleware server @Summary update middleware server by id @Accept application/json @Param token body string true "token" @Param id body string true "middleware server id" @Param cluster_id body int false "middleware cluster id" @Param server_name body string false "middleware server name" @Param middleware_role body int false "middleware role" @Param host_ip body string false "host ip" @Param port_num body int false "port number" @Param del_flag body int false "delete flag" @Produce application/json @Success 200 {string} string "{"middleware_servers":[{"del_flag":0,"server_name":"update_middleware_server","host_ip":"192.168.10.219","port_num":33061,"middleware_role":1,"create_time":"2021-11-17T14:47:10.521279+08:00","last_update_time":"2021-11-18T15:54:10.599097+08:00","id":1,"cluster_id":1}]}" @Router /api/v1/metadata/middleware-server/update [post]

func UpdateMonitorSystemByID

func UpdateMonitorSystemByID(c *gin.Context)

@Tags monitor system @Summary update monitor system by id @Accept application/json @Param token body string true "token" @Param id body int true "monitor system id" @Param system_name body string false "system name" @Param system_type body int false "system type" @Param host_ip body string false "host ip" @Param port_num body int false "port num" @Param port_num_slow body int false "port num slow" @Param base_url body string false "base url" @Param env_id body int false "env id" @Param del_flag body int false "delete flag" @Produce application/json @Success 200 {string} string "{"monitor_systems": [{"system_name":"update_monitor_system","host_ip":"192.168.10.219","port_num_slow":9000,"env_id":1,"id":1,"system_type":2,"port_num":3300,"base_url":"/prometheus","del_flag":0,"create_time":"2021-09-02T09:06:30.736111+08:00","last_update_time":"2021-11-18T16:16:18.702104+08:00"}]}" @Router /api/v1/metadata/monitor-system/update [post]

func UpdateMySQLClusterByID

func UpdateMySQLClusterByID(c *gin.Context)

@Tags mysql cluster @Summary update mysql cluster by id @Accept application/json @Param token body string true "token" @Param id body int true "mysql cluster id" @Param cluster_name body string false "mysql cluster name" @Param middleware_cluster_id body int false "middleware cluster id" @Param monitor_system_id body int false "monitor system id" @Param env_id body string false "env id" @Param del_flag body int false "delete flag" @Produce application/json @Success 200 {string} string "{"mysql_clusters":[{"middleware_cluster_id":0,"monitor_system_id":0,"last_update_time":"2022-03-01T08:30:43.428343+08:00","id":3,"cluster_name":"test","env_id":1,"del_flag":0,"create_time":"2022-03-01T08:30:43.428343+08:00"}]}" @Router /api/v1/metadata/mysql-cluster/update [post]

func UpdateMySQLServerByID

func UpdateMySQLServerByID(c *gin.Context)

@Tags mysql server @Summary update mysql server by id @Accept application/json @Param token body string true "token" @Param id body int true "mysql server id" @Param cluster_id body int false "mysql cluster id" @Param server_name body string false "mysql server name" @Param service_name body string false "mysql server service name" @Param host_ip body string false "mysql server host ip" @Param port_num body int false "mysql server port num" @Param deployment_type body int false "mysql deployment type" @Produce application/json @Success 200 {string} string "{"mysql_servers":[{"deployment_type":1,"version":"","id":26,"server_name":"test","service_name":"test","port_num":3306,"del_flag":0,"create_time":"2022-03-02T01:26:32.107625+08:00","last_update_time":"2022-03-02T01:26:32.107625+08:00","cluster_id":97,"host_ip":"192.168.1.1"}]}" @Router /api/v1/metadata/mysql-server/update [post]

func UpdateResourceGroupByID added in v1.1.1

func UpdateResourceGroupByID(c *gin.Context)

@Tags resource group @Summary update resource group by id @Accept application/json @Param token body string true "token" @Param id body int true "resource group id" @Param group_uuid body string false "resource group uuid" @Param group_name body string false "resource group name" @Param del_flag body int false "delete flag" @Produce application/json @Success 200 {string} string "{"resource_groups":[{"id":1,"group_uuid":"5c6c6d73-eac2-11ec-8183-001c42d502a6","group_name":"resource-group-01","del_flag":0,"create_time":"2022-06-13T10:42:15.082892+08:00","last_update_time":"2022-06-13T17:26:53.625206+08:00"}]}" @Router /api/v1/metadata/resource-group/update [post]

func UpdateResourceRoleByID added in v1.1.1

func UpdateResourceRoleByID(c *gin.Context)

@Tags resource role @Summary update resource role by id @Accept application/json @Param token body string true "token" @Param id body int true "resource role id" @Param role_name body string false "resource role name" @Param role_uuid body int false "resource role uuid" @Param resource_group_id body int false "resource group id" @Param del_flag body int false "delete flag" @Produce application/json @Success 200 {string} string "{"resource_roles":[{"resource_group_id":1,"del_flag":0,"create_time":"2022-06-13T01:08:21.739904+08:00","last_update_time":"2022-06-13T01:08:21.739904+08:00","id":2,"role_uuid":"update_test_role_id","role_name":"update_test_role"}]}}" @Router /api/v1/metadata/resource-role/update [post]

func UpdateUserByID

func UpdateUserByID(c *gin.Context)

@Tags user @Summary update user by id @Accept application/json @Param token body string true "token" @Param id body int true "user id" @Param user_name body string true "user name" @Param department_name body string true "department name" @Param employee_id body string true "employee id" @Param telephone body string true "user telephone" @Param role body int true "user role" @Param account_name body string true "account name" @Param email body string true "email" @Param mobile body string true "mobile" @Param del_flag body int false "delete flag" @Produce application/json @Success 200 {string} string "{"users": [{"id": 18,"employee_id": "21213434","account_name": "kf-Tom","mobile": "18088888888","role": 2,"user_name": "Tom","department_name": "kf","email": "test@test.com.cn","telephone": "02188888888","del_flag": 0,"create_time": "2022-03-07T15:56:32.277857+08:00","last_update_time": "2022-03-07T15:56:32.277857+08:00"}]}" @Router /api/v1/metadata/user/update [post]

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL