Documentation ¶
Index ¶
- Constants
- func MakeProjectPipelineName(pipelineYml string, fileName string) string
- type AutoRunParams
- type CategoryType
- type ErdaProjectSourceType
- func (s *ErdaProjectSourceType) GeneratePipelineCreateRequestV2(ctx context.Context, p *ProjectPipelineService, ...) (*pipelinepb.PipelineCreateRequestV2, error)
- func (s *ErdaProjectSourceType) GenerateReq(ctx context.Context, p *ProjectPipelineService, ...) (*spb.PipelineSourceCreateRequest, error)
- func (s *ErdaProjectSourceType) GetPipelineCreateRequestV2() string
- type GithubProjectSourceType
- func (s *GithubProjectSourceType) GeneratePipelineCreateRequestV2(ctx context.Context, p *ProjectPipelineService, ...) (*pipelinepb.PipelineCreateRequestV2, error)
- func (s *GithubProjectSourceType) GenerateReq(ctx context.Context, p *ProjectPipelineService, ...) (*spb.PipelineSourceCreateRequest, error)
- func (s *GithubProjectSourceType) GetPipelineCreateRequestV2() string
- type PipelineStatisticsByCategory
- type PipelineStatisticsNums
- type ProjectPipelineService
- func (p *ProjectPipelineService) BatchCreateByGittarPushHook(ctx context.Context, params *pb.GittarPushPayloadEvent) (*pb.BatchCreateProjectPipelineResponse, error)
- func (p *ProjectPipelineService) BatchRun(ctx context.Context, params deftype.ProjectPipelineBatchRun) (*deftype.ProjectPipelineBatchRunResult, error)
- func (p *ProjectPipelineService) Cancel(ctx context.Context, params *pb.CancelProjectPipelineRequest) (*pb.CancelProjectPipelineResponse, error)
- func (p *ProjectPipelineService) CheckBranchRule(branch string, projectID int64) (bool, error)
- func (p *ProjectPipelineService) Create(ctx context.Context, params *pb.CreateProjectPipelineRequest) (*pb.CreateProjectPipelineResponse, error)
- func (p *ProjectPipelineService) CreateNamePreCheck(ctx context.Context, req *pb.CreateProjectPipelineNamePreCheckRequest) (*pb.CreateProjectPipelineNamePreCheckResponse, error)
- func (p *ProjectPipelineService) CreateOne(ctx context.Context, params *pb.CreateProjectPipelineRequest) (*pb.ProjectPipeline, error)
- func (p *ProjectPipelineService) CreateSourcePreCheck(ctx context.Context, params *pb.CreateProjectPipelineSourcePreCheckRequest) (*pb.CreateProjectPipelineSourcePreCheckResponse, error)
- func (p *ProjectPipelineService) Delete(ctx context.Context, params deftype.ProjectPipelineDelete) (*deftype.ProjectPipelineDeleteResult, error)
- func (p *ProjectPipelineService) DeleteByApp(ctx context.Context, params *pb.DeleteByAppRequest) (*pb.DeleteByAppResponse, error)
- func (p *ProjectPipelineService) EndCron(ctx context.Context, params deftype.ProjectPipelineEndCron) (*deftype.ProjectPipelineEndCronResult, error)
- func (s *ProjectPipelineService) GetPipelineYml(app *apistructs.ApplicationDTO, userID string, branch string, findPath string) ([]*pb.PipelineYmlList, error)
- func (p *ProjectPipelineService) GetRemotesByAppID(appID uint64, orgName, projectName string) ([]string, error)
- func (p *ProjectPipelineService) IdempotentCreateOne(ctx context.Context, params *pb.CreateProjectPipelineRequest) (*pb.ProjectPipeline, error)
- func (p *ProjectPipelineService) List(ctx context.Context, params deftype.ProjectPipelineList) ([]*dpb.PipelineDefinition, int64, error)
- func (p *ProjectPipelineService) ListApp(ctx context.Context, params *pb.ListAppRequest) (*pb.ListAppResponse, error)
- func (p *ProjectPipelineService) ListExecHistory(ctx context.Context, params *pb.ListPipelineExecHistoryRequest) (*pb.ListPipelineExecHistoryResponse, error)
- func (p *ProjectPipelineService) ListPipelineCategory(ctx context.Context, params *pb.ListPipelineCategoryRequest) (*pb.ListPipelineCategoryResponse, error)
- func (p *ProjectPipelineService) ListPipelineStatisticsByCategory(ctx context.Context) []PipelineStatisticsByCategory
- func (s *ProjectPipelineService) ListPipelineYml(ctx context.Context, req *pb.ListAppPipelineYmlRequest) (*pb.ListAppPipelineYmlResponse, error)
- func (s *ProjectPipelineService) ListPipelineYmlByApp(app *apistructs.ApplicationDTO, branch, userID string) ([]*pb.PipelineYmlList, error)
- func (p *ProjectPipelineService) ListUsedRefs(ctx context.Context, params deftype.ProjectPipelineUsedRefList) ([]string, error)
- func (p *ProjectPipelineService) OneClickCreate(ctx context.Context, params *pb.OneClickCreateProjectPipelineRequest) (*pb.OneClickCreateProjectPipelineResponse, error)
- func (p *ProjectPipelineService) Rerun(ctx context.Context, params *pb.RerunProjectPipelineRequest) (*pb.RerunProjectPipelineResponse, error)
- func (p *ProjectPipelineService) RerunFailed(ctx context.Context, params *pb.RerunFailedProjectPipelineRequest) (*pb.RerunFailedProjectPipelineResponse, error)
- func (p *ProjectPipelineService) Run(ctx context.Context, params *pb.RunProjectPipelineRequest) (*pb.RunProjectPipelineResponse, error)
- func (p *ProjectPipelineService) SetPrimary(ctx context.Context, params deftype.ProjectPipelineCategory) (*dpb.PipelineDefinitionUpdateResponse, error)
- func (p *ProjectPipelineService) StartCron(ctx context.Context, params deftype.ProjectPipelineStartCron) (*deftype.ProjectPipelineStartCronResult, error)
- func (p *ProjectPipelineService) TryAddRunningPipelineLinkToErr(orgName string, projectID uint64, appID uint64, err error) (error, bool)
- func (p *ProjectPipelineService) UnSetPrimary(ctx context.Context, params deftype.ProjectPipelineCategory) (*dpb.PipelineDefinitionUpdateResponse, error)
- func (p *ProjectPipelineService) Update(ctx context.Context, params *pb.UpdateProjectPipelineRequest) (*pb.UpdateProjectPipelineResponse, error)
- func (e *ProjectPipelineService) UpdateCmsNsConfigs(userID string, orgID uint64) error
- func (p *ProjectPipelineService) WithBranchRuleSve(svc *branchrule.BranchRule)
- func (p *ProjectPipelineService) WithPermissionSvc(permission *permission.Permission)
- func (p *ProjectPipelineService) WithPipelineService(svc pipelinepb.PipelineServiceServer)
- func (p *ProjectPipelineService) WithPipelineSvc(svc *pipeline.Pipeline)
- type ProjectSourceType
- type RemoteName
- type Service
Constants ¶
View Source
const ( DefaultCategory CategoryType = "default" StarCategory CategoryType = "primary" CreateProjectPipelineNamePreCheckLocaleKey string = "ProjectPipelineCreateNamePreCheckNotPass" CreateProjectPipelineSourcePreCheckLocaleKey string = "ProjectPipelineCreateSourcePreCheckNotPass" InitCommitID string = "0000000000000000000000000000000000000000" BranchPrefix string = "refs/heads/" )
Variables ¶
This section is empty.
Functions ¶
func MakeProjectPipelineName ¶
Types ¶
type AutoRunParams ¶
type AutoRunParams struct {
// contains filtered or unexported fields
}
type CategoryType ¶
type CategoryType string
func (CategoryType) String ¶
func (c CategoryType) String() string
type ErdaProjectSourceType ¶
type ErdaProjectSourceType struct {
PipelineCreateRequestV2 string `json:"pipelineCreateRequestV2"`
}
func (*ErdaProjectSourceType) GeneratePipelineCreateRequestV2 ¶
func (s *ErdaProjectSourceType) GeneratePipelineCreateRequestV2(ctx context.Context, p *ProjectPipelineService, params *pb.CreateProjectPipelineRequest) (*pipelinepb.PipelineCreateRequestV2, error)
func (*ErdaProjectSourceType) GenerateReq ¶
func (s *ErdaProjectSourceType) GenerateReq(ctx context.Context, p *ProjectPipelineService, params *pb.CreateProjectPipelineRequest) (*spb.PipelineSourceCreateRequest, error)
func (*ErdaProjectSourceType) GetPipelineCreateRequestV2 ¶
func (s *ErdaProjectSourceType) GetPipelineCreateRequestV2() string
type GithubProjectSourceType ¶
type GithubProjectSourceType struct {
PipelineCreateRequestV2 string `json:"pipelineCreateRequestV2"`
}
func (*GithubProjectSourceType) GeneratePipelineCreateRequestV2 ¶
func (s *GithubProjectSourceType) GeneratePipelineCreateRequestV2(ctx context.Context, p *ProjectPipelineService, params *pb.CreateProjectPipelineRequest) (*pipelinepb.PipelineCreateRequestV2, error)
func (*GithubProjectSourceType) GenerateReq ¶
func (s *GithubProjectSourceType) GenerateReq(ctx context.Context, p *ProjectPipelineService, params *pb.CreateProjectPipelineRequest) (*spb.PipelineSourceCreateRequest, error)
func (*GithubProjectSourceType) GetPipelineCreateRequestV2 ¶
func (s *GithubProjectSourceType) GetPipelineCreateRequestV2() string
type PipelineStatisticsByCategory ¶
type PipelineStatisticsByCategory struct { Key apistructs.PipelineCategory Category string Rules []string PipelineStatisticsNums }
type PipelineStatisticsNums ¶
type ProjectPipelineService ¶
type ProjectPipelineService struct { PipelineSource sourcepb.SourceServiceServer PipelineDefinition dpb.DefinitionServiceServer Permission *permission.Permission PipelineCms cmspb.CmsServiceServer GuideSvc guidepb.GuideServiceServer PipelineCron cronpb.CronServiceServer // contains filtered or unexported fields }
func (*ProjectPipelineService) BatchCreateByGittarPushHook ¶
func (p *ProjectPipelineService) BatchCreateByGittarPushHook(ctx context.Context, params *pb.GittarPushPayloadEvent) (*pb.BatchCreateProjectPipelineResponse, error)
func (*ProjectPipelineService) BatchRun ¶
func (p *ProjectPipelineService) BatchRun(ctx context.Context, params deftype.ProjectPipelineBatchRun) (*deftype.ProjectPipelineBatchRunResult, error)
func (*ProjectPipelineService) Cancel ¶
func (p *ProjectPipelineService) Cancel(ctx context.Context, params *pb.CancelProjectPipelineRequest) (*pb.CancelProjectPipelineResponse, error)
func (*ProjectPipelineService) CheckBranchRule ¶
func (p *ProjectPipelineService) CheckBranchRule(branch string, projectID int64) (bool, error)
func (*ProjectPipelineService) Create ¶
func (p *ProjectPipelineService) Create(ctx context.Context, params *pb.CreateProjectPipelineRequest) (*pb.CreateProjectPipelineResponse, error)
func (*ProjectPipelineService) CreateNamePreCheck ¶
func (p *ProjectPipelineService) CreateNamePreCheck(ctx context.Context, req *pb.CreateProjectPipelineNamePreCheckRequest) (*pb.CreateProjectPipelineNamePreCheckResponse, error)
func (*ProjectPipelineService) CreateOne ¶
func (p *ProjectPipelineService) CreateOne(ctx context.Context, params *pb.CreateProjectPipelineRequest) (*pb.ProjectPipeline, error)
func (*ProjectPipelineService) CreateSourcePreCheck ¶
func (p *ProjectPipelineService) CreateSourcePreCheck(ctx context.Context, params *pb.CreateProjectPipelineSourcePreCheckRequest) (*pb.CreateProjectPipelineSourcePreCheckResponse, error)
func (*ProjectPipelineService) Delete ¶
func (p *ProjectPipelineService) Delete(ctx context.Context, params deftype.ProjectPipelineDelete) (*deftype.ProjectPipelineDeleteResult, error)
func (*ProjectPipelineService) DeleteByApp ¶
func (p *ProjectPipelineService) DeleteByApp(ctx context.Context, params *pb.DeleteByAppRequest) (*pb.DeleteByAppResponse, error)
func (*ProjectPipelineService) EndCron ¶
func (p *ProjectPipelineService) EndCron(ctx context.Context, params deftype.ProjectPipelineEndCron) (*deftype.ProjectPipelineEndCronResult, error)
func (*ProjectPipelineService) GetPipelineYml ¶
func (s *ProjectPipelineService) GetPipelineYml(app *apistructs.ApplicationDTO, userID string, branch string, findPath string) ([]*pb.PipelineYmlList, error)
func (*ProjectPipelineService) GetRemotesByAppID ¶
func (p *ProjectPipelineService) GetRemotesByAppID(appID uint64, orgName, projectName string) ([]string, error)
func (*ProjectPipelineService) IdempotentCreateOne ¶
func (p *ProjectPipelineService) IdempotentCreateOne(ctx context.Context, params *pb.CreateProjectPipelineRequest) (*pb.ProjectPipeline, error)
func (*ProjectPipelineService) List ¶
func (p *ProjectPipelineService) List(ctx context.Context, params deftype.ProjectPipelineList) ([]*dpb.PipelineDefinition, int64, error)
func (*ProjectPipelineService) ListApp ¶
func (p *ProjectPipelineService) ListApp(ctx context.Context, params *pb.ListAppRequest) (*pb.ListAppResponse, error)
func (*ProjectPipelineService) ListExecHistory ¶
func (p *ProjectPipelineService) ListExecHistory(ctx context.Context, params *pb.ListPipelineExecHistoryRequest) (*pb.ListPipelineExecHistoryResponse, error)
func (*ProjectPipelineService) ListPipelineCategory ¶
func (p *ProjectPipelineService) ListPipelineCategory(ctx context.Context, params *pb.ListPipelineCategoryRequest) (*pb.ListPipelineCategoryResponse, error)
func (*ProjectPipelineService) ListPipelineStatisticsByCategory ¶
func (p *ProjectPipelineService) ListPipelineStatisticsByCategory(ctx context.Context) []PipelineStatisticsByCategory
func (*ProjectPipelineService) ListPipelineYml ¶
func (s *ProjectPipelineService) ListPipelineYml(ctx context.Context, req *pb.ListAppPipelineYmlRequest) (*pb.ListAppPipelineYmlResponse, error)
func (*ProjectPipelineService) ListPipelineYmlByApp ¶
func (s *ProjectPipelineService) ListPipelineYmlByApp(app *apistructs.ApplicationDTO, branch, userID string) ([]*pb.PipelineYmlList, error)
func (*ProjectPipelineService) ListUsedRefs ¶
func (p *ProjectPipelineService) ListUsedRefs(ctx context.Context, params deftype.ProjectPipelineUsedRefList) ([]string, error)
func (*ProjectPipelineService) OneClickCreate ¶
func (p *ProjectPipelineService) OneClickCreate(ctx context.Context, params *pb.OneClickCreateProjectPipelineRequest) (*pb.OneClickCreateProjectPipelineResponse, error)
func (*ProjectPipelineService) Rerun ¶
func (p *ProjectPipelineService) Rerun(ctx context.Context, params *pb.RerunProjectPipelineRequest) (*pb.RerunProjectPipelineResponse, error)
func (*ProjectPipelineService) RerunFailed ¶
func (p *ProjectPipelineService) RerunFailed(ctx context.Context, params *pb.RerunFailedProjectPipelineRequest) (*pb.RerunFailedProjectPipelineResponse, error)
func (*ProjectPipelineService) Run ¶
func (p *ProjectPipelineService) Run(ctx context.Context, params *pb.RunProjectPipelineRequest) (*pb.RunProjectPipelineResponse, error)
func (*ProjectPipelineService) SetPrimary ¶
func (p *ProjectPipelineService) SetPrimary(ctx context.Context, params deftype.ProjectPipelineCategory) (*dpb.PipelineDefinitionUpdateResponse, error)
func (*ProjectPipelineService) StartCron ¶
func (p *ProjectPipelineService) StartCron(ctx context.Context, params deftype.ProjectPipelineStartCron) (*deftype.ProjectPipelineStartCronResult, error)
func (*ProjectPipelineService) TryAddRunningPipelineLinkToErr ¶
func (*ProjectPipelineService) UnSetPrimary ¶
func (p *ProjectPipelineService) UnSetPrimary(ctx context.Context, params deftype.ProjectPipelineCategory) (*dpb.PipelineDefinitionUpdateResponse, error)
func (*ProjectPipelineService) Update ¶
func (p *ProjectPipelineService) Update(ctx context.Context, params *pb.UpdateProjectPipelineRequest) (*pb.UpdateProjectPipelineResponse, error)
func (*ProjectPipelineService) UpdateCmsNsConfigs ¶
func (e *ProjectPipelineService) UpdateCmsNsConfigs(userID string, orgID uint64) error
UpdateCmsNsConfigs update CmsNsConfigs
func (*ProjectPipelineService) WithBranchRuleSve ¶
func (p *ProjectPipelineService) WithBranchRuleSve(svc *branchrule.BranchRule)
func (*ProjectPipelineService) WithPermissionSvc ¶
func (p *ProjectPipelineService) WithPermissionSvc(permission *permission.Permission)
func (*ProjectPipelineService) WithPipelineService ¶
func (p *ProjectPipelineService) WithPipelineService(svc pipelinepb.PipelineServiceServer)
func (*ProjectPipelineService) WithPipelineSvc ¶
func (p *ProjectPipelineService) WithPipelineSvc(svc *pipeline.Pipeline)
type ProjectSourceType ¶
type ProjectSourceType interface { GenerateReq(ctx context.Context, p *ProjectPipelineService, params *pb.CreateProjectPipelineRequest) (*spb.PipelineSourceCreateRequest, error) GetPipelineCreateRequestV2() string GeneratePipelineCreateRequestV2(ctx context.Context, p *ProjectPipelineService, params *pb.CreateProjectPipelineRequest) (*pipelinepb.PipelineCreateRequestV2, error) }
func NewProjectSourceType ¶
func NewProjectSourceType(t string) ProjectSourceType
type RemoteName ¶
type Service ¶
type Service interface { Create(ctx context.Context, params *pb.CreateProjectPipelineRequest) (*pb.CreateProjectPipelineResponse, error) BatchCreateByGittarPushHook(ctx context.Context, params *pb.GittarPushPayloadEvent) (*pb.BatchCreateProjectPipelineResponse, error) List(ctx context.Context, params deftype.ProjectPipelineList) ([]*dpb.PipelineDefinition, int64, error) ListUsedRefs(ctx context.Context, params deftype.ProjectPipelineUsedRefList) ([]string, error) Delete(ctx context.Context, params deftype.ProjectPipelineDelete) (*deftype.ProjectPipelineDeleteResult, error) Update(ctx context.Context, params *pb.UpdateProjectPipelineRequest) (*pb.UpdateProjectPipelineResponse, error) SetPrimary(ctx context.Context, params deftype.ProjectPipelineCategory) (*dpb.PipelineDefinitionUpdateResponse, error) UnSetPrimary(ctx context.Context, params deftype.ProjectPipelineCategory) (*dpb.PipelineDefinitionUpdateResponse, error) ListApp(ctx context.Context, params *pb.ListAppRequest) (*pb.ListAppResponse, error) ListPipelineYml(ctx context.Context, req *pb.ListAppPipelineYmlRequest) (*pb.ListAppPipelineYmlResponse, error) CreateNamePreCheck(ctx context.Context, req *pb.CreateProjectPipelineNamePreCheckRequest) (*pb.CreateProjectPipelineNamePreCheckResponse, error) CreateSourcePreCheck(ctx context.Context, req *pb.CreateProjectPipelineSourcePreCheckRequest) (*pb.CreateProjectPipelineSourcePreCheckResponse, error) OneClickCreate(ctx context.Context, params *pb.OneClickCreateProjectPipelineRequest) (*pb.OneClickCreateProjectPipelineResponse, error) Run(ctx context.Context, params *pb.RunProjectPipelineRequest) (*pb.RunProjectPipelineResponse, error) Cancel(ctx context.Context, params *pb.CancelProjectPipelineRequest) (*pb.CancelProjectPipelineResponse, error) Rerun(ctx context.Context, params *pb.RerunProjectPipelineRequest) (*pb.RerunProjectPipelineResponse, error) RerunFailed(ctx context.Context, params *pb.RerunFailedProjectPipelineRequest) (*pb.RerunFailedProjectPipelineResponse, error) BatchRun(ctx context.Context, params deftype.ProjectPipelineBatchRun) (*deftype.ProjectPipelineBatchRunResult, error) StartCron(ctx context.Context, params deftype.ProjectPipelineStartCron) (*deftype.ProjectPipelineStartCronResult, error) EndCron(ctx context.Context, params deftype.ProjectPipelineEndCron) (*deftype.ProjectPipelineEndCronResult, error) ListExecHistory(ctx context.Context, params *pb.ListPipelineExecHistoryRequest) (*pb.ListPipelineExecHistoryResponse, error) DeleteByApp(ctx context.Context, params *pb.DeleteByAppRequest) (*pb.DeleteByAppResponse, error) }
Click to show internal directories.
Click to hide internal directories.