proto

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	ACC_ID      string `db:"ACC_ID"`
	ACC_NAME    string `db:"ACC_NAME"`
	PHONE_NUM   string `db:"PHONE_NUM"`
	MAIL        string `db:"MAIL"`
	PASSWD      string `db:"PASSWD"`
	CREATE_TIME uint64 `db:"CREATE_TIME"`
}

type AccountSession

type AccountSession struct {
	ACC_NAME        string `json:"ACC_NAME,omitempty"`
	MAGIC_KEY       string `json:"MAGIC_KEY,omitempty"`
	SESSION_TIMEOUT int64  `json:"SESSION_TIMEOUT,omitempty"`
}

func NewAccountSession

func NewAccountSession(accName, magicKey string) *AccountSession

func NewAccountSessionWithTTL

func NewAccountSessionWithTTL(accName, magicKey string, ttl int64) *AccountSession

func (*AccountSession) IsSessionValid

func (m *AccountSession) IsSessionValid() bool

type AddSSHParam

type AddSSHParam struct {
	SSH_NAME   string `json:"SSH_NAME" binding:"required"`
	SSH_PWD    string `json:"SSH_PWD" binding:"required"`
	SSH_PORT   int    `json:"SSH_PORT" binding:"required"`
	SERV_CLAZZ string `json:"SERV_CLAZZ" binding:"required"`
	SERVER_IP  string `json:"SERVER_IP" binding:"required"`
}

type AddServerParam

type AddServerParam struct {
	SERVER_IP   string `json:"SERVER_IP" binding:"required"`
	SERVER_NAME string `json:"SERVER_NAME" binding:"required"`
}

type AddServiceParam

type AddServiceParam struct {
	SERV_NAME  string `json:"SERV_NAME" binding:"required"`
	SERV_CLAZZ string `json:"SERV_CLAZZ" binding:"required"`
	SERV_TYPE  string `json:"SERV_TYPE" binding:"required"`
	VERSION    string `json:"VERSION" binding:"required"`
	IS_PRODUCT string `json:"IS_PRODUCT" binding:"required"`
	USER       string `json:"USER" binding:"required"`
	PASSWORD   string `json:"PASSWORD" binding:"required"`
}

type AdjustSmsABQueueParam

type AdjustSmsABQueueParam struct {
	SERV_INST_ID       string                 `json:"SERV_INST_ID" binding:"required"`
	QUEUE_SERV_INST_ID string                 `json:"QUEUE_SERV_INST_ID" binding:"required"`
	TOPO_JSON          map[string]interface{} `json:"TOPO_JSON" binding:"required"`
}

type AppLogParam

type AppLogParam struct {
	SERV_ID  string `json:"SERV_ID" binding:"required"`
	INST_ID  string `json:"INST_ID" binding:"required"`
	LOG_TYPE string `json:"LOG_TYPE" binding:"required"`
}

type CheckInstanceStatusParam

type CheckInstanceStatusParam struct {
	SERV_ID   string `json:"SERV_ID" binding:"required"`
	INST_ID   string `json:"INST_ID" binding:"required"`
	SERV_TYPE string `json:"SERV_TYPE" binding:"required"`
}

type ClearAlarmParam

type ClearAlarmParam struct {
	ALARM_ID      int    `json:"ALARM_ID" binding:"required"`
	INST_ID       string `json:"INST_ID" binding:"required"`
	ALARM_TYPE    int    `json:"ALARM_TYPE" binding:"required"`
	DEAL_ACC_NAME string `json:"DEAL_ACC_NAME" binding:"required"`
}

type CmptVersionParam

type CmptVersionParam struct {
	SERV_TYPE string `json:"SERV_TYPE" binding:"required"`
	VERSION   string `json:"VERSION" binding:"required"`
}

type Count

type Count struct {
	COUNT int64 `db:"COUNT"`
}

type DelSSHParam

type DelSSHParam struct {
	SSH_ID    string `json:"SSH_ID" binding:"required"`
	SERVER_IP string `json:"SERVER_IP" binding:"required"`
}

type DelServerParam

type DelServerParam struct {
	SERVER_IP string `json:"SERVER_IP" binding:"required"`
}

type DelServiceNodeParam

type DelServiceNodeParam struct {
	PARENT_ID string `json:"PARENT_ID" binding:"required"`
	INST_ID   string `json:"INST_ID" binding:"required"`
}

type DelServiceParam

type DelServiceParam struct {
	INST_ID string `json:"INST_ID" binding:"required"`
}

type DeployLogParam

type DeployLogParam struct {
	LOG_KEY string `json:"LOG_KEY" binding:"required"`
}

type DeployServiceParam

type DeployServiceParam struct {
	SERV_ID     string `json:"SERV_ID" binding:"required"`
	INST_ID     string `json:"INST_ID" binding:"omitempty"`
	SERV_TYPE   string `json:"SERV_TYPE" binding:"omitempty"`
	LOG_KEY     string `json:"LOG_KEY" binding:"required"`
	DEPLOY_FLAG string `json:"DEPLOY_FLAG" binding:"omitempty"`
}

type GetAlarmCountParam

type GetAlarmCountParam struct {
	DEAL_FLAG string `json:"DEAL_FLAG" binding:"omitempty"`
}

type GetAlarmListParam

type GetAlarmListParam struct {
	SERV_INST_ID string `json:"SERV_INST_ID" binding:"omitempty"`
	INST_ID      string `json:"INST_ID" binding:"omitempty"`
	DEAL_FLAG    string `json:"DEAL_FLAG" binding:"omitempty,oneof=0 1"`
	PAGE_SIZE    int    `json:"pageSize" binding:"required"`
	PAGE_NUMBER  int    `json:"pageNumber" binding:"required"`
}

type GetOpLogCntParam

type GetOpLogCntParam struct {
	USER     string `json:"USER" binding:"required"`
	START_TS int64  `json:"START_TS" binding:"required"`
	END_TS   int64  `json:"END_TS" binding:"required"`
}

type GetOpLogListParam

type GetOpLogListParam struct {
	USER        string `json:"USER" binding:"required"`
	START_TS    int64  `json:"START_TS" binding:"required"`
	END_TS      int64  `json:"END_TS" binding:"required"`
	PAGE_SIZE   int    `json:"pageSize" binding:"required"`
	PAGE_NUMBER int    `json:"pageNumber" binding:"required"`
}

type GetSSHCountByIPParam

type GetSSHCountByIPParam struct {
	SERVER_IP string `json:"SERVER_IP" binding:"required"`
}

type GetSSHListByIPParam

type GetSSHListByIPParam struct {
	SERVER_IP   string `json:"SERVER_IP" binding:"required"`
	PAGE_SIZE   int    `json:"pageSize" binding:"required"`
	PAGE_NUMBER int    `json:"pageNumber" binding:"required"`
}

type GetServListParam

type GetServListParam struct {
	SERV_TYPE string `json:"SERV_TYPE" binding:"required"`
}

type GetServTypeVerCountParam

type GetServTypeVerCountParam struct {
	SERV_TYPE string `json:"SERV_TYPE" binding:"omitempty"`
}

type GetServTypeVerListByPageParam

type GetServTypeVerListByPageParam struct {
	SERV_TYPE   string `json:"SERV_TYPE" binding:"omitempty"`
	PAGE_SIZE   int    `json:"pageSize" binding:"required"`
	PAGE_NUMBER int    `json:"pageNumber" binding:"required"`
}

type GetServerCountParam

type GetServerCountParam struct {
	SERVER_IP   string `json:"SERVER_IP" binding:"omitempty"`
	SERVER_NAME string `json:"SERVER_NAME" binding:"omitempty"`
}

type GetServerListParam

type GetServerListParam struct {
	SERVER_IP   string `json:"SERVER_IP" binding:"omitempty"`
	SERVER_NAME string `json:"SERVER_NAME" binding:"omitempty"`
	PAGE_SIZE   int    `json:"pageSize" binding:"required"`
	PAGE_NUMBER int    `json:"pageNumber" binding:"required"`
}

type GetServiceCountParam

type GetServiceCountParam struct {
	SERV_NAME  string `json:"SERV_NAME" binding:"omitempty"`
	SERV_CLAZZ string `json:"SERV_CLAZZ" binding:"omitempty"`
	SERV_TYPE  string `json:"SERV_TYPE" binding:"omitempty"`
}

type GetServiceListParam

type GetServiceListParam struct {
	SERV_INST_ID string `json:"SERV_INST_ID" binding:"omitempty"`
	SERV_NAME    string `json:"SERV_NAME" binding:"omitempty"`
	SERV_CLAZZ   string `json:"SERV_CLAZZ" binding:"omitempty"`
	SERV_TYPE    string `json:"SERV_TYPE" binding:"omitempty"`
	PAGE_SIZE    int    `json:"pageSize" binding:"required"`
	PAGE_NUMBER  int    `json:"pageNumber" binding:"required"`
}

type GetUserByServiceTypeParam

type GetUserByServiceTypeParam struct {
	SERV_CLAZZ string `json:"SERV_CLAZZ" binding:"required"`
}

type LoadMetaParam

type LoadMetaParam struct {
	INST_ID string `json:"INST_ID" binding:"required"`
}

type LoginParam

type LoginParam struct {
	USER     string `json:"USER" binding:"required,min=3,max=32"`
	PASSWORD string `json:"PASSWORD" binding:"required,min=8,max=128"`
}

type LongMargin

type LongMargin struct {
	Start int64
	End   int64
	Curr  int64
	// contains filtered or unexported fields
}

func NewLongMargin

func NewLongMargin(start, end int64) *LongMargin

func (*LongMargin) NextId

func (h *LongMargin) NextId() int64

type ModPasswdParam

type ModPasswdParam struct {
	MAGIC_KEY string `json:"USER" binding:"required,min=32,max=48"`
	PASSWORD  string `json:"PASSWORD" binding:"required,min=8,max=128"`
}

type ModSSHParam

type ModSSHParam struct {
	SSH_NAME  string `json:"SSH_NAME" binding:"required"`
	SSH_PWD   string `json:"SSH_PWD" binding:"required"`
	SSH_PORT  int    `json:"SSH_PORT" binding:"required"`
	SSH_ID    string `json:"SSH_ID" binding:"required"`
	SERVER_IP string `json:"SERVER_IP" binding:"required"`
}

type ModServiceParam

type ModServiceParam struct {
	INST_ID    string `json:"INST_ID" binding:"required"`
	SERV_NAME  string `json:"SERV_NAME" binding:"required"`
	VERSION    string `json:"VERSION" binding:"required"`
	IS_PRODUCT string `json:"IS_PRODUCT" binding:"required"`
}

type ModServiceVersionParam

type ModServiceVersionParam struct {
	INST_ID string `json:"INST_ID" binding:"required"`
	VERSION string `json:"VERSION" binding:"required"`
}

type PaasCmptAttr

type PaasCmptAttr struct {
	CMPT_ID int `db:"CMPT_ID"`
	ATTR_ID int `db:"ATTR_ID"`
}

type PaasCmptVer

type PaasCmptVer struct {
	SERV_TYPE string `db:"SERV_TYPE"`
	VERSION   string `db:"VERSION"`
	VER_LIST  []string
}

func NewPaasCmptVer

func NewPaasCmptVer(servType string, version string) *PaasCmptVer

func (*PaasCmptVer) AddVersion

func (m *PaasCmptVer) AddVersion(version string)

func (*PaasCmptVer) DelVersion

func (m *PaasCmptVer) DelVersion(version string)

func (*PaasCmptVer) InitVerList

func (m *PaasCmptVer) InitVerList()

func (*PaasCmptVer) IsVersionExist

func (m *PaasCmptVer) IsVersionExist(ver string) bool

func (*PaasCmptVer) ToJsonMap

func (m *PaasCmptVer) ToJsonMap() map[string]interface{}

type PaasDeployFile

type PaasDeployFile struct {
	FILE_ID     int    `db:"FILE_ID"`
	HOST_ID     int    `db:"HOST_ID"`
	SERV_TYPE   string `db:"SERV_TYPE"`
	VERSION     string `db:"VERSION"`
	FILE_NAME   string `db:"FILE_NAME"`
	FILE_DIR    string `db:"FILE_DIR"`
	CREATE_TIME uint64 `db:"CREATE_TIME"`
}

type PaasDeployHost

type PaasDeployHost struct {
	HOST_ID     int    `db:"HOST_ID"`
	IP_ADDRESS  string `db:"IP_ADDRESS"`
	USER_NAME   string `db:"USER_NAME"`
	USER_PWD    string `db:"USER_PWD"`
	SSH_PORT    string `db:"SSH_PORT"`
	CREATE_TIME uint64 `db:"CREATE_TIME"`
}

type PaasEvent

type PaasEvent struct {
	EVENT_CODE   int32  `json:"EVENT_CODE,omitempty"`
	META_SERV_ID string `json:"META_SERV_ID,omitempty"`
	EVENT_TS     int64  `json:"EVENT_TS,omitempty"`
	MSG_BODY     string `json:"MSG_BODY,omitempty"`
	MAGIC_KEY    string `json:"MAGIC_KEY,omitempty"`
}

func NewPaasEvent

func NewPaasEvent(eventCode int32, msgBody string, magicKey string) *PaasEvent

type PaasInstAttr

type PaasInstAttr struct {
	INST_ID    string `db:"INST_ID"`
	ATTR_ID    int    `db:"ATTR_ID"`
	ATTR_NAME  string `db:"ATTR_NAME"`
	ATTR_VALUE string `db:"ATTR_VALUE"`
}

func NewPaasInstAttr

func NewPaasInstAttr(instId string, attrId int, attrName string, attrVal string) *PaasInstAttr

func ParsePaasInstAttr

func ParsePaasInstAttr(msg string) *PaasInstAttr

type PaasInstance

type PaasInstance struct {
	INST_ID string `db:"INST_ID"`
	CMPT_ID int    `db:"CMPT_ID"`
	STATUS  string `db:"IS_DEPLOYED"`
	POS_X   int    `db:"POS_X"`
	POS_Y   int    `db:"POS_Y"`
	WIDTH   int    `db:"WIDTH"`
	HEIGHT  int    `db:"HEIGHT"`
	ROW     int    `db:"ROW_"`
	COL     int    `db:"COL_"`
}

func NewPaasInstance

func NewPaasInstance(instId string, cmptId int, status string, x int, y int, width int, height int, row int, col int) *PaasInstance

func ParsePaasInstance

func ParsePaasInstance(s string) *PaasInstance

func (*PaasInstance) IsDefaultPos

func (m *PaasInstance) IsDefaultPos() bool

func (*PaasInstance) IsDeployed

func (m *PaasInstance) IsDeployed() bool

type PaasMetaAttr

type PaasMetaAttr struct {
	ATTR_ID      int    `db:"ATTR_ID"`
	ATTR_NAME    string `db:"ATTR_NAME"`
	ATTR_NAME_CN string `db:"ATTR_NAME_CN"`
	AUTO_GEN     string `db:"AUTO_GEN"`
}

func (*PaasMetaAttr) IsAutoGen

func (attr *PaasMetaAttr) IsAutoGen() bool

type PaasMetaCmpt

type PaasMetaCmpt struct {
	CMPT_ID        int    `db:"CMPT_ID"`
	CMPT_NAME      string `db:"CMPT_NAME"`
	CMPT_NAME_CN   string `db:"CMPT_NAME_CN"`
	IS_NEED_DEPLOY string `db:"IS_NEED_DEPLOY"`
	SERV_TYPE      string `db:"SERV_TYPE"`
	SERV_CLAZZ     string `db:"SERV_CLAZZ"`
	NODE_JSON_TYPE string `db:"NODE_JSON_TYPE"`
	SUB_CMPT_ID    string `db:"SUB_CMPT_ID"`
	SUB_CMPT_SET   map[int]bool
}

func (*PaasMetaCmpt) HaveSubComponent

func (m *PaasMetaCmpt) HaveSubComponent() bool

func (*PaasMetaCmpt) InitSubCmptSet

func (m *PaasMetaCmpt) InitSubCmptSet()

func (*PaasMetaCmpt) IsNeedDeploy

func (m *PaasMetaCmpt) IsNeedDeploy() bool

type PaasNode

type PaasNode struct {
	INST_ID string      `json:"inst_id,required"`
	TEXT    string      `json:"text,required"`
	NODES   []*PaasNode `json:"nodes,omitempty"`
}

type PaasPos

type PaasPos struct {
	X      int
	Y      int
	Width  int
	Height int
	Row    int
	Col    int
}

func GetPos

func GetPos(posMap *map[string]interface{}) *PaasPos

func NewPaasPos

func NewPaasPos(x, y int) *PaasPos

type PaasRedisCluster

type PaasRedisCluster struct {
	MasterNodes map[string]*PaasRedisNode
	SlaveNodes  map[string]*PaasRedisNode
}

func NewPaasRedisCluster

func NewPaasRedisCluster() *PaasRedisCluster

func (*PaasRedisCluster) GetAloneMaster

func (h *PaasRedisCluster) GetAloneMaster() string

func (*PaasRedisCluster) GetAnyMasterAddr

func (h *PaasRedisCluster) GetAnyMasterAddr() (string, bool)

func (*PaasRedisCluster) GetMasters

func (h *PaasRedisCluster) GetMasters() []*PaasRedisNode

func (*PaasRedisCluster) GetSelfInfo

func (h *PaasRedisCluster) GetSelfInfo(ip, port string) *PaasRedisNode

func (*PaasRedisCluster) GetSlaves

func (h *PaasRedisCluster) GetSlaves(masterId string) []*PaasRedisNode

func (*PaasRedisCluster) Parse

func (h *PaasRedisCluster) Parse(info string)

type PaasRedisNode

type PaasRedisNode struct {
	NodeId    string
	Ip        string
	Port      string
	RedisRole int
	SlotRange string
	MasterId  string
	SlaveIds  []string
}

func NewPaasRedisNode

func NewPaasRedisNode(nodeId, ip, port string) *PaasRedisNode

func (*PaasRedisNode) AddSlaveId

func (h *PaasRedisNode) AddSlaveId(slaveId string)

func (*PaasRedisNode) GetSlotCount

func (h *PaasRedisNode) GetSlotCount() int

func (*PaasRedisNode) IsSlaveEmpty

func (h *PaasRedisNode) IsSlaveEmpty() bool

type PaasServer

type PaasServer struct {
	SERVER_IP   string `db:"SERVER_IP"`
	SERVER_NAME string `db:"SERVER_NAME"`
}

func ParsePaasServer

func ParsePaasServer(msg string) *PaasServer

type PaasService

type PaasService struct {
	INST_ID            string `db:"INST_ID"`
	SERV_NAME          string `db:"SERV_NAME"`
	SERV_CLAZZ         string `db:"SERV_CLAZZ"`
	SERV_TYPE          string `db:"SERV_TYPE"`
	VERSION            string `db:"VERSION"`
	IS_DEPLOYED        string `db:"IS_DEPLOYED"`
	IS_PRODUCT         string `db:"IS_PRODUCT"`
	CREATE_TIME        int64  `db:"CREATE_TIME"`
	USER               string `db:"USER"`
	PASSWORD           string `db:"PASSWORD"`
	PSEUDO_DEPLOY_FLAG string `db:"PSEUDO_DEPLOY_FLAG"`
}

func ParsePaasService

func ParsePaasService(s string) *PaasService

func (*PaasService) IsDeployed

func (m *PaasService) IsDeployed() bool

func (*PaasService) IsProduct

func (m *PaasService) IsProduct() bool

type PaasSsh

type PaasSsh struct {
	SSH_ID     string `db:"SSH_ID"`
	SSH_NAME   string `db:"SSH_NAME"`
	SSH_PWD    string `db:"SSH_PWD"`
	SSH_PORT   int    `db:"SSH_PORT"`
	SERV_CLAZZ string `db:"SERV_CLAZZ"`
	SERVER_IP  string `db:"SERVER_IP"`
}

func NewPaasSsh

func NewPaasSsh(sshId string, sshName string, sshPwd string, sshPort int, servClazz string, serverIp string) *PaasSsh

func ParsePaasSSH

func ParsePaasSSH(msg string) *PaasSsh

type PaasTopology

type PaasTopology struct {
	INST_ID1  string `db:"INST_ID1"`
	INST_ID2  string `db:"INST_ID2"`
	TOPO_TYPE int    `db:"TOPO_TYPE"`
}

func NewPaasTopology

func NewPaasTopology(parentId string, instId string, topoType int) *PaasTopology

func ParsePaasTopology

func ParsePaasTopology(msg string) *PaasTopology

func (*PaasTopology) GetToe

func (m *PaasTopology) GetToe(instId string) string

type ReloadMetaDataParam

type ReloadMetaDataParam struct {
	RELOAD_TYPE string `json:"RELOAD_TYPE" binding:"required"`
}

type SaveServiceNodeParam

type SaveServiceNodeParam struct {
	OP_TYPE   int                    `json:"OP_TYPE" binding:"required"`
	PARENT_ID string                 `json:"PARENT_ID" binding:"required"`
	NODE_JSON map[string]interface{} `json:"NODE_JSON" binding:"required"`
}

type SaveServiceTopoSkeletonParam

type SaveServiceTopoSkeletonParam struct {
	SERV_TYPE string                 `json:"SERV_TYPE" binding:"required"`
	TOPO_JSON map[string]interface{} `json:"TOPO_JSON" binding:"required"`
}

type ServInstParam

type ServInstParam struct {
	SERV_INST_ID string `json:"SERV_INST_ID" binding:"required"`
}

type StatusInfo

type StatusInfo struct {
	CAPACITY          string  `json:"capacity,required"`
	AVAILABLE         string  `json:"available,required"`
	USED_SIZE         string  `json:"used_size,required"`
	LEADER_COUNT      int     `json:"leader_count,required"`
	LEADER_WEIGHT     int     `json:"leader_weight,required"`
	LEADER_SCORE      int     `json:"leader_score,required"`
	LEADER_SIZE       int     `json:"leader_size,required"`
	REGION_COUNT      int     `json:"region_count,required"`
	REGION_WEIGHT     int     `json:"region_weight,required"`
	REGION_SCORE      float64 `json:"region_score,required"`
	REGION_SIZE       int     `json:"region_size,required"`
	START_TS          string  `json:"start_ts,required"`
	LAST_HEARTBEAT_TS string  `json:"last_heartbeat_ts,required"`
	UPTIME            string  `json:"uptime,required"`
}

type StoreInfo

type StoreInfo struct {
	ID              int    `json:"id,required"`
	ADDRESS         string `json:"address,required"`
	VERSION         string `json:"version,required"`
	STATUS_ADDRESS  string `json:"status_address,required"`
	GIT_HASH        string `json:"git_hash,required"`
	START_TIMESTAMP int64  `json:"start_timestamp,required"`
	DEPLOY_PATH     string `json:"deploy_path,required"`
	LAST_HEARTBEAT  int64  `json:"last_heartbeat,required"`
	STATE_NAME      string `json:"state_name,required"`
}

type StoreItem

type StoreItem struct {
	STORE  StoreInfo  `json:"store,required"`
	STATUS StatusInfo `json:"status,required"`
}

type SwitchSmsDBTypeParam

type SwitchSmsDBTypeParam struct {
	SERV_INST_ID    string `json:"SERV_INST_ID" binding:"required"`
	DB_SERV_INST_ID string `json:"DB_SERV_INST_ID" binding:"required"`
	ACTIVE_DB_TYPE  string `json:"ACTIVE_DB_TYPE" binding:"required"`
	DB_NAME         string `json:"DB_NAME" binding:"required"`
}

type TikvStore

type TikvStore struct {
	COUNT  int         `json:"count,required"`
	STORES []StoreItem `json:"stores,required"`
}

Jump to

Keyboard shortcuts

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