model

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 3 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppCertificate

type AppCertificate struct {
	dbengine.BaseModel

	AppID         int64
	CertificateID int64
	ApprovalID    int64
	Status        string
	Operator      string
	PushConfig    string
}

AppCertificate 应用引用证书信息模型

func (AppCertificate) TableName

func (AppCertificate) TableName() string

TableName 设置模型对应数据库表名称

type BranchRule

type BranchRule struct {
	dbengine.BaseModel

	ScopeType         apistructs.ScopeType
	ScopeID           int64
	Rule              string
	IsProtect         bool
	IsTriggerPipeline bool
	NeedApproval      bool
	Desc              string //规则说明
	Workspace         string `json:"workspace"`
	ArtifactWorkspace string `json:"artifactWorkspace"`
}

func (BranchRule) TableName

func (BranchRule) TableName() string

TableName 设置模型对应数据库表名称

func (*BranchRule) ToApiData

func (rule *BranchRule) ToApiData() *apistructs.BranchRule

type Certificate

type Certificate struct {
	dbengine.BaseModel

	OrgID    int64
	Name     string
	Android  string
	Ios      string
	Message  string
	Type     string // IOS发布证书/Android证书/消息推送证书
	Desc     string
	Creator  string
	Operator string
}

Certificate 证书信息模型

func (Certificate) TableName

func (Certificate) TableName() string

TableName 设置模型对应数据库表名称

type Comment

type Comment struct {
	dbengine.BaseModel

	TicketID    int64
	CommentType apistructs.TCType
	Content     string               `gorm:"type:text"`
	IRComment   apistructs.IRComment `json:"irComment" gorm:"column:ir_comment;type:text"`
	UserID      string
}

Comment 工单评论模型

func (Comment) TableName

func (Comment) TableName() string

TableName 设置模型对应数据库表名称

type ConfigItem

type ConfigItem struct {
	ID           int64     `json:"id" gorm:"primary_key"`
	CreatedAt    time.Time `json:"createdAt" gorm:"column:create_time"`
	UpdatedAt    time.Time `json:"updatedAt" gorm:"column:update_time"`
	IsSync       bool      // deprecated
	Dynamic      bool      // deprecated
	Encrypt      bool      // deprecated
	DeleteRemote bool      // deprecated
	IsDeleted    string
	NamespaceID  uint64 `gorm:"index:namespace_id"`
	ItemKey      string
	ItemValue    string
	ItemComment  string
	ItemType     string // FILE, ENV
	Source       string
	Status       string // deprecated
}

ConfigItem 配置信息

func (ConfigItem) TableName

func (ConfigItem) TableName() string

TableName 设置模型对应数据库表名称

type ConfigNamespace

type ConfigNamespace struct {
	ID            int64     `json:"id" gorm:"primary_key"`
	CreatedAt     time.Time `json:"createdAt" gorm:"column:create_time"`
	UpdatedAt     time.Time `json:"updatedAt" gorm:"column:update_time"`
	Dynamic       bool
	IsDefault     bool
	IsDeleted     string
	Name          string
	Env           string `gorm:"index:env"`
	ProjectID     string `gorm:"index:project_id"`
	ApplicationID string `gorm:"index:application_id"`
	RuntimeID     string `gorm:"index:runtime_id"`
}

ConfigNamespace 配置信息

func (ConfigNamespace) TableName

func (ConfigNamespace) TableName() string

TableName 设置模型对应数据库表名称

type ConfigNamespaceRelation

type ConfigNamespaceRelation struct {
	ID               int64     `json:"id" gorm:"primary_key"`
	CreatedAt        time.Time `json:"createdAt" gorm:"column:create_time"`
	UpdatedAt        time.Time `json:"updatedAt" gorm:"column:update_time"`
	IsDeleted        string
	Namespace        string `gorm:"index:namespace"`
	DefaultNamespace string `gorm:"index:default_namespace"`
}

ConfigNamespaceRelation 配置信息

func (ConfigNamespaceRelation) TableName

func (ConfigNamespaceRelation) TableName() string

TableName 设置模型对应数据库表名称

type Publisher

type Publisher struct {
	dbengine.BaseModel

	Name          string // Publisher名称
	PublisherType string // Publisher类型
	PublisherKey  string // PublisherKey,可以作为唯一标示,主要用于监控
	Desc          string // Publisher描述
	OrgID         int64  // Publisher关联组织ID
	UserID        string `gorm:"column:creator"` // 所属用户Id
}

Publisher 资源模型

func (Publisher) TableName

func (Publisher) TableName() string

TableName 设置模型对应数据库表名称

type Ticket

type Ticket struct {
	dbengine.BaseModel

	Title        string
	Content      string                `json:"content" gorm:"type:text"`
	Type         apistructs.TicketType `gorm:"type:varchar(20);index:idx_type"`
	Priority     apistructs.TicketPriority
	Status       apistructs.TicketStatus
	RequestID    string `gorm:"type:varchar(60);index:idx_request_id"`
	Key          string `gorm:"type:varchar(64);index:idx_key"` // 告警使用,作为唯一 key
	OrgID        string
	Metric       string
	MetricID     string
	Count        int64 // 相同类型工单聚合
	Creator      string
	LastOperator string
	Label        string                  `json:"label" gorm:"type:text"`
	TargetType   apistructs.TicketTarget `gorm:"type:varchar(40);index:idx_target_type"`
	TargetID     string
	TriggeredAt  *time.Time
	ClosedAt     *time.Time
}

Ticket 工单数据结构

func (Ticket) TableName

func (Ticket) TableName() string

TableName 设置模型对应数据库表名称

Jump to

Keyboard shortcuts

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