db

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	K8sPub = int(iota)
	K8sRestart
	K8sStop
	K8sStatus
)

K8sPub ...

View Source
const (
	Redis = iota + 1
	Memcache
	Mongo
	MySQL
	RPC
	Nginx
	PHP
	LUA
	GO
	JAVA
	PYTHON
	FED
	FLASH
	CPP
)

语言类型常量

View Source
const (
	OTHERLv = iota
	ProxyLv
	AppLv
	GateWayLv
	ServiceLv
	DataLv
)

架构层级

View Source
const (
	EventSystem   = "system"   // 系统触发,正常用户点击发布
	EventRollback = "rollback" // 回滚事件
	EventWebHook  = "webhook"  // 由gitlab事件触发的统一为webhook事件,如有需要再细分
	EventPush     = "push"
	EventPull     = "pull_request"
	EventTag      = "tag"
)

EventSystem ...

View Source
const (
	StatusInit     = 0
	StatusSuccess  = 1
	StatusRunning  = 2
	StatusPending  = 3
	StatusSkipped  = 4
	StatusFailure  = 5
	StatusCanceled = 6
)

StatusInit ...

View Source
const (
	GoPkgToml = "/Gopkg.lock"
)

GoPkgToml ...

Variables

View Source
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 语言类型数组映射

View Source
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 AppCmcStat struct {
	Env string `json:"env"`
	Cnt int    `json:"cnt"`
}

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

func (AppContainer) TableName

func (AppContainer) TableName() string

TableName ...

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

func (AppData) TableName

func (AppData) TableName() string

TableName ...

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()

func (*AppEvent) TableName

func (a *AppEvent) TableName() string

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

func (*AppInfo) MD5String

func (a *AppInfo) MD5String() string

func (AppInfo) TableName

func (AppInfo) TableName() string

TableName ...

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

func (AppLog) TableName

func (AppLog) TableName() string

TableName ...

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"`
}

func (*AppNode) TableName

func (t *AppNode) TableName() string

type AppNodeAgentView

type AppNodeAgentView struct {
	HostName string `json:"host_name"`
	IpPort   string `json:"ip"`
}

type AppNodeInfo

type AppNodeInfo struct {
	HostName   string `json:"host_name"`
	CreateTime int64  `json:"create_time"`
	UpdateTime int64  `json:"update_time"`
}

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

func (*AppPackage) TableName

func (t *AppPackage) TableName() string

TableName ...

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

func (AppTopology) TableName

func (AppTopology) TableName() string

TableName ...

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"`
}

大盘信息表 ...

func (*Board) TableName

func (t *Board) TableName() string

type BoardAuth

type BoardAuth struct {
	Id        int   `gorm:"not null;"json:"id"`
	Did       int   `gorm:"not null;"json:"did"`
	Uid       int   `gorm:"not null;"json:"uid"`
	CreatedAt int64 `gorm:"not null;"json:"createdAt"`
}

func (*BoardAuth) TableName

func (t *BoardAuth) TableName() string

type ChangeLog

type ChangeLog struct {
	Add     []string `json:"A"`
	Delete  []string `json:"D"`
	Modify  []string `json:"M"`
	Replace []string `json:"R"`
}

变化文件状态集合

func (*ChangeLog) ToString

func (c *ChangeLog) ToString() string

ToString ...

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"`
}

func (*CmcApp) TableName

func (t *CmcApp) TableName() string

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 CmcCnt

type CmcCnt struct {
	DayTime string `json:"day_time" gorm:"day_time"`
	Cnt     int    `gorm:"cnt"json:"cnt"`
}

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的机构

func (CmcConfig) TableName

func (c CmcConfig) TableName() string

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"`
}

func (CmcTpl) TableName

func (CmcTpl) TableName() string

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"`
}

发布环境

func (CmdbSyncLog) TableName

func (CmdbSyncLog) TableName() string

TableName 表名

type CommitChange

type CommitChange struct {
	Before string
	After  string
	Ref    string
}

CommitChange ...

type ConfigData

type ConfigData struct {
	Key string `json:"key"`
	ConfigVal
}

type ConfigDiffData

type ConfigDiffData struct {
	Key    string `json:"key"`
	OldVal string `json:"old_val"`
	NewVal string `json:"new_val"`
	OpType string `json:"op_type"`
}

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 DiffText

type DiffText struct {
	PreContent    string `json:"pre_content"`
	Content       string `json:"content"`
	CommonContent string `json:"common_content"`
}

type EtcdInstance

type EtcdInstance struct {
	Host      string `json:"host"`
	MD5       string `json:"md5"`
	EffectMD5 string `json:"effect_md5"`
	Timestamp int64  `json:"timestamp"`
	Params    string `json:"params"`
	ZoneCode  string `json:"idc_code"`
}

type FlowContainer

type FlowContainer struct {
	ID     uint `gorm:"primary_key"`
	FlowID int  `json:"flow_id"`
	K8sDid int  `json:"k8s_did"`
}

FlowContainer ...

func (FlowContainer) TableName

func (FlowContainer) TableName() string

TableName ...

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

func (GitlabEvent) TableName

func (GitlabEvent) TableName() string

TableName ...

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 GovernRegData struct {
	Name    string                 `json:"name"`
	Schema  string                 `json:"schema"`
	Address string                 `json:"address"`
	Labels  map[string]interface{} `json:"labels"`
}

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

func (GrafanaOrgUser) TableName

func (GrafanaOrgUser) TableName() string

TableName ...

type GrafanaTeam

type GrafanaTeam struct {
	ID      int
	Name    string
	OrgID   int
	Created time.Time
	Updated time.Time
	Email   string
}

GrafanaTeam ...

func (GrafanaTeam) TableName

func (GrafanaTeam) TableName() string

TableName ...

type GrafanaTeamMember

type GrafanaTeamMember struct {
	ID       int
	OrgID    int
	TeamID   int
	UserID   int
	Created  time.Time
	Updated  time.Time
	External int
}

GrafanaTeamMember ...

func (GrafanaTeamMember) TableName

func (GrafanaTeamMember) TableName() string

TableName ...

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

func (GrafanaUser) TableName

func (GrafanaUser) TableName() string

TableName ...

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"`
}

func (*IdcSrv) TableName

func (t *IdcSrv) TableName() string

type IdcSrvPub

type IdcSrvPub struct {
	Addr     string `json:"addr"`
	UserName string `json:"username"`
	Password string `json:"password"`
}

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 MetaData struct {
	Width      int `gorm:"not null;"json:"width"`
	Height     int `gorm:"not null;"json:"height"`
	MarginLeft int `gorm:"not null;"json:"marginLeft"`
	MarginTop  int `gorm:"not null;"json:"marginTop"`
}

func (*MetaData) Scan

func (c *MetaData) Scan(input interface{}) error

func (MetaData) Value

func (c MetaData) Value() (driver.Value, error)

type Model

type Model struct {
	ID        uint       `gorm:"primary_key" json:"id"`
	CreatedAt time.Time  `json:"createdAt"`
	UpdatedAt time.Time  `json:"updatedAt"`
	DeletedAt *time.Time `sql:"index" json:"deletedAt"`
}

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进行上报,也可以由接口进行上报

func (Node) TableName

func (Node) TableName() string

type NodeCnt

type NodeCnt struct {
	DayTime string `json:"day_time" gorm:"day_time"`
	Cnt     int    `gorm:"cnt"json:"cnt"`
}

type NodeStatus

type NodeStatus struct {
	IP        string `json:"ip"`
	HostName  string `json:"host_name"`
	StartTime string `json:"start_time"`
	KeyStatus string `json:"key_status"`
	Env       string `json:"env"`
}

type OpsSupervisorConfig

type OpsSupervisorConfig struct {
	ID           int    `gorm:"primary_key" json:"id"`
	Aid          int    // 项目ID
	AppName      string // 项目名称
	OpsAppName   string // 项目发布名称
	ZoneCode     string
	AccessKey    string // 接口公钥
	AccessSecret string // 接口私钥
	CreateTime   int64
	UpdateTime   int64
}

func (OpsSupervisorConfig) TableName

func (OpsSupervisorConfig) TableName() string

TableName 表名

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 .

func (Option) TableName

func (m Option) TableName() string

TableName 获取对应数据库表名.

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"`
}

发布环境

func (PProf) TableName

func (PProf) TableName() string

TableName 表名

type PProfFileInfo

type PProfFileInfo struct {
	Url      string `json:"url"`
	FileType string `json:"fileType"`
}

type PProfOssFile

type PProfOssFile struct {
	FileType    string `json:"fileType"`
	OriginalRid string `json:"originalRid"`
	OriginalMd5 string `json:"originalMd5"`
	Original    string `json:"original"`
}

type PProfReqList

type PProfReqList struct {
	ZoneCode string `form:"zoneCode"`
	AppName  string `form:"appName"`
	HostName string `form:"hostName"`
	Env      string `form:"env"`
}

type PProfViewModel

type PProfViewModel struct {
	PProf
	HostName string `json:"host_name"` // 主机名
}

type PprofInfo

type PprofInfo struct {
	Id   int    `json:"id"`
	Type string `json:"type"`
	Url  string `json:"url"`
}

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"`
}

func (Proto) TableName

func (Proto) TableName() string

type ProtoFields

type ProtoFields map[string]ProtoInputField

map: 字段名 => 类型描述

func (*ProtoFields) Scan

func (c *ProtoFields) Scan(input interface{}) error

func (ProtoFields) Value

func (c ProtoFields) Value() (driver.Value, error)

type ProtoInputField

type ProtoInputField struct {
	JsonName    string      `json:"jsonName"`
	Type        int32       `json:"type"`
	Label       int32       `json:"label"`
	Number      int32       `json:"number"`
	IsRepeated  bool        `json:"isRepeated"`
	MessageType ProtoFields `json:"messageType"`
}

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 RegInfoOutPut struct {
	ID         int    `json:"id"`
	AppName    string `json:"app_name"`
	HostName   string `json:"host_name"`
	RegIP      string `json:"ip" gorm:"column:ip"`
	RegKey     string `json:"reg_key"`
	UpdateTime string `json:"update_time"`
	StartTime  string `json:"start_time"`
	VcsInfo    string `json:"vcs_info"`
}

type RegisterType

type RegisterType int8

type ReqCheck

type ReqCheck struct {
	InstallType int `json:"installType"`
}

type ReqProfile

type ReqProfile struct {
	ZoneCode string `form:"zoneCode"`
	AppName  string `form:"appName"`
	HostName string `form:"hostName"`
	Env      string `form:"env"`
}

type ReqSysConfig

type ReqSysConfig struct {
	SysType int `json:"sys_type"`
	SetInt  int `json:"setInt"`
}

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

func (ToolInfo) TableName

func (ToolInfo) TableName() string

TableName ...

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) TableName

func (User) TableName() string

TableName 指定Menu结构体对应的表名

func (*User) TransformUserInfo

func (u *User) TransformUserInfo() UserInfo

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

func (UserNameJson) Value

func (c UserNameJson) Value() (driver.Value, 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

func (UserRelation) TableName

func (UserRelation) TableName() string

TableName ...

type UserVisitedApp

type UserVisitedApp struct {
	ID          int
	AppName     string `json:"app_name" gorm:"app_name"`
	UserName    string `json:"user_name" gorm:"user_name"`
	VisitedTime int64  `json:"visited_time" gorm:"column:visited_time"`
}

func (UserVisitedApp) TableName

func (UserVisitedApp) TableName() string

TableName ...

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

func (Zone) TableName

func (Zone) TableName() string

TableName 表名

Jump to

Keyboard shortcuts

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