Documentation ¶
Index ¶
- Constants
- Variables
- type App
- type AppChangeMap
- type AppCmcStat
- type AppContainer
- type AppData
- type AppEvent
- type AppInfo
- type AppLog
- type AppLogAction
- type AppNode
- type AppNodeAgentView
- type AppNodeInfo
- type AppNodeInfoLog
- type AppNodeMap
- type AppPackage
- type AppRegInfoLog
- type AppStatics
- type AppTopology
- type AppUserRelation
- type AppViewHistory
- type Board
- type BoardAuth
- type ChangeLog
- type CmcApp
- type CmcAppLog
- type CmcAppView
- type CmcCnt
- type CmcConfig
- type CmcConfigLog
- type CmcHistory
- type CmcHistoryItem
- type CmcPublishLog
- type CmcResource
- type CmcResourceItem
- type CmcTpl
- type CmcUseStatus
- type CmdbSyncLog
- type CommitChange
- type ConfigData
- type ConfigDiffData
- type ConfigStatus
- type ConfigVal
- type DeployInstance
- type DiffText
- type EtcdInstance
- type FlowContainer
- type GitlabEvent
- type GitlabEventList
- type GovernConfigData
- type GovernRegData
- type GrafanaAlertNotification
- type GrafanaOrgUser
- type GrafanaTeam
- type GrafanaTeamMember
- type GrafanaUser
- type IdcSrv
- type IdcSrvPub
- type ListProviderEvents
- type ListProviderEventsReq
- type ListProviderEventsResp
- type MetaData
- type Model
- type Node
- type NodeCnt
- type NodeStatus
- type OpsSupervisorConfig
- type Option
- type PProf
- type PProfFileInfo
- type PProfOssFile
- type PProfReqList
- type PProfViewModel
- type PprofInfo
- type Proto
- type ProtoFields
- type ProtoInputField
- type ProviderRegisterEvent
- type RegAllData
- type RegInfoOutPut
- type RegisterType
- type ReqCheck
- type ReqProfile
- type ReqSysConfig
- type ServerConfigData
- type ServerRegData
- type SystemConfig
- type ToolInfo
- type User
- type UserInfo
- type UserNameJson
- type UserRelation
- type UserVisitedApp
- type Zone
Constants ¶
const ( K8sPub = int(iota) K8sRestart K8sStop K8sStatus )
K8sPub ...
const ( Redis = iota + 1 Memcache Mongo MySQL RPC Nginx PHP LUA GO JAVA PYTHON FED FLASH CPP )
语言类型常量
const ( OTHERLv = iota ProxyLv AppLv GateWayLv ServiceLv DataLv )
架构层级
const ( EventSystem = "system" // 系统触发,正常用户点击发布 EventRollback = "rollback" // 回滚事件 EventWebHook = "webhook" // 由gitlab事件触发的统一为webhook事件,如有需要再细分 EventPush = "push" EventPull = "pull_request" EventTag = "tag" )
EventSystem ...
const ( StatusInit = 0 StatusSuccess = 1 StatusRunning = 2 StatusPending = 3 StatusSkipped = 4 StatusFailure = 5 StatusCanceled = 6 )
StatusInit ...
const (
GoPkgToml = "/Gopkg.lock"
)
GoPkgToml ...
Variables ¶
var LangTypes = []string{ Redis: "Redis", Memcache: "Memcache", Mongo: "Mongo", MySQL: "MySQL", RPC: "RPC", Nginx: "Nginx", PHP: "PHP", LUA: "Lua", GO: "Go", JAVA: "Java", PYTHON: "Python", FED: "Fed", FLASH: "Flash", CPP: "C++", }
LangTypes 语言类型数组映射
var LevelTypes = []string{ OTHERLv: "其他", ProxyLv: "代理", AppLv: "应用", GateWayLv: "网关", ServiceLv: "服务", DataLv: "数据", }
LevelTypes 五层架构名称map
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { AppName string `json:"appName"` Aid int `json:"aid"` FileList []string `json:"fileList"` }
展示配置中心的app信息
type AppChangeMap ¶
type AppChangeMap struct { Id int `json:"id" gorm:"not null;column:id"` // id类型? AppName string `json:"appName" gorm:"not null;column:app_name;index"` Md5 string `json:"md5" gorm:"not null;column:md5;index"` UpdatedAt int64 `json:"updatedAt" gorm:"not null;column:updated_at"` }
func (*AppChangeMap) TableName ¶
func (t *AppChangeMap) TableName() string
type AppCmcStat ¶
type AppContainer ¶
type AppContainer struct { ID uint `gorm:"primary_key"` Aid int `json:"aid"` IdcID int `json:"idc_id"` K8sAid int `json:"k8s_aid"` }
AppContainer ...
type AppData ¶
type AppData struct { Id int Aid int Commit string UpdateTime int64 UpdatedBy int BuildPath string WorkSpacePath string BuildOutputPath string ProtoDocStatus int ProtoDocPath string GrpcTesterStatus int GrpcTesterPath string }
AppData ...
type AppEvent ¶
type AppEvent struct { Id int `gorm:"primary_key,not null;AUTO_INCREMENT" json:"id"` // 数据id AppName string `gorm:"not null;index:idx_app_name" json:"app_name"` // 应用名称 Aid int `gorm:"not null;index:idx_aid" json:"aid"` // 应用id ZoneCode string `gorm:"not null;index:idx_zone_code" json:"zone_code"` // 环境 Env string `gorm:"not null;index:idx_env" json:"env"` // 环境 HostName string `gorm:"not null;"json:"host_name"` UserName string `gorm:"not null;"json:"user_name"` // 用户名 Uid int `gorm:"not null;"json:"uid"` // 用户id Operation string `gorm:"not null;index:idx_operation" json:"operation"` // 操作 CreateTime int64 `gorm:""json:"create_time"` // 事件发生时间 Source string `gorm:"not null;index:idx_source" json:"source"` // 事件来源 Metadata string `gorm:"not null;type:text"json:"metadata"` // 事件内容 OperationName string `gorm:"-"json:"operation_name"` SourceName string `gorm:"-"json:"source_name"` }
func (*AppEvent) HandleOperationName ¶
func (a *AppEvent) HandleOperationName()
func (*AppEvent) HandleSourceName ¶
func (a *AppEvent) HandleSourceName()
type AppInfo ¶
type AppInfo struct { Aid int `gorm:"not null;primary_key;AUTO_INCREMENT"json:"aid"` Gid int `gorm:"not null;comment:'gitlab id'"json:"gid"` Name string `gorm:"not null;index;comment:'项目中文名'"json:"name"` AppName string `gorm:"not null;index;comment:'项目英文唯一标识名'"json:"app_name"` CreateTime int64 `gorm:"not null;comment:'创建时间'" json:"create_time"` UpdateTime int64 `gorm:"not null;comment:'更新时间'"json:"update_time"` Level int `gorm:"not null;comment:'层级'"json:"level"` Lang string `gorm:"not null;comment:'语言'"json:"lang"` BizDomain string `gorm:"not null;comment:'业务类型'"json:"biz_domain"` CreatedBy int `gorm:"not null;comment:'创建者'"json:"created_by"` UpdatedBy int `gorm:"not null;comment:'更新者'"json:"updated_by"` HttpPort string `gorm:"not null;comment:'HTTP端口号'"json:"http_port"` RpcPort string `gorm:"not null;comment:'RPC端口号'"json:"rpc_port" ` GovernPort string `gorm:"not null;comment:'治理端口号'"json:"govern_port" ` HookId int `gorm:"not null;comment:'钩子'"json:"hook_id"` Users UserNameJson `gorm:"not null;type:json;comment:'业务负责人'"json:"users"` WebUrl string `gorm:"not null;"json:"web_url"` ProtoDir string `gorm:"not null;"json:"proto_dir"` GitUrl string `gorm:"not null;"json:"git_url"` }
AppInfo ...
type AppLog ¶
type AppLog struct { ID int `gorm:"not null;primary_key;comment:'应用id'"json:"id"` Aid int `gorm:"not null;comment:'应用id'"json:"aid"` Gid int `gorm:"not null;comment:'gitlab id'"json:"gid"` Name string `gorm:"not null;index;comment:'项目中文名'"json:"name"` AppName string `gorm:"not null;index;comment:'项目英文唯一标识名'"json:"appName"` CreateTime int64 `gorm:"not null;comment:'创建时间'" json:"createTime"` UpdateTime int64 `gorm:"not null;comment:'更新时间'"json:"updateTime"` Level int `gorm:"not null;comment:'层级'"json:"level"` Lang string `gorm:"not null;comment:'语言'"json:"lang"` BizDomain string `gorm:"not null;"json:"bizDomain"` CreatedBy int `gorm:"not null;comment:'创建者'"json:"createdBy"` UpdatedBy int `gorm:"not null;comment:'更新者'"json:"updatedBy"` HttpPort string `json:"httpPort" gorm:"not null;column:http_port"` RpcPort string `json:"rpcPort" gorm:"not null;column:rpc_port"` HealthPort string `json:"healthPort" gorm:"not null;column:health_port"` HookId int `gorm:"not null;comment:'钩子'"json:"hookId"` Users UserNameJson `gorm:"not null;type:json"json:"users"` WebUrl string `gorm:"not null;"json:"webUrl"` Action string `gorm:"null;type:varchar(32);comment:'动作';column:action" json:"action"` CreatedAt time.Time `gorm:"null;column:created_at;comment:'记录创建时间'" json:"createdAt"` }
AppInfo ...
type AppLogAction ¶
type AppLogAction string
const ( AppLogActionDelete AppLogAction = "delete" AppLogActionManuallyDelete AppLogAction = "manual_delete" )
type AppNode ¶
type AppNode struct { Id int `json:"id" gorm:"not null;column:id"` // id类型? AppName string `json:"app_name" gorm:"not null;column:app_name"` Aid int `json:"aid" gorm:"not null;column:aid"` // id类型? HostName string `json:"host_name" gorm:"not null;column:host_name"` Ip string `json:"ip" gorm:"not null;column:ip"` DeviceID int `json:"device_id" gorm:"not null;column:device_id"` Env string `json:"env"gorm:"not null"` RegionCode string `json:"region_code"gorm:"not null"` RegionName string `json:"region_name"gorm:"not null"` ZoneCode string `json:"zone_code"gorm:"not null"` ZoneName string `json:"zone_name"gorm:"not null"` CreateTime int64 `gorm:"not null;"json:"create_time"` UpdateTime int64 `gorm:"not null;"json:"update_time"` }
type AppNodeAgentView ¶
type AppNodeInfo ¶
type AppNodeInfoLog ¶
type AppNodeInfoLog struct { Id int `json:"id" gorm:"column:id"` // id类型? AppName string `json:"app_name" gorm:"column:app_name"` Aid int `json:"aid" gorm:"column:aid"` // id类型? ZoneCode string `json:"zone_code" gorm:"column:zone_code"` // id类型? NodeKey string `json:"node_key" gorm:"column:node_key"` BuildTime string `json:"build_time" gorm:"column:build_time"` HostName string `json:"host_name" gorm:"column:host_name"` Pid int `json:"pid" gorm:"column:pid"` // id类型? UpdateTime int64 `json:"update_time" gorm:"column:update_time"` // 时间类型? VcsInfo string `json:"vcs_info" gorm:"column:vcs_info"` CreatedAt int64 `json:"created_at" gorm:"column:created_at"` UserName string `json:"user_name" gorm:"column:user_name"` Action string `json:"action" gorm:"column:action"` }
func (*AppNodeInfoLog) TableName ¶
func (t *AppNodeInfoLog) TableName() string
type AppNodeMap ¶
type AppNodeMap struct { ID int `json:"id"` Aid int `json:"aid"` AppName string `json:"app_name"` MD5 string `json:"md5"` // 由md5(app_name+deviceIDs) }
func (*AppNodeMap) TableName ¶
func (a *AppNodeMap) TableName() string
type AppPackage ¶
type AppPackage struct { Id int `json:"id" gorm:"not null;column:id"` // id类型? Aid int `json:"aid" gorm:"not null;column:aid"` // id类型? Name string `json:"name" gorm:"not null;column:name"` Branch string `json:"branch" gorm:"not null;column:branch"` Version string `json:"version" gorm:"not null;column:version"` Revision string `json:"revision" gorm:"not null;column:revision"` Packages string `json:"packages" gorm:"not null;type:text"` UpdateTime int64 `json:"updateTime" gorm:"not null;column:update_time"` // 时间类型? }
AppPackage ...
type AppRegInfoLog ¶
type AppRegInfoLog struct { Id int `json:"id" gorm:"column:id"` // id类型? Aid int `json:"aid" gorm:"column:aid"` // id类型? AppName string `json:"app_name" gorm:"column:app_name"` IdcId int `json:"idc_id" gorm:"column:idc_id"` // id类型? RegKey string `json:"reg_key" gorm:"column:reg_key"` KeyStatus string `json:"key_status" gorm:"column:key_status"` Addr string `json:"addr" gorm:"column:addr"` Ip string `json:"ip" gorm:"column:ip"` Port string `json:"port" gorm:"column:port"` CreatedAt int `json:"created_at" gorm:"column:created_at"` UserName string `json:"user_name" gorm:"column:user_name"` Action string `json:"action" gorm:"column:action"` }
节点操作日志
func (*AppRegInfoLog) TableName ¶
func (t *AppRegInfoLog) TableName() string
type AppStatics ¶
type AppStatics struct { Aid int `gorm:"not null;"json:"aid"` AppName string `gorm:"not null;"json:"appName"` GitPush int `gorm:"not null;"json:"gitPush"` GitTagPush int `gorm:"not null;"json:"gitTagPush"` GitIssue int `gorm:"not null;"json:"gitIssue"` GitMergeRequest int `gorm:"not null;"json:"gitMergeRequest"` GitWikiPage int `gorm:"not null;"json:"gitWikiPage"` GitPipeline int `gorm:"not null;"json:"gitPipeline"` GitJob int `gorm:"not null;"json:"gitJob"` CmcCreate int `gorm:"not null;"json:"cmcCreate"` CmcUpdate int `gorm:"not null;"json:"cmcUpdate"` CmcDelete int `gorm:"not null;"json:"cmcDelete"` AppCreate int `gorm:"not null;"json:"appCreate"` AppUpdate int `gorm:"not null;"json:"appUpdate"` AppDelete int `gorm:"not null;"json:"appDelete"` NodeCreate int `gorm:"not null;"json:"nodeCreate"` NodeUpdate int `gorm:"not null;"json:"nodeUpdate"` NodeDelete int `gorm:"not null;"json:"nodeDelete"` PprofCreate int `gorm:"not null;"json:"pprofCreate"` DevopsUpdate int `gorm:"not null;"json:"devopsUpdate"` DevopsRegister int `gorm:"not null;"json:"devopsRegister"` DevopsUnregister int `gorm:"not null;"json:"devopsUnregister"` DevopsStart int `gorm:"not null;"json:"devopsStart"` DevopsRestart int `gorm:"not null;"json:"devopsRestart"` DevopsStop int `gorm:"not null;"json:"devopsStop"` DevopsDeploy int `gorm:"not null;"json:"devopsDeploy"` DevopsRollback int `gorm:"not null;"json:"devopsRollback"` UpdatedAt time.Time `gorm:""json:"updatedAt"` CreatedAt time.Time `gorm:""json:"createdAt"` }
func (AppStatics) TableName ¶
func (AppStatics) TableName() string
type AppTopology ¶
type AppTopology struct { Id int `gorm:"not null;"json:"id"` Aid int `gorm:"not null;"json:"aid"` AppName string `gorm:"not null;"json:"app_name"query:"app_name"` RegionCode string `gorm:"not null;"json:"region_code"query:"region_code"` ZoneCode string `gorm:"not null;"json:"zone_code"query:"zone_code"` Env string `gorm:"not null;"json:"env"query:"env"` FileName string `gorm:"not null;"json:"file_name"` Addr string `gorm:"not null;"json:"addr"query:"addr"` Ip string `gorm:"not null;"json:"ip"` Port string `gorm:"not null;"json:"port"` Name string `gorm:"not null;"json:"name"query:"name"` Type string `gorm:"not null;"json:"type"` Info string `gorm:"not null;"json:"info"` UpdateTime int64 `gorm:"not null;"json:"update_time"` UpdatedBy int `gorm:"not null;"json:"updated_by"` Extra string `gorm:"not null;type:text"json:"extra"` }
AppTopology ...
func (*AppTopology) String ¶
func (t *AppTopology) String() string
type AppUserRelation ¶
type AppUserRelation struct { Id int `json:"id" gorm:"not null;column:id"` // id类型? AppName string `json:"appName" gorm:"not null;column:app_name"` UserName string `json:"userName" gorm:"not null;column:user_name"` UpdatedAt int64 `json:"updatedAt" gorm:"not null;column:updated_at"` }
func (*AppUserRelation) TableName ¶
func (t *AppUserRelation) TableName() string
type AppViewHistory ¶
type AppViewHistory struct { gorm.Model Uid uint `json:"uid"` Aid uint `json:"aid"` AppName string `json:"appName"` }
AppViewHistory 应用浏览历史记录
func (AppViewHistory) TableName ¶
func (AppViewHistory) TableName() string
type Board ¶
type Board struct { Id int `gorm:"not null;"json:"id"` Name string `gorm:"not null;"json:"name"` Src string `gorm:"not null;"json:"src"` MetaData MetaData `gorm:"not null;type:json"json:"metaData"` IsEnable bool `gorm:"not null;"json:"isEnable"` IsCommon bool `gorm:"not null;"json:"isCommon"` CreatedAt int64 `gorm:"not null;"json:"createdAt"` UpdatedAt int64 `gorm:"not null;"json:"updatedAt"` DeletedAt *time.Time `gorm:"index"json:"deletedAt"` }
大盘信息表 ...
type BoardAuth ¶
type ChangeLog ¶
type ChangeLog struct { Add []string `json:"A"` Delete []string `json:"D"` Modify []string `json:"M"` Replace []string `json:"R"` }
变化文件状态集合
type CmcApp ¶
type CmcApp struct { Id int `json:"id" gorm:"column:id"` Aid int `json:"aid" gorm:"column:aid"` AppName string `json:"app_name" gorm:"column:app_name"` FileName string `json:"file_name" gorm:"column:file_name"` ZoneCode string `json:"idc_code"` Env string `json:"env"` Format model.ConfigFormat `json:"format" gorm:"column:format"` Language model.ConfigLanguage `json:"language" gorm:"column:language"` NativeText string `json:"native_text"` NativeTime int64 `json:"native_time"` UpdateTime int64 `json:"update_time" gorm:"column:update_time"` CreateTime int64 `json:"create_time" gorm:"column:create_time"` }
type CmcAppLog ¶
type CmcAppLog struct { Id int `json:"id"` Caid int `json:"caid"` Aid int `json:"aid"` AppName string `json:"app_name"` FileName string `json:"file_name"` ZoneCode string `json:"idc_code"` Toml string `json:"toml" gorm:"type:longtext"` OriginToml string `json:"origin_toml" gorm:"type:longtext"` OpType int `json:"op_type"` OpTime int64 `json:"op_time"` OpName string `json:"op_name"` Env string `json:"env"` }
type CmcAppView ¶
type CmcAppView struct { Id int `json:"id" gorm:"column:id"` Aid int `json:"aid" gorm:"column:aid"` FileName string `json:"file_name" gorm:"column:file_name"` ZoneCode string `json:"zone_code"` Env string `json:"env"` Format model.ConfigFormat `json:"format" gorm:"column:format"` Language model.ConfigLanguage `json:"language" gorm:"column:language"` AppName string `json:"app_name"` Name string `json:"name"` WebUrl string `json:"web_url"` UpdateTime int64 `json:"update_time"` Lang string `json:"lang"` Create bool `json:"create"` Envs []string `json:"envs"` CreateTime int64 `json:"create_time"` }
type CmcConfig ¶
type CmcConfig struct { Id uint64 `gorm:"column:id" json:"id" form:"id"` Caid int `gorm:"column:caid" json:"caid" form:"caid"` Prefix string `gorm:"column:prefix" json:"prefix"` Key string `gorm:"column:key" json:"key"` Value string `gorm:"type:longtext" json:"value"` ResourceID int `gorm:"column:resource_id" json:"resource_id"` IsResource int `gorm:"column:is_resource" json:"is_resource"` // 1是资源 0不是 IsWatch int `gorm:"column:is_watch" json:"is_watch"` Status model.ItemStatus `json:"status"` UpdateTime int64 `json:"update_time"` OpName string `json:"op_name"` DiffKey string `json:"diff_key" gorm:"column:diff_key"` }
CmcConfig表cmc_config的机构
type CmcConfigLog ¶
type CmcConfigLog struct { Id int `json:"id" gorm:"column:id"` Caid int `gorm:"column:caid" json:"caid" form:"caid"` Key string `json:"key" gorm:"column:key"` OldValue string `json:"old_value" gorm:"type:longtext"` NewValue string `json:"new_value" gorm:"type:longtext"` OpType model.ItemLogStatus `json:"op_type" gorm:"column:op_type"` UpdateTime int64 `json:"update_time" gorm:"column:update_time"` OpName string `json:"op_name" gorm:"column:op_name"` }
CmcConfigLog表cmc_config_log的结构
func (*CmcConfigLog) TableName ¶
func (t *CmcConfigLog) TableName() string
type CmcHistory ¶
type CmcHistory struct { Id int `gorm:"column:id" json:"id"` Caid int `json:"caid"` Aid int `gorm:"column:aid" json:"aid"` AppName string `json:"app_name" gorm:"column:app_name"` ZoneCode string `gorm:"column:zone_code" json:"zone_code"` Env string `gorm:"column:env" json:"env"` FileName string `gorm:"column:file_name" json:"file_name"` Md5 string `gorm:"column:md5" json:"md5"` EffectMd5 string `gorm:"column:effect_md5" json:"effect_md5"` Text string `gorm:"type:longtext" json:"toml"` Message string `json:"message"` CreateTime int64 `gorm:"column:create_time" json:"create_time"` OpName string `json:"op_name"` OriginText string `gorm:"type:longtext" json:"origin_toml"` ApplyInstance string `json:"apply_instance"` FilePath string `json:"file_path"` }
CmcHistory ...
func (CmcHistory) TableName ¶
func (c CmcHistory) TableName() string
type CmcHistoryItem ¶
type CmcHistoryItem struct { Id int `gorm:"column:id" json:"id"` Caid int `json:"caid"` KeyId int `gorm:"column:key_id" json:"key_id"` CmcHistoryId int `gorm:"column:cmc_history_id" json:"cmc_history_id"` Aid int `gorm:"column:aid" json:"aid"` AppName string `json:"app_name" gorm:"column:app_name"` ZoneCode string `gorm:"column:idc_code" json:"idc_code"` Env string `gorm:"column:env" json:"env"` Key string `gorm:"column:key" json:"key"` Value string `gorm:"type:longtext" json:"toml"` CreateTime int64 `gorm:"column:create_time" json:"create_time"` OpName string `json:"op_name"` }
CmcHistoryItem ...
func (CmcHistoryItem) TableName ¶
func (c CmcHistoryItem) TableName() string
type CmcPublishLog ¶
type CmcPublishLog struct { Id int `json:"id" gorm:"column:id"` // id类型? HistoryId int `json:"history_id" gorm:"column:history_id"` // id类型? Type int `json:"type" gorm:"column:type"` CreateTime int64 `json:"create_time" gorm:"column:create_time"` DiffText string `json:"diff_text" gorm:"type:longtext"` }
CmcPublishLog表cmc_publish_log的结构
func (*CmcPublishLog) TableName ¶
func (t *CmcPublishLog) TableName() string
type CmcResource ¶
type CmcResource struct { Id uint64 `gorm:"column:id" json:"id"` Name string `gorm:"column:name" json:"name"` ZoneCode string `gorm:"column:idc_code" json:"idc_code"` Env string `gorm:"column:env" json:"env"` Type string `gorm:"column:type" json:"type"` Value string `gorm:"column:value" json:"value"` ValueType string `gorm:"column:value_type" json:"value_type"` Desc string `json:"desc"` UpdateTime int64 `gorm:"column:update_time" json:"update_time"` CreateTime int64 `json:"create_time"` OpName string `json:"op_name"` IsShow int64 `json:"is_show"` // '是否展示:1展示 2不展示', IsCommon int64 `json:"is_common"` // '是否是公共资源:1是 2不是' }
CmcResource表cmc_resource的结构
func (*CmcResource) TableName ¶
func (r *CmcResource) TableName() string
type CmcResourceItem ¶
type CmcResourceItem struct { CmcResource DepNum int `json:"dep_num"` }
CmcResource表cmc_resource的结构
type CmcTpl ¶
type CmcTpl struct { Id int `gorm:"not null;primary_key;AUTO_INCREMENT"json:"id"` TplType string `gorm:"not null;"json:"tpl_type";query:"tpl_type"` Content string `gorm:"not null;type:longtext"json:"content"` CreateTime int64 `gorm:"not null;"json:"create_time"` UpdateTime int64 `gorm:"not null;"json:"update_time"` }
type CmcUseStatus ¶
type CmcUseStatus struct { Id int `json:"id" gorm:"column:id"` Aid int32 `json:"aid" gorm:"column:aid"` // aid Caid int `json:"caid" gorm:"column:caid"` AppName string `json:"app_name" gorm:"column:app_name"` Hostname string `json:"hostname" gorm:"column:hostname"` Env string `json:"env" gorm:"column:env"` ZoneCode string `json:"zone_code" gorm:"column:zone_code"` Content string `json:"content" gorm:"column:content"` Extra string `json:"extra" gorm:"column:extra"` IsUse int `json:"is_use" gorm:"column:is_use"` UseTyp string `json:"use_typ" gorm:"column:use_typ"` }
func (*CmcUseStatus) TableName ¶
func (t *CmcUseStatus) TableName() string
type CmdbSyncLog ¶
type CmdbSyncLog struct { ID int `gorm:"primary_key" json:"id"` Aid int `json:"aid"` // 项目id Uid int `json:"uid"` // juno用户id Log string `json:"log"` // 日志明细 CreateTime int64 `json:"create_time"` }
发布环境
type CommitChange ¶
CommitChange ...
type ConfigData ¶
type ConfigDiffData ¶
type ConfigStatus ¶
type ConfigStatus struct { FileName string `json:"file_name"` Md5 string `json:"md5"` Hostname string `json:"hostname"` ZoneCode string `json:"idc_code"` Timestamp int64 `json:"timestamp"` EffectMD5 string `json:"effect_md5"` Env string `json:"env"` IP string `json:"ip"` HealthPort string `json:"health_port"` }
type ConfigVal ¶
type ConfigVal struct { ID int `json:"id"` Value string `json:"value"` IsResource bool `json:"is_resource"` ResourceID int `json:"resource_id"` Prefix string `json:"prefix"` Type string `json:"type"` Status model.ItemStatus `json:"status"` Comment string `json:"comment"` SourceTyp int `json:"source_typ"` }
type DeployInstance ¶
type DeployInstance struct { HostName string `json:"hostname"` MD5 string `json:"md5"` Timestamp int64 `json:"timestamp"` PubId int `json:"pub_id"` Message string `json:"message"` IsLatest bool `json:"is_latest"` IsUse bool `json:"is_use"` IsEffect bool `json:"is_effect"` Params string `json:"params"` ZoneCode string `json:"idc_code"` ProcessStartTime int64 `json:"process_start_time"` }
type EtcdInstance ¶
type FlowContainer ¶
type FlowContainer struct { ID uint `gorm:"primary_key"` FlowID int `json:"flow_id"` K8sDid int `json:"k8s_did"` }
FlowContainer ...
type GitlabEvent ¶
type GitlabEvent struct { Gid int // project id Uid int UserName string UserEmail string UserAvatar string Refs string Id int Changes string CreateTime int }
GitlabEvent ...
type GitlabEventList ¶
type GitlabEventList struct { Gid int `json:"gid"` // project id UserName string `json:"userName" gorm:"user_name"` Changes string }
GitlabEventList ...
type GovernConfigData ¶
type GovernConfigData struct { Config struct { Enable bool `json:"enable"` Weight int32 `json:"weight"` Group string `json:"group"` } `json:"config"` }
func (*GovernConfigData) JsonString ¶
func (v *GovernConfigData) JsonString() string
type GovernRegData ¶
type GrafanaAlertNotification ¶
type GrafanaAlertNotification struct { Id int `json:"id"` OrgId int `json:"org_id"` Name string `json:"name"` Type string `json:"type"` Settings string `json:"settings"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` IsDefault bool `json:"is_default"` Frequency int `json:"frequency"` SendReminder bool `json:"send_reminder"` Uid string `json:"uid"` DisableResolveMessage bool `json:"disable_resolve_message"` }
func (GrafanaAlertNotification) TableName ¶
func (GrafanaAlertNotification) TableName() string
type GrafanaOrgUser ¶
type GrafanaOrgUser struct { ID int `json:"id"` OrgID int `json:"org_id"` UserID int `json:"user_id"` Role string `json:"role"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` }
GrafanaOrgUser ...
type GrafanaTeam ¶
type GrafanaTeam struct { ID int Name string OrgID int Created time.Time Updated time.Time Email string }
GrafanaTeam ...
type GrafanaTeamMember ¶
type GrafanaTeamMember struct { ID int OrgID int TeamID int UserID int Created time.Time Updated time.Time External int }
GrafanaTeamMember ...
type GrafanaUser ¶
type GrafanaUser struct { Id int64 Login string Email string OrgId int IsAdmin int Created time.Time Updated time.Time HelpFlags1 int Version int }
GrafanaUser ...
type IdcSrv ¶
type IdcSrv struct { Id int `json:"id" gorm:"column:id"` // id类型? ZoneCode string `json:"idc_code" gorm:"column:idc_code"` // id类型? SrvType int `json:"srv_type" gorm:"column:srv_type"` SrvConfig string `json:"srv_config" gorm:"column:srv_config"` CreateTime int64 `json:"create_time" gorm:"column:create_time"` // 时间类型? UpdateTime int64 `json:"update_time" gorm:"column:update_time"` // 时间类型? CreatedBy int `json:"created_by" gorm:"column:created_by"` UpdatedBy int `json:"updated_by" gorm:"column:updated_by"` }
type ListProviderEvents ¶
type ListProviderEvents struct { Events []ProviderRegisterEvent `json:"events"` NextCursor string `json:"nextCursor"` }
type ListProviderEventsReq ¶
type ListProviderEventsReq struct { Cursor string `json:"cursor"` Number int `json:"num"` Type RegisterType }
type ListProviderEventsResp ¶
type ListProviderEventsResp struct { Code int `json:"code"` Msg string `json:"msg"` Data ListProviderEvents `json:"data"` }
type MetaData ¶
type Node ¶
type Node struct { Id int `gorm:"not null;"json:"id"` HostName string `gorm:"not null;"json:"host_name" ` Ip string `json:"ip" gorm:"not null;column:ip"` CreateTime int64 `gorm:"not null;"json:"create_time"` UpdateTime int64 `gorm:"not null;"json:"update_time"` HeartbeatTime int64 `gorm:"not null;"json:"heartbeat_time"` Env string `gorm:"not null;"json:"env"` RegionCode string `json:"region_code"gorm:"not null"` RegionName string `json:"region_name"gorm:"not null"` ZoneCode string `json:"zone_code"gorm:"not null"` ZoneName string `json:"zone_name"gorm:"not null"` NodeType int `gorm:"not null;"json:"node_type"` // 1为接口,2为后台添加,3为juno agent AgentType int `gorm:"not null;"json:"agent_type"` // agent类型 AgentVersion string `gorm:"not null;"json:"agent_version"` // agent类型 }
node节点,可以由juno agent进行上报,也可以由接口进行上报
type NodeStatus ¶
type OpsSupervisorConfig ¶
type Option ¶
type Option struct { Id int `gorm:"not null;primary_key;AUTO_INCREMENT"json:"optionId"` OptionTitle string `gorm:"not null;"json:"optionTitle"` OptionName string `gorm:"not null;"json:"optionName"` OptionValue string `gorm:"not null;"json:"optionValue"` CreateTime int64 `gorm:"not null;comment:'创建时间'" json:"create_time"` UpdateTime int64 `gorm:"not null;comment:'更新时间'"json:"update_time"` }
Option struct .
type PProf ¶
type PProf struct { ID int `gorm:"not null;primary_key" json:"id"` Type string `gorm:"not null;"json:"type"` SceneId string `gorm:"not null;"json:"sceneId"` AppName string `gorm:"not null;"json:"appName"` // 项目id Aid int `gorm:"not null;"json:"aid"` // 项目id FileInfo string `gorm:"not null;"json:"fileInfo"` // 环境类型名称 ZoneCode string `gorm:"not null;"json:"zone_code"` // 环境类型 Env string `gorm:"not null;"json:"env"` // 环境类型 Ext string `gorm:"not null;"json:"ext"` Remark string `gorm:"not null;"json:"remark"` HostName string `gorm:"not null;"json:"hostName"` CreateTime int64 `gorm:""json:"create_time"` UpdateTime int64 `gorm:""json:"update_time"` DeleteTime int64 `gorm:"index"json:"delete_time"` PprofList []PprofInfo `gorm:"-"json:"pprofList"` }
发布环境
type PProfFileInfo ¶
type PProfOssFile ¶
type PProfReqList ¶
type PProfViewModel ¶
type Proto ¶
type Proto struct { Id int `gorm:"not null;"json:"id"` FileName string `gorm:"not null;"json:"fileName"` AppName string `gorm:"not null;"json:"appName"` ServiceName string `gorm:"not null;"json:"serviceName"` MethodName string `gorm:"not null;"json:"methodName"` PackageName string `gorm:"not null;"json:"packageName"` InputName string `gorm:"not null;"json:"inputName"` InputType ProtoFields `gorm:"not null;type:json"json:"inputType"` InputParamTmpl string `gorm:"not null;"json:"inputParamTmpl"` OutputName string `gorm:"not null;"json:"outputName"` OutputType ProtoFields `gorm:"not null;type:json"json:"outputType"` Extra string `gorm:"not null;"json:"extra"` CreatedAt time.Time `gorm:""json:"createdAt"` UpdatedAt time.Time `gorm:""json:"updatedAt"` DeletedAt *time.Time `gorm:""json:"deletedAt"` }
type ProtoFields ¶
type ProtoFields map[string]ProtoInputField
map: 字段名 => 类型描述
func (*ProtoFields) Scan ¶
func (c *ProtoFields) Scan(input interface{}) error
type ProtoInputField ¶
type ProviderRegisterEvent ¶
type ProviderRegisterEvent struct { Model AppName string `json:"appName"` Schema string `json:"schema"` Address string `json:"address"` Type RegisterType `json:"type"` }
type RegAllData ¶
type RegAllData struct { Register ServerRegData `json:"register"` Config ServerConfigData `json:"config"` }
type RegInfoOutPut ¶
type RegisterType ¶
type RegisterType int8
type ReqProfile ¶
type ReqSysConfig ¶
type ServerConfigData ¶
type ServerConfigData struct { ConfigKey string `json:"config_key"` ConfigValue GovernConfigData `json:"config_value"` }
type ServerRegData ¶
type ServerRegData struct { RegKey string `json:"reg_key"` RegValue GovernRegData `json:"reg_value"` }
type SystemConfig ¶
type SystemConfig struct { Id int `gorm:"not null;"json:"id"` SysType int `gorm:"not null;column:sys_type" json:"sysType" ` SetStr string `json:"setStr" gorm:"not null;column:set_str"` SetInt int `json:"setInt" gorm:"not null;column:set_int"` CreateTime int64 `gorm:"not null;"json:"create_time"` UpdateTime int64 `gorm:"not null;"json:"update_time"` }
func (SystemConfig) TableName ¶
func (SystemConfig) TableName() string
type ToolInfo ¶
type ToolInfo struct { Id uint64 `gorm:"not null;primary_key;comment:'id'"` Name string `gorm:"not null;comment:'工具名'"json:"name"` Url string `gorm:"not null;comment:'工具地址'"json:"url"` PicUrl string `gorm:"not null;comment:'图片地址'"json:"picUrl"` Desc string `gorm:"not null;comment:'工具描述'"json:"desc"` CreateTime int64 `gorm:"not null;comment:'创建时间'"json:"createTime"` }
ToolInfo ...
type User ¶
type User struct { Uid int `gorm:"not null;primary_key;AUTO_INCREMENT"json:"uid"` Oaid int `gorm:"not null;comment:'oa uid'"json:"id"` Username string `gorm:"not null;comment:'用户名'"json:"username"` Nickname string `gorm:"not null;comment:'昵称'"json:"nickname"` Token string `gorm:"not null;comment:'token信息'"json:"token"` Secret string `gorm:"not null;comment:'秘钥'"json:"secret"` Email string `gorm:"not null;comment:'email'"json:"email"` Avatar string `gorm:"not null;comment:'avatart'"json:"avatar"` WebUrl string `gorm:"not null;comment:'注释'"json:"webUrl"` State string `gorm:"not null;comment:'注释'"json:"state"` Hash string `gorm:"not null;comment:'注释'"json:"hash"` CreateTime int64 `gorm:"not null;comment:'注释'"json:"createTime"` UpdateTime int64 `gorm:"not null;comment:'注释'"json:"updateTime"` Password string `gorm:"not null;comment:'注释'"json:"password"` // open source user data CurrentAuthority string `json:"currentAuthority"` Access string `json:"access"` // contains filtered or unexported fields }
swagger:model user
func (*User) TransformUserInfo ¶
type UserInfo ¶
type UserInfo struct { // the id for this user. // // required: true // oa uid Oaid int `json:"oaid"` // gitlab uid Uid int `json:"uid"` // Login is the username for this user. // // required: true Username string `json:"username"` Nickname string `json:"nickname"` // Token is the oauth2 token. Token string `json:"token"` // Secret is the oauth2 token secret. Secret string `json:"secret"` // Email is the email address for this user. // required: true Email string `json:"email"` // the avatar url for this user. Avatar string `json:"avatarUrl"` WebUrl string `json:"webUrl"` State string `json:"state"` // Hash is a unique token used to sign tokens. Hash string `json:"hash"` // DEPRECATED Admin indicates the user is a system administrator. CreateTime int64 `json:"create_time"` UpdateTime int64 `json:"update_time"` Authenticated bool `form:"-" db:"-" json:"-"` Access string `json:"access"` }
UserInfo ...
type UserNameJson ¶
type UserNameJson []string
func (*UserNameJson) Scan ¶
func (c *UserNameJson) Scan(input interface{}) error
type UserRelation ¶
type UserRelation struct { ID int `gorm:"not null;comment:'注释'"json:"id"` Uid int `gorm:"not null;comment:'注释'"json:"uid"` Bid int `gorm:"not null;comment:'注释'"json:"bid"` Type int `gorm:"not null;comment:'注释'"json:"type"` CreateTime int64 `gorm:"not null;comment:'注释'"json:"createTime"` UpdateTime int64 `gorm:"not null;comment:'注释'"json:"updateTime"` DeleteTime int64 `gorm:"not null;comment:'注释'"json:"deleteTime"` }
UserRelation for relation between user and other cases
type UserVisitedApp ¶
type Zone ¶
type Zone struct { Id int `gorm:"not null;comment:'注释'"json:"id"` Env string `json:"env"gorm:"not null"` RegionCode string `json:"region_code"gorm:"not null"` RegionName string `json:"region_name"gorm:"not null"` ZoneCode string `json:"zone_code"gorm:"not null"` ZoneName string `json:"zone_name"gorm:"not null"` CreateTime int64 `gorm:"not null;comment:'注释'"json:"create_time"` UpdateTime int64 `gorm:"not null;comment:'注释'"json:"update_time"` CreatedBy int `gorm:"not null;comment:'注释'"json:"created_by"` UpdatedBy int `gorm:"not null;comment:'注释'"json:"updated_by"` }
Zone ...
Source Files ¶
- app.go
- appConfig.go
- appContainer.go
- appData.go
- appLog.go
- appNode.go
- appViewHistory.go
- app_event.go
- app_package.go
- app_statics.go
- board.go
- cmc.go
- cmdbSyncLog.go
- common.go
- config_tpl.go
- gitlabEvent.go
- governEvent.go
- grafana.go
- idcSrv.go
- node.go
- opsSupervisorConfig.go
- options.go
- pprof.go
- register.go
- system_config.go
- themisProto.go
- tool.go
- user.go
- userRelation.go
- userVisitedApp.go
- zone.go