meta

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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SQL_SEL_ACCOUNT        = "select ACC_ID,ACC_NAME,PHONE_NUM,MAIL,PASSWD,CREATE_TIME from t_account"
	SQL_SEL_META_ATTR      = "SELECT ATTR_ID,ATTR_NAME,ATTR_NAME_CN,AUTO_GEN FROM t_meta_attr ORDER BY ATTR_ID"
	SQL_SEL_META_CMPT      = "" /* 134-byte string literal not displayed */
	SQL_SEL_META_INST      = "SELECT INST_ID,CMPT_ID,IS_DEPLOYED,POS_X,POS_Y,WIDTH,HEIGHT,ROW_,COL_ FROM t_meta_instance"
	SQL_SEL_META_CMPT_ATTR = "SELECT CMPT_ID,ATTR_ID FROM t_meta_cmpt_attr ORDER BY CMPT_ID,ATTR_ID"
	SQL_SEL_META_INST_ATTR = "SELECT INST_ID,ATTR_ID,ATTR_NAME,ATTR_VALUE FROM t_meta_instance_attr"
	SQL_SEL_META_SERVICE   = "" /* 141-byte string literal not displayed */
	SQL_SEL_META_TOPO      = "SELECT INST_ID1,INST_ID2,TOPO_TYPE FROM t_meta_topology"
	SQL_SEL_META_DEP_HOST  = "SELECT HOST_ID,IP_ADDRESS,USER_NAME,USER_PWD,SSH_PORT,CREATE_TIME FROM t_meta_deploy_host"
	SQL_SEL_META_DEP_FILE  = "SELECT FILE_ID,HOST_ID,SERV_TYPE,VERSION,FILE_NAME,FILE_DIR,CREATE_TIME FROM t_meta_deploy_file"
	SQL_SEL_META_SERVER    = "SELECT SERVER_IP,SERVER_NAME FROM t_meta_server"
	SQL_SEL_META_SSH       = "SELECT SSH_ID,SSH_NAME,SSH_PWD,SSH_PORT,SERV_CLAZZ,SERVER_IP FROM t_meta_ssh"
	SQL_SEL_META_CMPT_VER  = "SELECT SERV_TYPE, VERSION from t_meta_cmpt_versions order by SERV_TYPE, VERSION"
	SQL_SEL_SERVICE_BY_ID  = "" /* 159-byte string literal not displayed */
)

Functions

func GetServiceById

func GetServiceById(instID string) (*proto.PaasService, error)

func InitGlobalCmptMeta

func InitGlobalCmptMeta()

func LoadAccount

func LoadAccount() ([]*proto.Account, error)

func LoadDeployFile

func LoadDeployFile() ([]*proto.PaasDeployFile, error)

func LoadDeployHost

func LoadDeployHost() ([]*proto.PaasDeployHost, error)

func LoadMetaAttr

func LoadMetaAttr() ([]*proto.PaasMetaAttr, error)

func LoadMetaCmpt

func LoadMetaCmpt() ([]*proto.PaasMetaCmpt, error)

func LoadMetaCmptAttr

func LoadMetaCmptAttr() ([]*proto.PaasCmptAttr, error)

func LoadMetaCmptVersion

func LoadMetaCmptVersion() ([]*proto.PaasCmptVer, error)

func LoadMetaInst

func LoadMetaInst() ([]*proto.PaasInstance, error)

func LoadMetaInstAttr

func LoadMetaInstAttr() ([]*proto.PaasInstAttr, error)

func LoadMetaServer

func LoadMetaServer() ([]*proto.PaasServer, error)

func LoadMetaService

func LoadMetaService() ([]*proto.PaasService, error)

func LoadMetaSsh

func LoadMetaSsh() ([]*proto.PaasSsh, error)

func LoadMetaTopo

func LoadMetaTopo() ([]*proto.PaasTopology, error)

Types

type CmptMeta

type CmptMeta struct {
	// contains filtered or unexported fields
}
var (
	CMPT_META *CmptMeta = nil
)

func (*CmptMeta) AddAccSession

func (m *CmptMeta) AddAccSession(accSession *proto.AccountSession, isLocalOnly bool)

func (*CmptMeta) AddCmptVersion

func (m *CmptMeta) AddCmptVersion(servType, version string)

func (*CmptMeta) AddInstAttr

func (m *CmptMeta) AddInstAttr(instAttr *proto.PaasInstAttr)

func (*CmptMeta) AddInstance

func (m *CmptMeta) AddInstance(instance *proto.PaasInstance)

func (*CmptMeta) AddServer

func (m *CmptMeta) AddServer(server *proto.PaasServer)

func (*CmptMeta) AddService

func (m *CmptMeta) AddService(service *proto.PaasService)

func (*CmptMeta) AddSsh

func (m *CmptMeta) AddSsh(ssh *proto.PaasSsh)

func (*CmptMeta) AddTopo

func (m *CmptMeta) AddTopo(topo *proto.PaasTopology)

func (*CmptMeta) AdjustSmsABQueueWeightInfo

func (m *CmptMeta) AdjustSmsABQueueWeightInfo(instAId, weightA, instBId, weightB string)

func (*CmptMeta) DelAllSubTopo

func (m *CmptMeta) DelAllSubTopo(parentId string)

func (*CmptMeta) DelCmptVersion

func (m *CmptMeta) DelCmptVersion(servType, version string)

func (*CmptMeta) DelInstAttr

func (m *CmptMeta) DelInstAttr(instId string)

func (*CmptMeta) DelInstance

func (m *CmptMeta) DelInstance(instId string)

func (*CmptMeta) DelParentTopo

func (m *CmptMeta) DelParentTopo(parentId string)

func (*CmptMeta) DelServer

func (m *CmptMeta) DelServer(serverIp string)

func (*CmptMeta) DelService

func (m *CmptMeta) DelService(instId string)

func (*CmptMeta) DelSsh

func (m *CmptMeta) DelSsh(servIp, sshId string)

func (*CmptMeta) DelTopo

func (m *CmptMeta) DelTopo(parentId, instId string)

func (*CmptMeta) GetAccNameByMagicKey

func (m *CmptMeta) GetAccNameByMagicKey(magicKey string) string

func (*CmptMeta) GetAccSession

func (m *CmptMeta) GetAccSession(user string) *proto.AccountSession

func (*CmptMeta) GetAccount

func (m *CmptMeta) GetAccount(user string) *proto.Account

func (*CmptMeta) GetAttr

func (m *CmptMeta) GetAttr(attrId int) *proto.PaasMetaAttr

func (*CmptMeta) GetCmptAttrs

func (m *CmptMeta) GetCmptAttrs(cmptId int) []*proto.PaasMetaAttr

func (*CmptMeta) GetCmptById

func (m *CmptMeta) GetCmptById(cmptId int) *proto.PaasMetaCmpt

func (*CmptMeta) GetCmptByName

func (m *CmptMeta) GetCmptByName(cmptName string) *proto.PaasMetaCmpt

func (*CmptMeta) GetDeployFile

func (m *CmptMeta) GetDeployFile(fileId int) *proto.PaasDeployFile

func (*CmptMeta) GetDeployHost

func (m *CmptMeta) GetDeployHost(hostId int) *proto.PaasDeployHost

func (*CmptMeta) GetInstAttr

func (m *CmptMeta) GetInstAttr(instId string, attrId int) *proto.PaasInstAttr

func (*CmptMeta) GetInstAttrs

func (m *CmptMeta) GetInstAttrs(instId string) []*proto.PaasInstAttr

func (*CmptMeta) GetInstCmptName

func (m *CmptMeta) GetInstCmptName(instId string) string

func (*CmptMeta) GetInstRelations

func (m *CmptMeta) GetInstRelations(servInstId string, relations *[]*proto.PaasTopology)

func (*CmptMeta) GetInstance

func (m *CmptMeta) GetInstance(instId string) *proto.PaasInstance

func (*CmptMeta) GetInstanceCmpt

func (m *CmptMeta) GetInstanceCmpt(instID string) *proto.PaasMetaCmpt

func (*CmptMeta) GetMetaData2Json

func (m *CmptMeta) GetMetaData2Json() interface{}

func (*CmptMeta) GetSameLevelInstList

func (m *CmptMeta) GetSameLevelInstList(servInstId, instId string) []*proto.PaasTopology

func (*CmptMeta) GetServListFromCache

func (m *CmptMeta) GetServListFromCache(servType string) []map[string]interface{}

func (*CmptMeta) GetServRootCmpt

func (m *CmptMeta) GetServRootCmpt(servType string) string

func (*CmptMeta) GetServTypeListFromLocalCache

func (m *CmptMeta) GetServTypeListFromLocalCache() []string

func (*CmptMeta) GetServTypeVerList

func (m *CmptMeta) GetServTypeVerList(result *map[string]interface{})

func (*CmptMeta) GetService

func (m *CmptMeta) GetService(instId string) *proto.PaasService

func (*CmptMeta) GetSessionByMagicKey

func (m *CmptMeta) GetSessionByMagicKey(magicKey string) *proto.AccountSession

func (*CmptMeta) GetSshById

func (m *CmptMeta) GetSshById(sshId string) *proto.PaasSsh

func (*CmptMeta) GetSurpportSSHList

func (m *CmptMeta) GetSurpportSSHList(servClazz string) []map[string]interface{}

func (*CmptMeta) Init

func (m *CmptMeta) Init()

func (*CmptMeta) IsCmptVersionExist

func (m *CmptMeta) IsCmptVersionExist(servType, version string) bool

func (*CmptMeta) IsInstAttrExists

func (m *CmptMeta) IsInstAttrExists(instId string, attrId int) bool

func (*CmptMeta) IsInstServRootCmpt

func (m *CmptMeta) IsInstServRootCmpt(instID string) bool

func (*CmptMeta) IsServRootCmpt

func (m *CmptMeta) IsServRootCmpt(servType, cmptName string) bool

func (*CmptMeta) IsServerIpExists

func (m *CmptMeta) IsServerIpExists(servIp string) bool

func (*CmptMeta) IsServerNull

func (m *CmptMeta) IsServerNull(servIp string) bool

func (*CmptMeta) IsSshExists

func (m *CmptMeta) IsSshExists(sshName, servIp, servClazz string) bool

func (*CmptMeta) IsSshUsing

func (m *CmptMeta) IsSshUsing(sshId string) bool

func (*CmptMeta) IsTopoExists

func (m *CmptMeta) IsTopoExists(parentId string) bool

func (*CmptMeta) IsTopoRelationExists

func (m *CmptMeta) IsTopoRelationExists(parentId, subId string) bool

func (*CmptMeta) ModPasswd

func (m *CmptMeta) ModPasswd(accName, passwd string)

func (*CmptMeta) ModSsh

func (m *CmptMeta) ModSsh(serverIp string, sshId string, sshName string, sshPwd string, sshPort int)

func (*CmptMeta) ModTopo

func (m *CmptMeta) ModTopo(topo *proto.PaasTopology)

func (*CmptMeta) ReloadMetaData

func (m *CmptMeta) ReloadMetaData(dataType string)

func (*CmptMeta) ReloadService

func (m *CmptMeta) ReloadService(instID string)

func (*CmptMeta) RemoveTtlSession

func (m *CmptMeta) RemoveTtlSession(accName, magicKey string, isLocalOnly bool)

func (*CmptMeta) SwitchSmsDBType

func (m *CmptMeta) SwitchSmsDBType(dgContainerID, dbType string)

func (*CmptMeta) UpdInstAttr

func (m *CmptMeta) UpdInstAttr(instAttr *proto.PaasInstAttr)

func (*CmptMeta) UpdInstDeploy

func (m *CmptMeta) UpdInstDeploy(instId, deployFlag string)

func (*CmptMeta) UpdInstPos

func (m *CmptMeta) UpdInstPos(inst *proto.PaasInstance)

func (*CmptMeta) UpdInstPreEmbadded

func (m *CmptMeta) UpdInstPreEmbadded(instId, preEmbadded string)

func (*CmptMeta) UpdServDeploy

func (m *CmptMeta) UpdServDeploy(servInstId, deployFlag string)

Jump to

Keyboard shortcuts

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