Documentation ¶
Index ¶
- Variables
- func Approve(ctx context.Context, store store.Store, currentPipeline *model.Pipeline, ...) (*model.Pipeline, error)
- func Cancel(ctx context.Context, _forge forge.Forge, store store.Store, repo *model.Repo, ...) error
- func Create(ctx context.Context, _store store.Store, repo *model.Repo, ...) (*model.Pipeline, error)
- func Decline(ctx context.Context, store store.Store, pipeline *model.Pipeline, ...) (*model.Pipeline, error)
- func Restart(ctx context.Context, store store.Store, lastPipeline *model.Pipeline, ...) (*model.Pipeline, error)
- func UpdateStatusToDone(store store.Store, pipeline model.Pipeline, status model.StatusValue, ...) (*model.Pipeline, error)
- func UpdateStepStatus(store store.Store, step *model.Step, state rpc.StepState) error
- func UpdateStepStatusToDone(store store.Store, step model.Step, state rpc.StepState) (*model.Step, error)
- func UpdateStepToStatusKilled(store store.Store, step model.Step) (*model.Step, error)
- func UpdateStepToStatusSkipped(store store.Store, step model.Step, finished int64) (*model.Step, error)
- func UpdateStepToStatusStarted(store store.Store, step model.Step, state rpc.StepState) (*model.Step, error)
- func UpdateToStatusDeclined(store store.Store, pipeline model.Pipeline, reviewer string) (*model.Pipeline, error)
- func UpdateToStatusError(store store.Store, pipeline model.Pipeline, err error) (*model.Pipeline, error)
- func UpdateToStatusKilled(store store.Store, pipeline model.Pipeline) (*model.Pipeline, error)
- func UpdateToStatusPending(store store.Store, pipeline model.Pipeline, reviewer string) (*model.Pipeline, error)
- func UpdateToStatusRunning(store store.Store, pipeline model.Pipeline, started int64) (*model.Pipeline, error)
- func UpdateWorkflowStatusToDone(store store.Store, workflow model.Workflow, state rpc.WorkflowState) (*model.Workflow, error)
- func UpdateWorkflowStatusToRunning(store store.Store, workflow model.Workflow, state rpc.WorkflowState) (*model.Workflow, error)
- func UpdateWorkflowToStatusSkipped(store store.Store, workflow model.Workflow) (*model.Workflow, error)
- type ErrBadRequest
- type ErrNotFound
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrFiltered = errors.New("ignoring hook: 'when' filters filtered out all steps")
Functions ¶
func Approve ¶
func Approve(ctx context.Context, store store.Store, currentPipeline *model.Pipeline, user *model.User, repo *model.Repo) (*model.Pipeline, error)
Approve update the status to pending for a blocked pipeline so it can be executed.
func Cancel ¶
func Cancel(ctx context.Context, _forge forge.Forge, store store.Store, repo *model.Repo, user *model.User, pipeline *model.Pipeline) error
Cancel the pipeline and returns the status.
func Create ¶
func Create(ctx context.Context, _store store.Store, repo *model.Repo, pipeline *model.Pipeline) (*model.Pipeline, error)
Create a new pipeline and start it.
func Decline ¶
func Decline(ctx context.Context, store store.Store, pipeline *model.Pipeline, user *model.User, repo *model.Repo) (*model.Pipeline, error)
Decline updates the status to declined for blocked pipelines.
func Restart ¶
func Restart(ctx context.Context, store store.Store, lastPipeline *model.Pipeline, user *model.User, repo *model.Repo, envs map[string]string) (*model.Pipeline, error)
Restart a pipeline by creating a new one out of the old and start it.
func UpdateStatusToDone ¶
func UpdateStepStatus ¶
func UpdateStepStatusToDone ¶
func UpdateToStatusDeclined ¶
func UpdateToStatusError ¶
func UpdateToStatusKilled ¶
func UpdateToStatusPending ¶
func UpdateToStatusRunning ¶
func UpdateWorkflowStatusToRunning ¶ added in v2.7.0
Types ¶
type ErrBadRequest ¶
type ErrBadRequest struct {
Msg string
}
func (ErrBadRequest) Error ¶
func (e ErrBadRequest) Error() string
func (ErrBadRequest) Is ¶
func (e ErrBadRequest) Is(target error) bool
type ErrNotFound ¶
type ErrNotFound struct {
Msg string
}
func (ErrNotFound) Error ¶
func (e ErrNotFound) Error() string
func (ErrNotFound) Is ¶
func (e ErrNotFound) Is(target error) bool
Source Files ¶
Click to show internal directories.
Click to hide internal directories.