Documentation
¶
Index ¶
- type CIV3BuildArtifact
- type CIV3BuildCache
- type Client
- func (client *Client) DeleteArtifact(id int64, ops ...mysqlxorm.SessionOption) error
- func (client *Client) DeleteArtifactsByImages(_type apistructs.BuildArtifactType, images []string, ...) error
- func (client *Client) DeleteBuildCache(id int64, ops ...mysqlxorm.SessionOption) (err error)
- func (client *Client) GetBuildArtifactBySha256(sha256 string, ops ...mysqlxorm.SessionOption) (artifact CIV3BuildArtifact, err error)
- func (client *Client) GetBuildCache(clusterName, imageName string, ops ...mysqlxorm.SessionOption) (cache CIV3BuildCache, err error)
- func (client *Client) NewArtifact(sha, identityText string, t apistructs.BuildArtifactType, content string, ...) (CIV3BuildArtifact, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CIV3BuildArtifact ¶
type CIV3BuildArtifact struct { ID int64 `json:"id" xorm:"pk autoincr BIGINT(20)"` CreatedAt time.Time `json:"createdAt" xorm:"created"` UpdatedAt time.Time `json:"updatedAt" xorm:"updated"` Sha256 string `json:"sha256" xorm:"sha_256"` // 唯一标识 IdentityText string `json:"identityText"` // 便于记忆的字段,用来生成唯一标识 Type apistructs.BuildArtifactType `json:"type"` // 类型,存的是文件在 NFS 上的地址,或者直接是文件内容 Content string `json:"content"` // 内容,根据 type 进行解析 ClusterName string `json:"clusterName"` // 集群 name PipelineID uint64 `json:"pipelineID"` // 关联的构建 ID }
func (*CIV3BuildArtifact) Convert2PB ¶
func (artifact *CIV3BuildArtifact) Convert2PB() *pb.BuildArtifact
func (*CIV3BuildArtifact) TableName ¶
func (*CIV3BuildArtifact) TableName() string
type CIV3BuildCache ¶
type CIV3BuildCache struct { ID int64 `json:"id" xorm:"pk autoincr"` Name string `json:"name"` ClusterName string `json:"clusterName"` LastPullAt time.Time `json:"lastPullAt"` CreatedAt time.Time `json:"createdAt" xorm:"created"` UpdatedAt time.Time `json:"updatedAt" xorm:"updated"` DeletedAt time.Time `xorm:"deleted"` }
func (*CIV3BuildCache) TableName ¶
func (*CIV3BuildCache) TableName() string
type Client ¶
func (*Client) DeleteArtifact ¶
func (client *Client) DeleteArtifact(id int64, ops ...mysqlxorm.SessionOption) error
func (*Client) DeleteArtifactsByImages ¶
func (client *Client) DeleteArtifactsByImages(_type apistructs.BuildArtifactType, images []string, ops ...mysqlxorm.SessionOption) error
func (*Client) DeleteBuildCache ¶
func (client *Client) DeleteBuildCache(id int64, ops ...mysqlxorm.SessionOption) (err error)
func (*Client) GetBuildArtifactBySha256 ¶
func (client *Client) GetBuildArtifactBySha256(sha256 string, ops ...mysqlxorm.SessionOption) (artifact CIV3BuildArtifact, err error)
func (*Client) GetBuildCache ¶
func (client *Client) GetBuildCache(clusterName, imageName string, ops ...mysqlxorm.SessionOption) (cache CIV3BuildCache, err error)
func (*Client) NewArtifact ¶
func (client *Client) NewArtifact(sha, identityText string, t apistructs.BuildArtifactType, content string, clusterName string, pipelineID uint64, ops ...mysqlxorm.SessionOption) (CIV3BuildArtifact, error)
Click to show internal directories.
Click to hide internal directories.