release

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

Documentation

Index

Constants

View Source
const (
	// AliYunRegistry 阿里云registry前缀
	AliYunRegistry = "registry.cn-hangzhou.aliyuncs.com"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Release)

Option 定义 Release 对象的配置选项

func WithBundle

func WithBundle(bdl *bundle.Bundle) Option

WithBundle 配置 bundle

func WithDBClient

func WithDBClient(db *dbclient.DBClient) Option

WithDBClient 配置 db client

func WithImageDBClient added in v1.1.0

func WithImageDBClient(db *imagedb.ImageConfigDB) Option

WithDBClient 配置 db client

type Release

type Release struct {
	// contains filtered or unexported fields
}

Release Release操作封装

func New

func New(options ...Option) *Release

New 新建 Release 实例,操作 Release 资源

func (*Release) Convert

func (r *Release) Convert(releaseRequest *apistructs.ReleaseCreateRequest) (*dbclient.Release, error)

Convert 从ReleaseRequest中提取Release元信息

func (*Release) Create

func (r *Release) Create(req *apistructs.ReleaseCreateRequest) (string, error)

Create 创建 Release

func (*Release) Delete

func (r *Release) Delete(orgID int64, releaseID string) error

Delete 删除 Release

func (*Release) Get

func (r *Release) Get(orgID int64, releaseID string) (*apistructs.ReleaseGetResponseData, error)

Get 获取 Release 详情

func (*Release) GetDiceYAML

func (r *Release) GetDiceYAML(orgID int64, releaseID string) (string, error)

GetDiceYAML 获取dice.yml内容

func (*Release) GetImages

func (r *Release) GetImages(req *apistructs.ReleaseCreateRequest) []*imagedb.Image

GetImages 从ReleaseRequest中提取Image信息

func (*Release) GetIosPlist

func (r *Release) GetIosPlist(orgID int64, releaseID string) (string, error)

GetIosPlist 读取ios类型release中下载地址plist

func (*Release) GetLatestReleasesByProjectAndVersion

func (r *Release) GetLatestReleasesByProjectAndVersion(projectID int64, version string) (*[]dbclient.Release, error)

GetLatestReleasesByProjectAndVersion 获取给定项目 & version情况下各应用最新 Release

func (*Release) GetReleaseNamesByApp

func (r *Release) GetReleaseNamesByApp(orgID, appID int64) ([]string, error)

GetReleaseNamesByApp 根据 appID 获取 releaseName 列表

func (*Release) List

List 根据搜索条件进行搜索

func (*Release) RemoveDeprecatedsReleases

func (r *Release) RemoveDeprecatedsReleases(now time.Time) error

RemoveDeprecatedsReleases 回收过期release具体逻辑

func (*Release) Update

func (r *Release) Update(orgID int64, releaseID string, req *apistructs.ReleaseUpdateRequestData) error

Update 更新 Release

func (*Release) UpdateReference

func (r *Release) UpdateReference(orgID int64, releaseID string, req *apistructs.ReleaseReferenceUpdateRequest) error

UpdateReference 更新 Release 引用

Jump to

Keyboard shortcuts

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