Documentation ¶
Overview ¶
Package recycle Release GC
Index ¶
- Constants
- func GetApplicationId(ctx context.Context) string
- func GetProjectID(ctx context.Context) string
- func GetVersion(ctx context.Context) string
- func ParseMetaFromReadCloser(file io.ReadCloser) (*apistructs.ReleaseMetadata, map[string]string, error)
- type ReleaseService
- func (s *ReleaseService) CheckVersion(ctx context.Context, req *pb.CheckVersionRequest) (*pb.CheckVersionResponse, error)
- func (s *ReleaseService) Convert(releaseRequest *pb.ReleaseCreateRequest, appReleases []db.Release) (*db.Release, error)
- func (s *ReleaseService) Create(req *pb.ReleaseCreateRequest) (string, error)
- func (s *ReleaseService) CreateByFile(req *pb.ReleaseUploadRequest, file io.ReadCloser) (string, string, error)
- func (s *ReleaseService) CreateRelease(ctx context.Context, req *pb.ReleaseCreateRequest) (*pb.ReleaseCreateResponseData, error)
- func (s *ReleaseService) Delete(orgID int64, opusMap map[string]*pb.ListArtifactsRespItem, ...) error
- func (s *ReleaseService) DeleteRelease(ctx context.Context, req *pb.ReleaseDeleteRequest) (*pb.ReleaseDeleteResponse, error)
- func (s *ReleaseService) DeleteReleases(ctx context.Context, req *pb.ReleasesDeleteRequest) (*pb.ReleasesDeleteResponse, error)
- func (s *ReleaseService) Get(orgID int64, releaseID string) (*pb.ReleaseGetResponseData, error)
- func (s *ReleaseService) GetBranchLatestRelease(projectID, appID int64, gitBranch string) (*db.Release, error)
- func (s *ReleaseService) GetDiceYAML(orgID int64, releaseID string) (string, error)
- func (s *ReleaseService) GetImages(dices []string) []*imagedb.Image
- func (s *ReleaseService) GetIosPlist(ctx context.Context, req *pb.GetIosPlistRequest) (*pb.GetIosPlistResponse, error)
- func (s *ReleaseService) GetIosPlistService(orgID int64, releaseID string) (string, error)
- func (s *ReleaseService) GetLatestReleases(ctx context.Context, req *pb.GetLatestReleasesRequest) (*pb.GetLatestReleasesResponse, error)
- func (s *ReleaseService) GetLatestReleasesByProjectAndVersion(projectID int64, version string) (*[]db.Release, error)
- func (s *ReleaseService) GetRelease(ctx context.Context, req *pb.ReleaseGetRequest) (*pb.ReleaseGetResponse, error)
- func (s *ReleaseService) GetReleaseNamesByApp(orgID, appID int64) ([]string, error)
- func (s *ReleaseService) List(ctx context.Context, orgID int64, req *pb.ReleaseListRequest) (*pb.ReleaseListResponseData, error)
- func (s *ReleaseService) ListRelease(ctx context.Context, req *pb.ReleaseListRequest) (*pb.ReleaseListResponse, error)
- func (s *ReleaseService) ListReleaseName(ctx context.Context, req *pb.ListReleaseNameRequest) (*pb.ListReleaseNameResponse, error)
- func (s *ReleaseService) ParseReleaseFile(ctx context.Context, req *pb.ParseReleaseFileRequest) (*pb.ParseReleaseFileResponse, error)
- func (s *ReleaseService) PutOffRelease(ctx context.Context, req *pb.ReleasePutOffRequest) (*pb.ReleasePutOffResponse, error)
- func (s *ReleaseService) PutOnRelease(ctx context.Context, req *pb.ReleasePutOnRequest) (*pb.ReleasePutOnResponse, error)
- func (s *ReleaseService) ReleaseGC(ctx context.Context, req *pb.ReleaseGCRequest) (*pb.ReleaseDataResponse, error)
- func (s *ReleaseService) RemoveDeprecatedsReleases(now time.Time) error
- func (s *ReleaseService) ToFormal(releaseIDs []string) error
- func (s *ReleaseService) ToFormalRelease(ctx context.Context, req *pb.FormalReleaseRequest) (*pb.FormalReleaseResponse, error)
- func (s *ReleaseService) ToFormalReleases(ctx context.Context, req *pb.FormalReleasesRequest) (*pb.FormalReleasesResponse, error)
- func (s *ReleaseService) Update(orgID int64, releaseID string, req *pb.ReleaseUpdateRequest) error
- func (s *ReleaseService) UpdateReference(orgID int64, releaseID string, req *pb.ReleaseReferenceUpdateRequest) error
- func (s *ReleaseService) UpdateRelease(ctx context.Context, req *pb.ReleaseUpdateRequest) (*pb.ReleaseUpdateResponse, error)
- func (s *ReleaseService) UpdateReleaseReference(ctx context.Context, req *pb.ReleaseReferenceUpdateRequest) (*pb.ReleaseDataResponse, error)
- func (s *ReleaseService) UploadRelease(ctx context.Context, req *pb.ReleaseUploadRequest) (*pb.ReleaseUploadResponse, error)
- type ResourceType
Constants ¶
const (
// AliYunRegistry Alibaba Cloud registry prefix
AliYunRegistry = "registry.cn-hangzhou.aliyuncs.com"
)
Variables ¶
This section is empty.
Functions ¶
func ParseMetaFromReadCloser ¶
func ParseMetaFromReadCloser(file io.ReadCloser) (*apistructs.ReleaseMetadata, map[string]string, error)
Types ¶
type ReleaseService ¶
type ReleaseService struct { Etcd *clientv3.Client Config *releaseConfig ReleaseRule *release_rule.ReleaseRule // contains filtered or unexported fields }
func (*ReleaseService) CheckVersion ¶
func (s *ReleaseService) CheckVersion(ctx context.Context, req *pb.CheckVersionRequest) (*pb.CheckVersionResponse, error)
func (*ReleaseService) Convert ¶
func (s *ReleaseService) Convert(releaseRequest *pb.ReleaseCreateRequest, appReleases []db.Release) (*db.Release, error)
Convert 从ReleaseRequest中提取Release元信息, 若为应用级制品, appReleases填nil
func (*ReleaseService) Create ¶
func (s *ReleaseService) Create(req *pb.ReleaseCreateRequest) (string, error)
Create create Release
func (*ReleaseService) CreateByFile ¶
func (s *ReleaseService) CreateByFile(req *pb.ReleaseUploadRequest, file io.ReadCloser) (string, string, error)
func (*ReleaseService) CreateRelease ¶
func (s *ReleaseService) CreateRelease(ctx context.Context, req *pb.ReleaseCreateRequest) (*pb.ReleaseCreateResponseData, error)
CreateRelease POST /api/releases release create release
func (*ReleaseService) Delete ¶
func (s *ReleaseService) Delete(orgID int64, opusMap map[string]*pb.ListArtifactsRespItem, releaseIDs ...string) error
Delete delete Release
func (*ReleaseService) DeleteRelease ¶
func (s *ReleaseService) DeleteRelease(ctx context.Context, req *pb.ReleaseDeleteRequest) (*pb.ReleaseDeleteResponse, error)
func (*ReleaseService) DeleteReleases ¶
func (s *ReleaseService) DeleteReleases(ctx context.Context, req *pb.ReleasesDeleteRequest) (*pb.ReleasesDeleteResponse, error)
func (*ReleaseService) Get ¶
func (s *ReleaseService) Get(orgID int64, releaseID string) (*pb.ReleaseGetResponseData, error)
Get get Release
func (*ReleaseService) GetBranchLatestRelease ¶
func (s *ReleaseService) GetBranchLatestRelease(projectID, appID int64, gitBranch string) (*db.Release, error)
GetBranchLatestRelease return the latest release with target gitBranch. return nil if not found.
func (*ReleaseService) GetDiceYAML ¶
func (s *ReleaseService) GetDiceYAML(orgID int64, releaseID string) (string, error)
GetDiceYAML get dice.yml context
func (*ReleaseService) GetImages ¶
func (s *ReleaseService) GetImages(dices []string) []*imagedb.Image
GetImages get image by ReleaseRequest
func (*ReleaseService) GetIosPlist ¶
func (s *ReleaseService) GetIosPlist(ctx context.Context, req *pb.GetIosPlistRequest) (*pb.GetIosPlistResponse, error)
func (*ReleaseService) GetIosPlistService ¶
func (s *ReleaseService) GetIosPlistService(orgID int64, releaseID string) (string, error)
GetIosPlist Read the download address plist in the ios type release
func (*ReleaseService) GetLatestReleases ¶
func (s *ReleaseService) GetLatestReleases(ctx context.Context, req *pb.GetLatestReleasesRequest) (*pb.GetLatestReleasesResponse, error)
func (*ReleaseService) GetLatestReleasesByProjectAndVersion ¶
func (s *ReleaseService) GetLatestReleasesByProjectAndVersion(projectID int64, version string) (*[]db.Release, error)
GetLatestReleasesByProjectAndVersion get latelest Release by projectID & version
func (*ReleaseService) GetRelease ¶
func (s *ReleaseService) GetRelease(ctx context.Context, req *pb.ReleaseGetRequest) (*pb.ReleaseGetResponse, error)
func (*ReleaseService) GetReleaseNamesByApp ¶
func (s *ReleaseService) GetReleaseNamesByApp(orgID, appID int64) ([]string, error)
GetReleaseNamesByApp get releaseName list by appID
func (*ReleaseService) List ¶
func (s *ReleaseService) List(ctx context.Context, orgID int64, req *pb.ReleaseListRequest) (*pb.ReleaseListResponseData, error)
List Search based on search parameters
func (*ReleaseService) ListRelease ¶
func (s *ReleaseService) ListRelease(ctx context.Context, req *pb.ReleaseListRequest) (*pb.ReleaseListResponse, error)
func (*ReleaseService) ListReleaseName ¶
func (s *ReleaseService) ListReleaseName(ctx context.Context, req *pb.ListReleaseNameRequest) (*pb.ListReleaseNameResponse, error)
func (*ReleaseService) ParseReleaseFile ¶
func (s *ReleaseService) ParseReleaseFile(ctx context.Context, req *pb.ParseReleaseFileRequest) (*pb.ParseReleaseFileResponse, error)
func (*ReleaseService) PutOffRelease ¶
func (s *ReleaseService) PutOffRelease(ctx context.Context, req *pb.ReleasePutOffRequest) (*pb.ReleasePutOffResponse, error)
func (*ReleaseService) PutOnRelease ¶
func (s *ReleaseService) PutOnRelease(ctx context.Context, req *pb.ReleasePutOnRequest) (*pb.ReleasePutOnResponse, error)
PutOnRelease puts on release to gallery. Internal call only
func (*ReleaseService) ReleaseGC ¶
func (s *ReleaseService) ReleaseGC(ctx context.Context, req *pb.ReleaseGCRequest) (*pb.ReleaseDataResponse, error)
func (*ReleaseService) RemoveDeprecatedsReleases ¶
func (s *ReleaseService) RemoveDeprecatedsReleases(now time.Time) error
RemoveDeprecatedsReleases Recycling expired release
func (*ReleaseService) ToFormal ¶
func (s *ReleaseService) ToFormal(releaseIDs []string) error
func (*ReleaseService) ToFormalRelease ¶
func (s *ReleaseService) ToFormalRelease(ctx context.Context, req *pb.FormalReleaseRequest) (*pb.FormalReleaseResponse, error)
func (*ReleaseService) ToFormalReleases ¶
func (s *ReleaseService) ToFormalReleases(ctx context.Context, req *pb.FormalReleasesRequest) (*pb.FormalReleasesResponse, error)
func (*ReleaseService) Update ¶
func (s *ReleaseService) Update(orgID int64, releaseID string, req *pb.ReleaseUpdateRequest) error
Update update Release
func (*ReleaseService) UpdateReference ¶
func (s *ReleaseService) UpdateReference(orgID int64, releaseID string, req *pb.ReleaseReferenceUpdateRequest) error
UpdateReference update Release reference
func (*ReleaseService) UpdateRelease ¶
func (s *ReleaseService) UpdateRelease(ctx context.Context, req *pb.ReleaseUpdateRequest) (*pb.ReleaseUpdateResponse, error)
func (*ReleaseService) UpdateReleaseReference ¶
func (s *ReleaseService) UpdateReleaseReference(ctx context.Context, req *pb.ReleaseReferenceUpdateRequest) (*pb.ReleaseDataResponse, error)
func (*ReleaseService) UploadRelease ¶
func (s *ReleaseService) UploadRelease(ctx context.Context, req *pb.ReleaseUploadRequest) (*pb.ReleaseUploadResponse, error)
type ResourceType ¶
type ResourceType string
ResourceType Release type
const ( // ResourceTypeDiceYml ResourceType is dice.yml ResourceTypeDiceYml ResourceType = "diceyml" // ResourceTypeAddonYml ResourceType is addon.yml ResourceTypeAddonYml ResourceType = "addonyml" // ResourceTypeBinary ResourceType is binary executable ResourceTypeBinary ResourceType = "binary" // ResourceTypeScript ResourceType is executable script file, eg: shell/python/ruby, etc ResourceTypeScript ResourceType = "script" // ResourceTypeSQL ResourceType is sql ResourceTypeSQL ResourceType = "sql" // ResourceTypeDataSet ResourceType is Data text file ResourceTypeDataSet ResourceType = "data" // ResourceTypeAndroid ResourceType is android ResourceTypeAndroid ResourceType = "android" // ResourceTypeIOS ResourceType is ios ResourceTypeIOS ResourceType = "ios" // ResourceTypeMigration ResourceType is migration文件releaseID ResourceTypeMigration ResourceType = "migration" // ResourceTypeH5 ResourceType is h5 ResourceTypeH5 ResourceType = "h5" )