Documentation ¶
Index ¶
- func AddAppSystem(c *gin.Context)
- func AddDB(c *gin.Context)
- func AddEnv(c *gin.Context)
- func AddMiddlewareCluster(c *gin.Context)
- func AddMiddlewareServer(c *gin.Context)
- func AddMonitorSystem(c *gin.Context)
- func AddMySQLCluster(c *gin.Context)
- func AddMySQLServer(c *gin.Context)
- func AddUser(c *gin.Context)
- func GetAppSystem(c *gin.Context)
- func GetAppSystemByID(c *gin.Context)
- func GetDB(c *gin.Context)
- func GetDBByID(c *gin.Context)
- func GetEnv(c *gin.Context)
- func GetEnvByID(c *gin.Context)
- func GetMiddlewareCluster(c *gin.Context)
- func GetMiddlewareClusterByID(c *gin.Context)
- func GetMiddlewareServer(c *gin.Context)
- func GetMiddlewareServerByID(c *gin.Context)
- func GetMonitorSystem(c *gin.Context)
- func GetMonitorSystemByID(c *gin.Context)
- func GetMySQLCluster(c *gin.Context)
- func GetMySQLClusterByID(c *gin.Context)
- func GetMySQLServer(c *gin.Context)
- func GetMySQLServerByID(c *gin.Context)
- func GetUser(c *gin.Context)
- func GetUserByID(c *gin.Context)
- func UpdateAppSystemByID(c *gin.Context)
- func UpdateDBByID(c *gin.Context)
- func UpdateEnvByID(c *gin.Context)
- func UpdateMiddlewareClusterByID(c *gin.Context)
- func UpdateMiddlewareServerByID(c *gin.Context)
- func UpdateMonitorSystemByID(c *gin.Context)
- func UpdateMySQLClusterByID(c *gin.Context)
- func UpdateMySQLServerByID(c *gin.Context)
- func UpdateUserByID(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddAppSystem ¶
@Tags application system @Summary add a new application system @Produce application/json @Success 200 {string} string "{"code": 200, "data": [{"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_id": 8,"owner_group": "k"}]}" @Router /api/v1/metadata/app-system [post]
func AddDB ¶
@Tags database @Summary add a new database @Produce application/json @Success 200 {string} string "{"code": 200, "data": [{"id": 1, "db_name": "db1", "cluster_id": 1, "cluster_type": 1, "owner_id": 1, "owner_group": "2,3,4", "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 ¶
@Tags environment @Summary add a new environment @Accept application/json @Produce application/json @Param env_name body string true "environment name" @Success 200 {string} string "{"code": 200, "data": [{"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 ¶
@Tags middleware cluster @Summary add a new middleware cluster @Produce application/json @Success 200 {string} string "{"code": 200, "data": [{"id":31,"cluster_name":"connection_test","env_id":1,"del_flag":0,"create_time":"2021-02-23T09:21:40.017914+08:00","last_update_time":"2021-02-23T09:21:40.017914+08:00"}]}" @Router /api/v1/metadata/middleware-cluster [post]
func AddMiddlewareServer ¶
@Tags middleware server @Summary add a new middleware server @Produce application/json @Success 200 {string} string "{"code": 200, "data": [{"id":30,"cluster_id_middleware":3,"middleware_role":1,"port_num":12,"last_update_time":"2021-02-23T09:25:38.656337+08:00","server_name":"connection_test","host_ip":"123.123.123.1","del_flag":0,"create_time":"2021-02-23T09:25:38.656337+08:00"}]}" @Router /api/v1/metadata/middleware-server [post]
func AddMonitorSystem ¶
@Tags monitor system @Summary add a new monitor system @Produce application/json @Success 200 {string} string "{"code": 200, "data": [{"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/", "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 [post]
func AddMySQLCluster ¶
@Tags mysql cluster @Summary add a new mysql cluster @Produce application/json @Success 200 {string} string "{"code": 200, "data": [{"cluster_name":"api_test","monitor_system_id":0,"owner_group":"","del_flag":0,"create_time":"2021-02-24T02:33:50.936279+08:00","last_update_time":"2021-02-24T02:33:50.936279+08:00","middleware_cluster_id":0,"owner_id":0,"env_id":0,"id":154}]}" @Router /api/v1/metadata/mysql-cluster [post]
func AddMySQLServer ¶
@Tags mysql server @Summary add a new mysql server @Produce application/json @Success 200 {string} string "{"code": 200, "data": [{"create_time":"2021-02-24T02:47:19.589172+08:00","del_flag":0,"last_update_time":"2021-02-24T02:47:19.589172+08:00","id":93,"cluster_id":0,"host_ip":"192.168.1.1","port_num":3306,"deployment_type":0,"version":""}]}" @Router /api/v1/metadata/mysql-server [post]
func AddUser ¶
@Tags user @Summary add a new user @Produce application/json @Success 200 {string} string "{"code": 200, "data": [{"department_name": "dn","domain_account": "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/user [post]
func GetAppSystem ¶
@Tags application system @Summary get all application systems @Produce application/json @Success 200 {string} string "{"code": 200, "data": [{"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_id": 8,"owner_group": "k"}]}" @Router /api/v1/metadata/app-system [get]
func GetAppSystemByID ¶
@Tags application system @Summary get application system by id @Produce application/json @Success 200 {string} string "{"code": 200, "data": [{// @Success 200 {string} string "{"code": 200, "data": [{"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_id": 8,"owner_group": "k"}]}" @Router /api/v1/metadata/app-system/:id [get]
func GetDB ¶
@Tags database @Summary get all databases @Produce application/json @Success 200 {string} string "{"code": 200, "data": [{"id": 1, "db_name": "db1", "cluster_id": 1, "cluster_type": 1, "owner_id": 1, "owner_group": "2,3,4", "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 [get]
func GetDBByID ¶
@Tags database @Summary get database by id @Produce application/json @Success 200 {string} string "{"code": 200, "data": [{"id": 1, "db_name": "db1", "cluster_id": 1, "cluster_type": 1, "owner_id": 1, "owner_group": "2,3,4", "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 [get]
func GetEnv ¶
@Tags environment @Summary get all environments @Accept application/json @Produce application/json @Success 200 {string} string "{"code": 200, "data": [{"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 [get]
func GetEnvByID ¶
@Tags environment @Summary get environment by id @Accept application/json @Produce application/json @Param id path int true "environment id" @Success 200 {string} string "{"code": 200, "data": [{"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 [get]
func GetMiddlewareCluster ¶
@Tags middleware cluster @Summary get all middleware clusters @Produce application/json @Success 200 {string} string "{"code": 200, "data": [{"id":1,"cluster_name":"online","env_id":1,"del_flag":0,"create_time":"2021-02-20T09:25:48.192194+08:00","last_update_time":"2021-02-20T09:25:48.192194+08:00"},{"cluster_name":"newTest","env_id":8,"del_flag":0,"create_time":"2021-02-20T09:18:27.459081+08:00","last_update_time":"2021-02-20T09:18:27.4636+08:00","id":12},{"last_update_time":"2021-02-22T17:09:10.588805+08:00","id":30,"cluster_name":"connection_test","env_id":1,"del_flag":0,"create_time":"2021-02-22T17:09:10.588805+08:00"}]}" @Router /api/v1/metadata/middleware-cluster [get]
func GetMiddlewareClusterByID ¶
@Tags middleware cluster @Summary get middleware cluster by id @Produce application/json @Success 200 {string} string "{"code": 200, "data": [{"create_time":"2021-02-20T09:25:48.192194+08:00","last_update_time":"2021-02-20T09:25:48.192194+08:00","id":1,"cluster_name":"online","env_id":1,"del_flag":0}]}" @Router /api/v1/metadata/middleware-cluster/:id [get]
func GetMiddlewareServer ¶
@Tags middleware server @Summary get all middleware servers @Produce application/json @Success 200 {string} string "{"code": 200, "data": [{"server_name":"online","del_flag":0,"create_time":"2021-02-20T10:13:41.307685+08:00","port_num":1,"last_update_time":"2021-02-20T10:13:41.307685+08:00","id":1,"cluster_id_middleware":1,"middleware_role":1,"host_ip":"xxxx"},{"last_update_time":"2021-02-22T17:35:09.280743+08:00","id":25,"cluster_id_middleware":2,"middleware_role":2,"host_ip":"123.1.1.1","server_name":"ccc","port_num":2,"del_flag":0,"create_time":"2021-02-22T15:24:40.537777+08:00"},{"id":26,"middleware_role":1,"host_ip":"123.123.123.1","port_num":12,"cluster_id_middleware":3,"server_name":"connection_test","del_flag":0,"create_time":"2021-02-22T17:33:19.202738+08:00","last_update_time":"2021-02-22T17:33:19.202738+08:00"}]}" @Router /api/v1/metadata/middleware-server [get]
func GetMiddlewareServerByID ¶
@Tags middleware server @Summary get middleware server by id @Produce application/json @Success 200 {string} string "{"code": 200, "data": [{"id":1,"port_num":1,"del_flag":0,"create_time":"2021-02-20T10:13:41.307685+08:00","last_update_time":"2021-02-20T10:13:41.307685+08:00","cluster_id_middleware":1,"server_name":"online","middleware_role":1,"host_ip":"xxxx"}]}" @Router /api/v1/metadata/middleware-server/:id [get]
func GetMonitorSystem ¶
@Tags monitor system @Summary get all monitor systems @Produce application/json @Success 200 {string} string "{"code": 200, "data": [{"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/", "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 [get]
func GetMonitorSystemByID ¶
@Tags monitor system @Summary get monitor system by id @Produce application/json @Success 200 {string} string "{"code": 200, "data": [{"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/", "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 [get]
func GetMySQLCluster ¶
@Tags mysql cluster @Summary get all mysql clusters @Produce application/json @Success 200 {string} string "{"code": 200, "data": [{"middleware_cluster_id":1,"monitor_system_id":1,"env_id":1,"owner_group":"2,3","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","owner_id":1},{"monitor_system_id":1,"owner_id":1,"owner_group":"2,3","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/mysql-cluster [get]
func GetMySQLClusterByID ¶
@Tags mysql cluster @Summary get mysql cluster by id @Produce application/json @Success 200 {string} string "{"code": 200, "data": [{"owner_id":1,"owner_group":"2,3","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 [get]
func GetMySQLServer ¶
@Tags mysql server @Summary get all mysql servers @Produce application/json @Success 200 {string} string "{"code": 200, "data": [{"cluster_id":1,"deployment_type":1,"host_ip":"host_ip_init","port_num":3306,"version":"1.1.1","del_flag":0,"create_time":"2021-02-23T23:43:37.236228+08:00","last_update_time":"2021-02-23T23:43:37.236228+08:00","id":1}]}" @Router /api/v1/metadata/mysql-server [get]
func GetMySQLServerByID ¶
@Tags mysql server @Summary get mysql server by id @Produce application/json @Success 200 {string} string "{"code": 200, "data": [{"port_num":3306,"del_flag":0,"version":"1.1.1","create_time":"2021-02-23T23:43:37.236228+08:00","last_update_time":"2021-02-23T23:43:37.236228+08:00","id":1,"cluster_id":1,"host_ip":"host_ip_init","deployment_type":1}]}" @Router /api/v1/metadata/mysql-server/:id [get]
func GetUserByID ¶
@Tags user @Summary get user by id @Produce application/json @Success 200 {string} string "{"code": 200, "data": [{"department_name": "dn","domain_account": "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/user/:id [get]
func UpdateAppSystemByID ¶
@Tags application system @Summary update application system by id @Produce application/json @Success 200 {string} string "{"code": 200, "data": [{"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_id": 8,"owner_group": "k"}]}" @Router /api/v1/metadata/app-system/:id [post]
func UpdateDBByID ¶
@Tags database @Summary update database by id @Produce application/json @Success 200 {string} string "{"code": 200, "data": [{"id": 1, "db_name": "db1", "cluster_id": 1, "cluster_type": 1, "owner_id": 1, "owner_group": "2,3,4", "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 UpdateEnvByID ¶
@Tags environment @Summary update environment by id @Accept application/json @Produce application/json @Param id path int true "environment id" @Success 200 {string} string "{"code": 200, "data": [{"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 UpdateMiddlewareClusterByID ¶
@Tags middleware cluster @Summary update middleware cluster by id @Produce application/json @Success 200 {string} string "{"code": 200, "data": [{"cluster_name":"ccc","env_id":1,"del_flag":1,"create_time":"2021-02-22T15:23:21.279984+08:00","last_update_time":"2021-02-23T09:22:44.068998+08:00","id":29}]}" @Router /api/v1/metadata/middleware-cluster/:id [post]
func UpdateMiddlewareServerByID ¶
@Tags middleware server @Summary update middleware server by id @Produce application/json @Success 200 {string} string "{"code": 200, "data": [{"del_flag":1,"server_name":"ccc","id":30,"cluster_id_middleware":3,"middleware_role":1,"host_ip":"123.123.123.1","port_num":12,"create_time":"2021-02-23T09:25:38.656337+08:00","last_update_time":"2021-02-23T09:25:38.656337+08:00"}]}" @Router /api/v1/metadata/middleware-server/:id [post]
func UpdateMonitorSystemByID ¶
@Tags monitor system @Summary update monitor system by id @Produce application/json @Success 200 {string} string "{"code": 200, "data": [{"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/", "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 UpdateMySQLClusterByID ¶
@Tags mysql cluster @Summary update mysql cluster by id @Produce application/json @Success 200 {string} string "{"code": 200, "data": [{"id":154,"middleware_cluster_id":0,"owner_id":0,"env_id":0,"create_time":"2021-02-24T02:33:50.936279+08:00","cluster_name":"api_test","monitor_system_id":0,"owner_group":"","del_flag":1,"last_update_time":"2021-02-24T02:33:50.936279+08:00"}]}" @Router /api/v1/metadata/mysql-cluster/:id [post]
func UpdateMySQLServerByID ¶
@Tags mysql server @Summary update mysql server by id @Produce application/json @Success 200 {string} string "{"code": 200, "data": [{"last_update_time":"2021-02-24T02:47:19.589172+08:00","id":93,"cluster_id":0,"host_ip":"192.168.1.1","version":"","del_flag":1,"create_time":"2021-02-24T02:47:19.589172+08:00","port_num":3306,"deployment_type":0}]}" @Router /api/v1/metadata/mysql-server/:id [post]
func UpdateUserByID ¶
@Tags user @Summary update user by id @Produce application/json @Success 200 {string} string "{"code": 200, "data": [{"department_name": "dn","domain_account": "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/user/:id [post]
Types ¶
This section is empty.