Documentation ¶
Index ¶
- Variables
- func IsNotFoundError(err error) bool
- type Client
- func (client *Client) AppendPipelineEvent(pipelineID uint64, newEvents []*basepb.PipelineEvent, ops ...SessionOption) error
- func (client *Client) BatchCreatePipelineStages(stages []spec.PipelineStage, ops ...SessionOption) (err error)
- func (client *Client) BatchCreatePipelineTasks(pts []spec.PipelineTask, ops ...SessionOption) (err error)
- func (client *Client) BatchInsertLabels(labels []spec.PipelineLabel, ops ...SessionOption) (err error)
- func (client *Client) BatchListPipelineReportsByPipelineID(pipelineIDs []uint64, types []string, ops ...SessionOption) (map[uint64][]spec.PipelineReport, error)
- func (client *Client) BatchUpdatePipelineBaseByDefinitionIDs(ids []string, updateMap map[spec.Field]interface{}, ops ...SessionOption) error
- func (client *Client) CleanPipelineTaskResult(id uint64, ops ...SessionOption) error
- func (client *Client) ConvertPipelineReport(dbReport spec.PipelineReport) apistructs.PipelineReport
- func (client *Client) CreatePipeline(p *spec.Pipeline, ops ...SessionOption) error
- func (client *Client) CreatePipelineBase(base *spec.PipelineBase, ops ...SessionOption) error
- func (client *Client) CreatePipelineExtra(extra *spec.PipelineExtra, ops ...SessionOption) error
- func (client *Client) CreatePipelineLabels(p *spec.Pipeline, ops ...SessionOption) (err error)
- func (client *Client) CreatePipelineQueue(req *pb.QueueCreateRequest, ops ...SessionOption) (*pb.Queue, error)
- func (client *Client) CreatePipelineReport(report *spec.PipelineReport, ops ...SessionOption) error
- func (client *Client) CreatePipelineStage(ps *spec.PipelineStage, ops ...SessionOption) (err error)
- func (client *Client) CreatePipelineTask(pt *spec.PipelineTask, ops ...SessionOption) (err error)
- func (client *Client) DeletePipeline(id uint64, ops ...SessionOption) error
- func (client *Client) DeletePipelineLabelsByPipelineID(pipelineID uint64, ops ...SessionOption) error
- func (client *Client) DeletePipelineQueue(queueID uint64, ops ...SessionOption) error
- func (client *Client) DeletePipelineRelated(pipelineID uint64, ops ...SessionOption) error
- func (client *Client) DeletePipelineReportsByPipelineID(pipelineID uint64, ops ...SessionOption) error
- func (client *Client) DeletePipelineStagesByPipelineID(pipelineID uint64, ops ...SessionOption) error
- func (client *Client) DeletePipelineTasksByPipelineID(pipelineID uint64, ops ...SessionOption) error
- func (client *Client) FindCauseFailedPipelineTasks(pipelineID uint64) (spec.RerunFailedDetail, error)
- func (client *Client) FindLifecycleHookClientList(ops ...SessionOption) (clients []*PipelineLifecycleHookClient, err error)
- func (client *Client) FindPipelineTaskByName(pipelineID uint64, name string) (spec.PipelineTask, error)
- func (client *Client) FindSnippetClientList() (clients []*DicePipelineSnippetClient, err error)
- func (client *Client) GetLabel(id uint64) (label *spec.PipelineLabel, err error)
- func (client *Client) GetPipeline(id uint64, ops ...SessionOption) (spec.Pipeline, error)
- func (client *Client) GetPipelineBase(id uint64, ops ...SessionOption) (spec.PipelineBase, bool, error)
- func (client *Client) GetPipelineBaseByFilter(filter *PipelineBaseFilter, ops ...SessionOption) ([]spec.PipelineBase, error)
- func (client *Client) GetPipelineDefinition(id string, ops ...SessionOption) (*db.PipelineDefinition, error)
- func (client *Client) GetPipelineDefinitionByIDs(ids []string, ops ...SessionOption) ([]*db.PipelineDefinition, error)
- func (client *Client) GetPipelineDefinitionByPipelineID(pipelineID uint64, ops ...SessionOption) (*db.PipelineDefinition, bool, error)
- func (client *Client) GetPipelineEvents(pipelineID uint64, ops ...SessionOption) (*spec.PipelineReport, []*basepb.PipelineEvent, error)
- func (client *Client) GetPipelineExtraByPipelineID(pipelineID uint64, ops ...SessionOption) (spec.PipelineExtra, bool, error)
- func (client *Client) GetPipelineOutputs(pipelineID uint64) (map[string]map[string]string, error)
- func (client *Client) GetPipelineQueue(queueID uint64, ops ...SessionOption) (*pb.Queue, bool, error)
- func (client *Client) GetPipelineStage(id uint64, ops ...SessionOption) (spec.PipelineStage, error)
- func (client *Client) GetPipelineStageWithPreStatus(id uint64, ops ...SessionOption) (spec.PipelineStage, error)
- func (client *Client) GetPipelineStatus(id uint64, ops ...SessionOption) (apistructs.PipelineStatus, error)
- func (client *Client) GetPipelineTask(id uint64) (spec.PipelineTask, error)
- func (client *Client) GetPipelineWithExistInfo(id uint64, ops ...SessionOption) (spec.Pipeline, bool, error)
- func (client *Client) GetPipelineWithTasks(id uint64) (*spec.PipelineWithTasks, error)
- func (client *Client) IncreaseExecutedActionNum(id string, ops ...SessionOption) error
- func (client *Client) InsertOrUpdateLifeCycleClient(hookClient *PipelineLifecycleHookClient, ops ...SessionOption) error
- func (client *Client) ListLabelsByPipelineID(pipelineID uint64, ops ...SessionOption) ([]spec.PipelineLabel, error)
- func (client *Client) ListPipelineBaseWithDefinitionByIDs(pipelineIDs []uint64, ops ...SessionOption) (map[uint64]spec.PipelineBaseWithDefinition, error)
- func (client *Client) ListPipelineBasesByIDs(pipelineIDs []uint64, ops ...SessionOption) (map[uint64]spec.PipelineBase, error)
- func (client *Client) ListPipelineConfigsOfActionExecutor() (configs []spec.PipelineConfig, cfgChan chan spec.ActionExecutorConfig, ...)
- func (client *Client) ListPipelineExtrasByPipelineIDs(pipelineIDs []uint64, ops ...SessionOption) (map[uint64]spec.PipelineExtra, error)
- func (client *Client) ListPipelineIDsByStatuses(status ...apistructs.PipelineStatus) ([]uint64, error)
- func (client *Client) ListPipelineLabels(req *pb.PipelineLabelListRequest, ops ...SessionOption) ([]spec.PipelineLabel, int64, error)
- func (client *Client) ListPipelineLabelsByTypeAndTargetIDs(_type apistructs.PipelineLabelType, targetIDs []uint64, ops ...SessionOption) (map[uint64][]spec.PipelineLabel, error)
- func (client *Client) ListPipelineSources() ([]apistructs.PipelineSource, error)
- func (client *Client) ListPipelineStageByPipelineID(pipelineID uint64, ops ...SessionOption) ([]spec.PipelineStage, error)
- func (client *Client) ListPipelineStageByStatuses(statuses ...apistructs.PipelineStatus) ([]spec.PipelineStage, error)
- func (client *Client) ListPipelineTasksByPipelineID(pipelineID uint64, ops ...SessionOption) ([]spec.PipelineTask, error)
- func (client *Client) ListPipelineTasksByStageID(stageID uint64) ([]*spec.PipelineTask, error)
- func (client *Client) ListPipelineTasksByTypeStatuses(typ string, statuses ...apistructs.PipelineStatus) ([]spec.PipelineTask, error)
- func (client *Client) ListPipelinesByIDs(pipelineIDs []uint64, needQueryDefinition bool, ops ...SessionOption) ([]spec.Pipeline, error)
- func (client *Client) MakePipelineReportTypeLabelKey(typ apistructs.PipelineReportType) (string, string)
- func (client *Client) NewSession(ops ...SessionOption) *Session
- func (client *Client) PageListPipelines(req *pipelinepb.PipelinePagingRequest, ops ...SessionOption) (*PageListPipelinesResult, error)
- func (client *Client) PagingPipelineQueues(req *pb.QueuePagingRequest, ops ...SessionOption) (*pb.QueuePagingResponse, error)
- func (client *Client) PagingPipelineReportSets(req *pb.PipelineReportSetPagingRequest, ops ...SessionOption) ([]*pb.PipelineReportSet, int, error)
- func (client *Client) ParseRerunFailedDetail(detail *spec.RerunFailedDetail) (map[string]*spec.PipelineTask, map[string]*spec.PipelineTask, error)
- func (client *Client) PipelineStatistic(source, clusterName string) (*pipelinepb.PipelineStatisticResponseData, error)
- func (client *Client) RefreshPipeline(p *spec.Pipeline) error
- func (client *Client) RefreshPipelineTask(task *spec.PipelineTask) error
- func (client *Client) SelectTargetIDsByLabels(req apistructs.TargetIDSelectByLabelRequest, ops ...SessionOption) (targetIDs []uint64, err error)
- func (client *Client) StoreAnalyzedCrossCluster(pipelineID uint64, analyzedCrossCluster bool, ops ...SessionOption) error
- func (client *Client) UpdatePipelineBase(id uint64, base *spec.PipelineBase, ops ...SessionOption) error
- func (client *Client) UpdatePipelineBaseStatus(id uint64, status apistructs.PipelineStatus, ops ...SessionOption) error
- func (client *Client) UpdatePipelineDefinition(id string, pipelineDefinition *db.PipelineDefinition, ops ...SessionOption) error
- func (client *Client) UpdatePipelineExtraByPipelineID(pipelineID uint64, extra *spec.PipelineExtra, ops ...SessionOption) error
- func (client *Client) UpdatePipelineExtraExtraInfoByPipelineID(pipelineID uint64, extraInfo spec.PipelineExtraInfo, ops ...SessionOption) error
- func (client *Client) UpdatePipelineExtraSnapshot(pipelineID uint64, snapshot spec.Snapshot, ops ...SessionOption) error
- func (client *Client) UpdatePipelineProgress(pipelineID uint64, progress int, ops ...SessionOption) error
- func (client *Client) UpdatePipelineQueue(req *pb.QueueUpdateRequest, ops ...SessionOption) (*pb.Queue, error)
- func (client *Client) UpdatePipelineReport(report *spec.PipelineReport, ops ...SessionOption) error
- func (client *Client) UpdatePipelineShowMessage(pipelineID uint64, showMessage basepb.ShowMessage, ops ...SessionOption) error
- func (client *Client) UpdatePipelineStage(id uint64, stage *spec.PipelineStage) error
- func (client *Client) UpdatePipelineTask(id uint64, task *spec.PipelineTask, ops ...SessionOption) error
- func (client *Client) UpdatePipelineTaskContext(id uint64, ctx spec.PipelineTaskContext, ops ...SessionOption) error
- func (client *Client) UpdatePipelineTaskExtra(id uint64, extra spec.PipelineTaskExtra, ops ...SessionOption) error
- func (client *Client) UpdatePipelineTaskInspect(id uint64, inspect taskinspect.Inspect) error
- func (client *Client) UpdatePipelineTaskMetadata(id uint64, result *taskresult.Result) error
- func (client *Client) UpdatePipelineTaskSnippetDetail(id uint64, snippetDetail apistructs.PipelineTaskSnippetDetail, ...) error
- func (client *Client) UpdatePipelineTaskStatus(id uint64, status apistructs.PipelineStatus, ops ...SessionOption) error
- func (client *Client) UpdatePipelineTaskTime(p *spec.Pipeline, ops ...SessionOption) error
- func (client *Client) UpdateWholeStatusBorn(pipelineID uint64, ops ...SessionOption) (err error)
- type DicePipelineSnippetClient
- type PageListPipelinesResult
- type PipelineBaseFilter
- type PipelineLifecycleHookClient
- type PipelineSnippetClientExtra
- type Session
- type SessionOption
Constants ¶
This section is empty.
Variables ¶
var ( ErrZeroAffectedRows = errors.New("affected rows was 0") ErrRecordNotFound = errors.New("not found") )
var NotFoundBaseError = dbError{/* contains filtered or unexported fields */}
Functions ¶
func IsNotFoundError ¶
Types ¶
type Client ¶
func (*Client) AppendPipelineEvent ¶
func (client *Client) AppendPipelineEvent(pipelineID uint64, newEvents []*basepb.PipelineEvent, ops ...SessionOption) error
func (*Client) BatchCreatePipelineStages ¶
func (client *Client) BatchCreatePipelineStages(stages []spec.PipelineStage, ops ...SessionOption) (err error)
func (*Client) BatchCreatePipelineTasks ¶
func (client *Client) BatchCreatePipelineTasks(pts []spec.PipelineTask, ops ...SessionOption) (err error)
func (*Client) BatchInsertLabels ¶
func (client *Client) BatchInsertLabels(labels []spec.PipelineLabel, ops ...SessionOption) (err error)
func (*Client) BatchListPipelineReportsByPipelineID ¶
func (client *Client) BatchListPipelineReportsByPipelineID(pipelineIDs []uint64, types []string, ops ...SessionOption) (map[uint64][]spec.PipelineReport, error)
func (*Client) BatchUpdatePipelineBaseByDefinitionIDs ¶
func (*Client) CleanPipelineTaskResult ¶
func (client *Client) CleanPipelineTaskResult(id uint64, ops ...SessionOption) error
func (*Client) ConvertPipelineReport ¶
func (client *Client) ConvertPipelineReport(dbReport spec.PipelineReport) apistructs.PipelineReport
func (*Client) CreatePipeline ¶
func (client *Client) CreatePipeline(p *spec.Pipeline, ops ...SessionOption) error
CreatePipeline: base + extra + labels
func (*Client) CreatePipelineBase ¶
func (client *Client) CreatePipelineBase(base *spec.PipelineBase, ops ...SessionOption) error
func (*Client) CreatePipelineExtra ¶
func (client *Client) CreatePipelineExtra(extra *spec.PipelineExtra, ops ...SessionOption) error
func (*Client) CreatePipelineLabels ¶
func (client *Client) CreatePipelineLabels(p *spec.Pipeline, ops ...SessionOption) (err error)
func (*Client) CreatePipelineQueue ¶
func (client *Client) CreatePipelineQueue(req *pb.QueueCreateRequest, ops ...SessionOption) (*pb.Queue, error)
CreatePipelineQueue
func (*Client) CreatePipelineReport ¶
func (client *Client) CreatePipelineReport(report *spec.PipelineReport, ops ...SessionOption) error
func (*Client) CreatePipelineStage ¶
func (client *Client) CreatePipelineStage(ps *spec.PipelineStage, ops ...SessionOption) (err error)
func (*Client) CreatePipelineTask ¶
func (client *Client) CreatePipelineTask(pt *spec.PipelineTask, ops ...SessionOption) (err error)
func (*Client) DeletePipeline ¶
func (client *Client) DeletePipeline(id uint64, ops ...SessionOption) error
func (*Client) DeletePipelineLabelsByPipelineID ¶
func (client *Client) DeletePipelineLabelsByPipelineID(pipelineID uint64, ops ...SessionOption) error
func (*Client) DeletePipelineQueue ¶
func (client *Client) DeletePipelineQueue(queueID uint64, ops ...SessionOption) error
DeletePipelineQueue
func (*Client) DeletePipelineRelated ¶
func (client *Client) DeletePipelineRelated(pipelineID uint64, ops ...SessionOption) error
func (*Client) DeletePipelineReportsByPipelineID ¶
func (client *Client) DeletePipelineReportsByPipelineID(pipelineID uint64, ops ...SessionOption) error
func (*Client) DeletePipelineStagesByPipelineID ¶
func (client *Client) DeletePipelineStagesByPipelineID(pipelineID uint64, ops ...SessionOption) error
func (*Client) DeletePipelineTasksByPipelineID ¶
func (client *Client) DeletePipelineTasksByPipelineID(pipelineID uint64, ops ...SessionOption) error
func (*Client) FindCauseFailedPipelineTasks ¶
func (client *Client) FindCauseFailedPipelineTasks(pipelineID uint64) (spec.RerunFailedDetail, error)
FindCauseFailedPipelineTasks 寻找导致失败的节点
func (*Client) FindLifecycleHookClientList ¶
func (client *Client) FindLifecycleHookClientList(ops ...SessionOption) (clients []*PipelineLifecycleHookClient, err error)
func (*Client) FindPipelineTaskByName ¶
func (*Client) FindSnippetClientList ¶
func (client *Client) FindSnippetClientList() (clients []*DicePipelineSnippetClient, err error)
func (*Client) GetLabel ¶
func (client *Client) GetLabel(id uint64) (label *spec.PipelineLabel, err error)
func (*Client) GetPipeline ¶
GetPipeline: base + extra + labels
func (*Client) GetPipelineBase ¶
func (client *Client) GetPipelineBase(id uint64, ops ...SessionOption) (spec.PipelineBase, bool, error)
func (*Client) GetPipelineBaseByFilter ¶
func (client *Client) GetPipelineBaseByFilter(filter *PipelineBaseFilter, ops ...SessionOption) ([]spec.PipelineBase, error)
func (*Client) GetPipelineDefinition ¶
func (client *Client) GetPipelineDefinition(id string, ops ...SessionOption) (*db.PipelineDefinition, error)
func (*Client) GetPipelineDefinitionByIDs ¶
func (client *Client) GetPipelineDefinitionByIDs(ids []string, ops ...SessionOption) ([]*db.PipelineDefinition, error)
func (*Client) GetPipelineDefinitionByPipelineID ¶
func (client *Client) GetPipelineDefinitionByPipelineID(pipelineID uint64, ops ...SessionOption) (*db.PipelineDefinition, bool, error)
func (*Client) GetPipelineEvents ¶
func (client *Client) GetPipelineEvents(pipelineID uint64, ops ...SessionOption) (*spec.PipelineReport, []*basepb.PipelineEvent, error)
GetPipelineEvents get pipeline events from reports. return: report, events, error
func (*Client) GetPipelineExtraByPipelineID ¶
func (client *Client) GetPipelineExtraByPipelineID(pipelineID uint64, ops ...SessionOption) (spec.PipelineExtra, bool, error)
func (*Client) GetPipelineOutputs ¶
GetPipelineOutputs 返回 pipeline 下所有 task 的 output
func (*Client) GetPipelineQueue ¶
func (client *Client) GetPipelineQueue(queueID uint64, ops ...SessionOption) (*pb.Queue, bool, error)
GetPipelineQueue
func (*Client) GetPipelineStage ¶
func (client *Client) GetPipelineStage(id uint64, ops ...SessionOption) (spec.PipelineStage, error)
func (*Client) GetPipelineStageWithPreStatus ¶
func (client *Client) GetPipelineStageWithPreStatus(id uint64, ops ...SessionOption) (spec.PipelineStage, error)
func (*Client) GetPipelineStatus ¶
func (client *Client) GetPipelineStatus(id uint64, ops ...SessionOption) (apistructs.PipelineStatus, error)
func (*Client) GetPipelineTask ¶
func (client *Client) GetPipelineTask(id uint64) (spec.PipelineTask, error)
func (*Client) GetPipelineWithExistInfo ¶
func (client *Client) GetPipelineWithExistInfo(id uint64, ops ...SessionOption) (spec.Pipeline, bool, error)
GetPipelineWithExistInfo 当 id 对应的流水线记录不存在时,error = nil, found = false
func (*Client) GetPipelineWithTasks ¶
func (client *Client) GetPipelineWithTasks(id uint64) (*spec.PipelineWithTasks, error)
GetPipelineWithTasks
func (*Client) IncreaseExecutedActionNum ¶
func (client *Client) IncreaseExecutedActionNum(id string, ops ...SessionOption) error
func (*Client) InsertOrUpdateLifeCycleClient ¶
func (client *Client) InsertOrUpdateLifeCycleClient(hookClient *PipelineLifecycleHookClient, ops ...SessionOption) error
func (*Client) ListLabelsByPipelineID ¶
func (client *Client) ListLabelsByPipelineID(pipelineID uint64, ops ...SessionOption) ([]spec.PipelineLabel, error)
ListLabelsByPipelineID 根据 pipelineID 获取 labels
func (*Client) ListPipelineBaseWithDefinitionByIDs ¶
func (client *Client) ListPipelineBaseWithDefinitionByIDs(pipelineIDs []uint64, ops ...SessionOption) (map[uint64]spec.PipelineBaseWithDefinition, error)
func (*Client) ListPipelineBasesByIDs ¶
func (client *Client) ListPipelineBasesByIDs(pipelineIDs []uint64, ops ...SessionOption) (map[uint64]spec.PipelineBase, error)
func (*Client) ListPipelineConfigsOfActionExecutor ¶
func (client *Client) ListPipelineConfigsOfActionExecutor() (configs []spec.PipelineConfig, cfgChan chan spec.ActionExecutorConfig, err error)
func (*Client) ListPipelineExtrasByPipelineIDs ¶
func (client *Client) ListPipelineExtrasByPipelineIDs(pipelineIDs []uint64, ops ...SessionOption) (map[uint64]spec.PipelineExtra, error)
func (*Client) ListPipelineIDsByStatuses ¶
func (client *Client) ListPipelineIDsByStatuses(status ...apistructs.PipelineStatus) ([]uint64, error)
ListPipelineIDsByStatuses
func (*Client) ListPipelineLabels ¶
func (client *Client) ListPipelineLabels(req *pb.PipelineLabelListRequest, ops ...SessionOption) ([]spec.PipelineLabel, int64, error)
func (*Client) ListPipelineLabelsByTypeAndTargetIDs ¶
func (client *Client) ListPipelineLabelsByTypeAndTargetIDs(_type apistructs.PipelineLabelType, targetIDs []uint64, ops ...SessionOption) (map[uint64][]spec.PipelineLabel, error)
func (*Client) ListPipelineSources ¶
func (client *Client) ListPipelineSources() ([]apistructs.PipelineSource, error)
func (*Client) ListPipelineStageByPipelineID ¶
func (client *Client) ListPipelineStageByPipelineID(pipelineID uint64, ops ...SessionOption) ([]spec.PipelineStage, error)
func (*Client) ListPipelineStageByStatuses ¶
func (client *Client) ListPipelineStageByStatuses(statuses ...apistructs.PipelineStatus) ([]spec.PipelineStage, error)
func (*Client) ListPipelineTasksByPipelineID ¶
func (client *Client) ListPipelineTasksByPipelineID(pipelineID uint64, ops ...SessionOption) ([]spec.PipelineTask, error)
func (*Client) ListPipelineTasksByStageID ¶
func (client *Client) ListPipelineTasksByStageID(stageID uint64) ([]*spec.PipelineTask, error)
func (*Client) ListPipelineTasksByTypeStatuses ¶
func (client *Client) ListPipelineTasksByTypeStatuses(typ string, statuses ...apistructs.PipelineStatus) ([]spec.PipelineTask, error)
func (*Client) ListPipelinesByIDs ¶
func (*Client) MakePipelineReportTypeLabelKey ¶
func (client *Client) MakePipelineReportTypeLabelKey(typ apistructs.PipelineReportType) (string, string)
func (*Client) NewSession ¶
func (client *Client) NewSession(ops ...SessionOption) *Session
func (*Client) PageListPipelines ¶
func (client *Client) PageListPipelines(req *pipelinepb.PipelinePagingRequest, ops ...SessionOption) (*PageListPipelinesResult, error)
PageListPipelines return pagingPipelines, pagingPipelineIDs, total, currentPageSize, error
func (*Client) PagingPipelineQueues ¶
func (client *Client) PagingPipelineQueues(req *pb.QueuePagingRequest, ops ...SessionOption) (*pb.QueuePagingResponse, error)
func (*Client) PagingPipelineReportSets ¶
func (client *Client) PagingPipelineReportSets(req *pb.PipelineReportSetPagingRequest, ops ...SessionOption) ([]*pb.PipelineReportSet, int, error)
func (*Client) ParseRerunFailedDetail ¶
func (client *Client) ParseRerunFailedDetail(detail *spec.RerunFailedDetail) ( map[string]*spec.PipelineTask, map[string]*spec.PipelineTask, error)
func (*Client) PipelineStatistic ¶
func (client *Client) PipelineStatistic(source, clusterName string) (*pipelinepb.PipelineStatisticResponseData, error)
PipelineStatistic pipeline operation statistics
func (*Client) RefreshPipeline ¶
RefreshPipeline 更新 pipeline
func (*Client) RefreshPipelineTask ¶
func (client *Client) RefreshPipelineTask(task *spec.PipelineTask) error
func (*Client) SelectTargetIDsByLabels ¶
func (client *Client) SelectTargetIDsByLabels(req apistructs.TargetIDSelectByLabelRequest, ops ...SessionOption) (targetIDs []uint64, err error)
func (*Client) StoreAnalyzedCrossCluster ¶
func (client *Client) StoreAnalyzedCrossCluster(pipelineID uint64, analyzedCrossCluster bool, ops ...SessionOption) error
func (*Client) UpdatePipelineBase ¶
func (client *Client) UpdatePipelineBase(id uint64, base *spec.PipelineBase, ops ...SessionOption) error
func (*Client) UpdatePipelineBaseStatus ¶
func (client *Client) UpdatePipelineBaseStatus(id uint64, status apistructs.PipelineStatus, ops ...SessionOption) error
func (*Client) UpdatePipelineDefinition ¶
func (client *Client) UpdatePipelineDefinition(id string, pipelineDefinition *db.PipelineDefinition, ops ...SessionOption) error
func (*Client) UpdatePipelineExtraByPipelineID ¶
func (client *Client) UpdatePipelineExtraByPipelineID(pipelineID uint64, extra *spec.PipelineExtra, ops ...SessionOption) error
func (*Client) UpdatePipelineExtraExtraInfoByPipelineID ¶
func (client *Client) UpdatePipelineExtraExtraInfoByPipelineID(pipelineID uint64, extraInfo spec.PipelineExtraInfo, ops ...SessionOption) error
func (*Client) UpdatePipelineExtraSnapshot ¶
func (*Client) UpdatePipelineProgress ¶
func (client *Client) UpdatePipelineProgress(pipelineID uint64, progress int, ops ...SessionOption) error
func (*Client) UpdatePipelineQueue ¶
func (client *Client) UpdatePipelineQueue(req *pb.QueueUpdateRequest, ops ...SessionOption) (*pb.Queue, error)
UpdatePipelineQueue
func (*Client) UpdatePipelineReport ¶
func (client *Client) UpdatePipelineReport(report *spec.PipelineReport, ops ...SessionOption) error
func (*Client) UpdatePipelineShowMessage ¶
func (client *Client) UpdatePipelineShowMessage(pipelineID uint64, showMessage basepb.ShowMessage, ops ...SessionOption) error
UpdatePipelineShowMessage 更新 extra.ExtraInfo.ShowMessage
func (*Client) UpdatePipelineStage ¶
func (client *Client) UpdatePipelineStage(id uint64, stage *spec.PipelineStage) error
func (*Client) UpdatePipelineTask ¶
func (client *Client) UpdatePipelineTask(id uint64, task *spec.PipelineTask, ops ...SessionOption) error
func (*Client) UpdatePipelineTaskContext ¶
func (client *Client) UpdatePipelineTaskContext(id uint64, ctx spec.PipelineTaskContext, ops ...SessionOption) error
func (*Client) UpdatePipelineTaskExtra ¶
func (client *Client) UpdatePipelineTaskExtra(id uint64, extra spec.PipelineTaskExtra, ops ...SessionOption) error
func (*Client) UpdatePipelineTaskInspect ¶
func (client *Client) UpdatePipelineTaskInspect(id uint64, inspect taskinspect.Inspect) error
func (*Client) UpdatePipelineTaskMetadata ¶
func (client *Client) UpdatePipelineTaskMetadata(id uint64, result *taskresult.Result) error
func (*Client) UpdatePipelineTaskSnippetDetail ¶
func (client *Client) UpdatePipelineTaskSnippetDetail(id uint64, snippetDetail apistructs.PipelineTaskSnippetDetail, ops ...SessionOption) error
UpdatePipelineTaskSnippetDetail 更新 snippet task 的 snippet 信息
func (*Client) UpdatePipelineTaskStatus ¶
func (client *Client) UpdatePipelineTaskStatus(id uint64, status apistructs.PipelineStatus, ops ...SessionOption) error
func (*Client) UpdatePipelineTaskTime ¶
func (client *Client) UpdatePipelineTaskTime(p *spec.Pipeline, ops ...SessionOption) error
UpdatePipelineTaskTime update the costTime,timeBegin and timeEnd of pipeline task
func (*Client) UpdateWholeStatusBorn ¶
func (client *Client) UpdateWholeStatusBorn(pipelineID uint64, ops ...SessionOption) (err error)
UpdateWholeStatusBorn 状态更新顺序:task -> stage -> pipeline
type DicePipelineSnippetClient ¶
type DicePipelineSnippetClient struct { ID uint64 `json:"id" xorm:"pk autoincr"` Name string `json:"name"` Host string `json:"host"` Extra PipelineSnippetClientExtra `json:"extra" xorm:"json"` }
func (*DicePipelineSnippetClient) TableName ¶
func (ps *DicePipelineSnippetClient) TableName() string
type PageListPipelinesResult ¶
type PageListPipelinesResult struct { Pipelines []spec.Pipeline PagingPipelineIDs []uint64 Total int64 CurrentPageSize int64 }
func (*PageListPipelinesResult) GetMaxPipelineID ¶
func (p *PageListPipelinesResult) GetMaxPipelineID() uint64
func (*PageListPipelinesResult) GetMinPipelineID ¶
func (p *PageListPipelinesResult) GetMinPipelineID() uint64
type PipelineBaseFilter ¶
type PipelineBaseFilter struct { ID []uint64 PipelineSource []apistructs.PipelineSource PipelineYmName []string ClusterName []string Status []apistructs.PipelineStatus Type []apistructs.PipelineType TriggerMode []apistructs.PipelineTriggerMode CronID []uint64 IsSnippet []uint64 StartTimeCreated *time.Time EndTimeCreated *time.Time StartTimeUpdated *time.Time EndTimeUpdated *time.Time PipelineDefinitionID []string }
type PipelineLifecycleHookClient ¶
type PipelineLifecycleHookClient struct { ID uint64 `json:"id" xorm:"pk autoincr"` Name string `json:"name"` Host string `json:"host"` Prefix string `json:"prefix"` }
func (*PipelineLifecycleHookClient) TableName ¶
func (ps *PipelineLifecycleHookClient) TableName() string
type PipelineSnippetClientExtra ¶
type PipelineSnippetClientExtra struct {
UrlPathPrefix string `json:"urlPathPrefix"`
}
type Session ¶
type SessionOption ¶
type SessionOption func(*Session)
func WithAllowZeroAffectedRows ¶
func WithAllowZeroAffectedRows(allow bool) SessionOption
func WithNoAutoTime ¶
func WithNoAutoTime() SessionOption
WithNoAutoTime 仅作用在当前 session 若该 op 后接 WithTxSession 等其他从外部传入 session 的 op,则 WithNoAutoTime 不会在传入的 session 上生效 因此需要注意 op 顺序
func WithTxSession ¶
func WithTxSession(_session *xorm.Session) SessionOption
Source Files ¶
- dbclient.go
- error.go
- op_pipeline.go
- op_pipeline_base.go
- op_pipeline_config.go
- op_pipeline_definition.go
- op_pipeline_delete.go
- op_pipeline_event.go
- op_pipeline_extra.go
- op_pipeline_labels.go
- op_pipeline_lifecycle_hook_client.go
- op_pipeline_queue.go
- op_pipeline_report.go
- op_pipeline_snippet_client.go
- op_pipeline_stage.go
- op_pipeline_task.go
- op_pipeline_task_snippet.go