metadao

package
v0.0.0-...-63ace11 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SQL_COUNT_SERVICE_LIST             = "SELECT count(1) COUNT FROM t_meta_service WHERE 1=1 %s"
	SQL_SEL_SERVICE_LIST               = "" /* 147-byte string literal not displayed */
	SQL_COUNT_SERV_TYPE_VER_LIST       = "SELECT count(1) COUNT FROM t_meta_cmpt_versions WHERE 1=1 %s"
	SQL_SEL_SERV_TYPE_VER_LIST         = "SELECT SERV_TYPE, VERSION FROM t_meta_cmpt_versions WHERE 1=1 %s ORDER BY SERV_TYPE, VERSION limit ?, ?"
	SQL_ADD_SERVICE                    = "" /* 182-byte string literal not displayed */
	SQL_DEL_TOPOLOGY                   = "DELETE FROM t_meta_topology WHERE (INST_ID1 = ? AND INST_ID2 = ?) OR (INST_ID2 = ? and TOPO_TYPE = 2)"
	SQL_DEL_INSTANCE_ATTR              = "DELETE FROM t_meta_instance_attr WHERE INST_ID = ?"
	SQL_DEL_INSTANCE                   = "DELETE FROM t_meta_instance WHERE INST_ID = ?"
	SQL_DEL_SERVICE                    = "DELETE FROM t_meta_service WHERE inst_id = ?"
	SQL_MOD_SERVICE                    = "UPDATE t_meta_service SET SERV_NAME = ?, VERSION = ?, IS_PRODUCT = ? WHERE INST_ID = ?"
	SQL_MOD_SERVICE_VERSION            = "UPDATE t_meta_service SET VERSION = ? WHERE INST_ID = ?"
	SQL_COUNT_SERVER_LIST              = "SELECT count(1) COUNT FROM t_meta_server WHERE 1=1 %s"
	SQL_SEL_SERVER_LIST                = "SELECT SERVER_IP, SERVER_NAME FROM t_meta_server WHERE 1=1 %s order by SERVER_IP limit ?, ?"
	SQL_ADD_SERVER                     = "INSERT INTO t_meta_server(SERVER_IP, SERVER_NAME, CREATE_TIME) VALUES(?,?,?)"
	SQL_DEL_SERVER                     = "DELETE FROM t_meta_server WHERE SERVER_IP=?"
	SQL_SSH_CNT_BY_IP                  = "SELECT count(1) COUNT FROM t_meta_ssh WHERE SERVER_IP=? "
	SQL_SSH_LIST_BY_IP                 = "SELECT SSH_NAME, SERV_CLAZZ, SSH_ID, SERVER_IP, SSH_PORT FROM t_meta_ssh WHERE SERVER_IP=? order by SSH_NAME limit ?, ?"
	SQL_ADD_SSH                        = "INSERT INTO t_meta_ssh(SSH_NAME,SSH_PWD,SSH_PORT,SERV_CLAZZ,SERVER_IP,SSH_ID) VALUES(?,?,?,?,?,?)"
	SQL_MOD_SSH                        = "UPDATE t_meta_ssh SET SSH_NAME=?, SSH_PWD=?, SSH_PORT=? WHERE SSH_ID=?"
	SQL_DEL_SSH                        = "DELETE FROM t_meta_ssh WHERE SSH_ID=?"
	SQL_UPDATE_POS                     = "UPDATE t_meta_instance SET POS_X=?,POS_Y=?, WIDTH=?, HEIGHT=?,ROW_=?,COL_=? WHERE INST_ID = ?"
	SQL_INS_INSTANCE                   = "INSERT INTO t_meta_instance(INST_ID,CMPT_ID,IS_DEPLOYED,POS_X,POS_Y,WIDTH,HEIGHT,ROW_,COL_) VALUES(?,?,?,?,?,?,?,?,?)"
	SQL_INS_INSTANCE_ATTR              = "INSERT INTO t_meta_instance_attr(INST_ID,ATTR_ID,ATTR_NAME,ATTR_VALUE) VALUES(?,?,?,?)"
	SQL_INS_TOPOLOGY                   = "INSERT INTO t_meta_topology(INST_ID1,INST_ID2,TOPO_TYPE) VALUES(?,?,?)"
	SQL_UPD_TOPOLOGY                   = "update t_meta_topology set INST_ID2 = ? where INST_ID1 = ?"
	SQL_DEL_ALL_SUB_TOPOLOGY           = "DELETE FROM t_meta_topology WHERE (INST_ID1 = ? AND TOPO_TYPE = 1) OR (INST_ID1 = ? and TOPO_TYPE = 2)"
	SQL_MOD_ATTR                       = "UPDATE t_meta_instance_attr SET ATTR_VALUE = ? WHERE INST_ID = ? AND ATTR_ID = ?"
	SQL_INS_CMPT_VER                   = "INSERT INTO t_meta_cmpt_versions(SERV_TYPE,VERSION) VALUES(?,?)"
	SQL_DEL_CMPT_VER                   = "DELETE FROM t_meta_cmpt_versions WHERE SERV_TYPE=? AND VERSION=?"
	SQL_UPD_INST_DEPLOY                = "UPDATE t_meta_instance SET IS_DEPLOYED = ? WHERE INST_ID = ?"
	SQL_UPD_SERV_DEPLOY                = "UPDATE t_meta_service SET IS_DEPLOYED = ? WHERE INST_ID = ?"
	SQL_MOD_SERVICE_PSEUDO_DEPLOY_FLAG = "UPDATE t_meta_service SET PSEUDO_DEPLOY_FLAG = ? WHERE INST_ID = ?"
	SQL_UPD_INSTANCE_PRE_EMBADDED      = "UPDATE t_meta_instance_attr SET ATTR_VALUE= ?  WHERE INST_ID = ? AND ATTR_ID = 320" // 320 -> 'PRE_EMBEDDED'

	// SQL_NEXT_SEQ_LOCK                  = "select current_value as CURR_VALUE from t_meta_sequence where seq_name = ? for update"
	SQL_NEXT_SEQ_LOCK   = "select current_value as CURR_VALUE from t_meta_sequence where seq_name = ? "
	SQL_NEXT_SEQ_UPDATE = "update t_meta_sequence set current_value = current_value + %d where seq_name = ?"
	SQL_INS_ALARM       = "INSERT INTO t_meta_alarm(ALARM_ID,SERV_INST_ID,SERV_TYPE,INST_ID,CMPT_NAME,ALARM_TYPE,ALARM_TIME) VALUES(?,?,?,?,?,?,?)"

	SQL_UPD_ALARM_STATE_BY_ALARMID = "update t_meta_alarm set DEAL_TIME = ?, DEAL_ACC_NAME = ?, IS_DEALED = ? where ALARM_ID = ?"
	SQL_UPD_ALARM_STATE_BY_INSTID  = "" /* 129-byte string literal not displayed */
)

Functions

func AddCmptVersion

func AddCmptVersion(param *proto.CmptVersionParam, magicKey string, resultBean *result.ResultBean)

func AddServer

func AddServer(param *proto.AddServerParam, magicKey string, resultBean *result.ResultBean)

func AddService

func AddService(param *proto.AddServiceParam, instId string, magicKey string, resultBean *result.ResultBean)

func AddSsh

func AddSsh(param *proto.AddSSHParam, magicKey string, resultBean *result.ResultBean)

func AdjustSmsABQueueWeightInfo

func AdjustSmsABQueueWeightInfo(param *proto.AdjustSmsABQueueParam, magicKey string, resultBean *result.ResultBean)

func DelCmptVersion

func DelCmptVersion(param *proto.CmptVersionParam, magicKey string, resultBean *result.ResultBean)

func DelInstance

func DelInstance(parentId string, instId string, resultBean *result.ResultBean, events *[]*proto.PaasEvent, magicKey string) bool

func DelSSH

func DelSSH(param *proto.DelSSHParam, magicKey string, resultBean *result.ResultBean)

func DelServer

func DelServer(servIp string, magicKey string, resultBean *result.ResultBean)

func DelService

func DelService(instId string, magicKey string, resultBean *result.ResultBean)

func DelServiceNode

func DelServiceNode(parentId string, instId string, resultBean *result.ResultBean, magicKey string)

func GetClickHouseDashboardAddr

func GetClickHouseDashboardAddr(param *proto.ServInstParam, resultBean *result.ResultBean)

func GetMetaDataNodeByInstId

func GetMetaDataNodeByInstId(instId string, resultBean *result.ResultBean)

func GetMetaDataTreeByInstId

func GetMetaDataTreeByInstId(instId string, resultBean *result.ResultBean)

func GetNextSeqMargin

func GetNextSeqMargin(seqName string, step uint) (*proto.LongMargin, error)

func GetPulsarDashboardAddr

func GetPulsarDashboardAddr(param *proto.ServInstParam, resultBean *result.ResultBean)

func GetRocketMQDashboardAddr

func GetRocketMQDashboardAddr(param *proto.ServInstParam, resultBean *result.ResultBean)

func GetServTypeVerCount

func GetServTypeVerCount(getServTypeVerCountParam *proto.GetServTypeVerCountParam, resultBean *result.ResultBean)

func GetServTypeVerListByPage

func GetServTypeVerListByPage(param *proto.GetServTypeVerListByPageParam, resultBean *result.ResultBean)

func GetServerCnt

func GetServerCnt(param *proto.GetServerCountParam, resultBean *result.ResultBean)

func GetServerList

func GetServerList(param *proto.GetServerListParam, resultBean *result.ResultBean)

func GetServiceCount

func GetServiceCount(getServiceCountParam *proto.GetServiceCountParam, resultBean *result.ResultBean)

func GetServiceList

func GetServiceList(getServiceListParam *proto.GetServiceListParam, resultBean *result.ResultBean)

func GetSmsABQueueWeightInfo

func GetSmsABQueueWeightInfo(servInstId string, resultBean *result.ResultBean)

func GetSshCntByIp

func GetSshCntByIp(servIp string, resultBean *result.ResultBean)

func GetSshListByIp

func GetSshListByIp(param *proto.GetSSHListByIPParam, resultBean *result.ResultBean)

func GetTiDBDashboardAddr

func GetTiDBDashboardAddr(param *proto.ServInstParam, resultBean *result.ResultBean)

func GetVoltDBDashboardAddr

func GetVoltDBDashboardAddr(param *proto.ServInstParam, resultBean *result.ResultBean)

func GetYBDashboardAddr

func GetYBDashboardAddr(param *proto.ServInstParam, resultBean *result.ResultBean)

func InsertAlarm

func InsertAlarm(alarmId int64, servInstId, servType, instId, cmptName string, alarmType int, alarmTime int64) bool

func LoadInstanceMeta

func LoadInstanceMeta(instId string, resultBean *result.ResultBean) bool

func LoadServiceTopo

func LoadServiceTopo(instId string, resultBean *result.ResultBean) bool

func ModInstanceAttr

func ModInstanceAttr(instId string, attrId int, attrName, attrVal, logKey, magicKey string, paasResult *result.ResultBean) bool

func ModSSH

func ModSSH(param *proto.ModSSHParam, magicKey string, resultBean *result.ResultBean)

func ModService

func ModService(param *proto.ModServiceParam, magicKey string, resultBean *result.ResultBean)

func ModServicePseudoFlag

func ModServicePseudoFlag(servInstID, pseudoFlag, logKey, magicKey string, paasResult *result.ResultBean) bool

func ModServiceVersion

func ModServiceVersion(param *proto.ModServiceVersionParam, magicKey string, resultBean *result.ResultBean)

func ReloadMetaData

func ReloadMetaData(reloadType string, magicKey string, resultBean *result.ResultBean)

func SaveServTopoSkeleton

func SaveServTopoSkeleton(servType string, topoMap map[string]interface{}, magicKey string, resultBean *result.ResultBean)

func SaveServiceNode

func SaveServiceNode(parentId string, opType int, nodeJson map[string]interface{}, resultBean *result.ResultBean, magicKey string)

func SwitchSmsDBType

func SwitchSmsDBType(param *proto.SwitchSmsDBTypeParam, magicKey string, resultBean *result.ResultBean)

func UpdateAlarmStateByAlarmId

func UpdateAlarmStateByAlarmId(alarmId int64, dealTime int64, dealUser, dealFlag string, paasResult *result.ResultBean) bool

func UpdateInstanceDeployFlag

func UpdateInstanceDeployFlag(instId, deployFlag, logKey, magicKey string, paasResult *result.ResultBean) bool

func UpdateInstancePreEmbadded

func UpdateInstancePreEmbadded(instId, preEmbadded, logKey, magicKey string, paasResult *result.ResultBean) bool

func UpdateServiceDeployFlag

func UpdateServiceDeployFlag(instId, deployFlag, logKey, magicKey string, paasResult *result.ResultBean) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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