metadata

package
v0.0.0-...-ddd43b2 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAppSystem

func AddAppSystem(c *gin.Context)

@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

func AddDB(c *gin.Context)

@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

func AddEnv(c *gin.Context)

@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

func AddMiddlewareCluster(c *gin.Context)

@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

func AddMiddlewareServer(c *gin.Context)

@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

func AddMonitorSystem(c *gin.Context)

@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

func AddMySQLCluster(c *gin.Context)

@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

func AddMySQLServer(c *gin.Context)

@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

func AddUser(c *gin.Context)

@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

func GetAppSystem(c *gin.Context)

@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

func GetAppSystemByID(c *gin.Context)

@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

func GetDB(c *gin.Context)

@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

func GetDBByID(c *gin.Context)

@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

func GetEnv(c *gin.Context)

@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

func GetEnvByID(c *gin.Context)

@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

func GetMiddlewareCluster(c *gin.Context)

@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

func GetMiddlewareClusterByID(c *gin.Context)

@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

func GetMiddlewareServer(c *gin.Context)

@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

func GetMiddlewareServerByID(c *gin.Context)

@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

func GetMonitorSystem(c *gin.Context)

@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

func GetMonitorSystemByID(c *gin.Context)

@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

func GetMySQLCluster(c *gin.Context)

@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

func GetMySQLClusterByID(c *gin.Context)

@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

func GetMySQLServer(c *gin.Context)

@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

func GetMySQLServerByID(c *gin.Context)

@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 GetUser

func GetUser(c *gin.Context)

func GetUserByID

func GetUserByID(c *gin.Context)

@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

func UpdateAppSystemByID(c *gin.Context)

@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

func UpdateDBByID(c *gin.Context)

@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

func UpdateEnvByID(c *gin.Context)

@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

func UpdateMiddlewareClusterByID(c *gin.Context)

@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

func UpdateMiddlewareServerByID(c *gin.Context)

@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

func UpdateMonitorSystemByID(c *gin.Context)

@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

func UpdateMySQLClusterByID(c *gin.Context)

@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

func UpdateMySQLServerByID(c *gin.Context)

@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

func UpdateUserByID(c *gin.Context)

@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.

Jump to

Keyboard shortcuts

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