Documentation
¶
Index ¶
- Variables
- func CallbackExecutor(_ context.Context, task *Task) error
- func CompletedExecutor(_ context.Context, task *Task) error
- type Change
- type Changes
- type Client
- type Executor
- type LogType
- type PagedBuildsResponse
- type Request
- type Stage
- type StageName
- type Stages
- type Status
- type Step
- type Task
- type Updater
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrAuthFailed = fmt.Errorf("authentication failed")
)
Functions ¶
func CallbackExecutor ¶ added in v0.4.0
CallbackExecutor calls the callback URL if it's set.
Types ¶
type Client ¶
type Client interface { // Queue task in estafette. If the ID of the task is not provided, // it will be generated in Estafette server else existing task is updated Queue(request Request) (*Task, error) // GetMigrationByID of migration task using task ID GetMigrationByID(taskID string) (*Task, error) // RollbackMigration task in estafette. RollbackMigration(taskID string) (*Changes, error) // GetMigrations returns all migration tasks GetMigrations() ([]*Task, error) // GetMigrationByFromRepo of migration task using task ID GetMigrationByFromRepo(source, owner, name string) (*Task, error) GetPipelineBuildStatus(source, owner, name, branch, revisionID string) (string, error) // UnArchivePipeline un-archives the pipeline UnArchivePipeline(source, owner, repo string) error // ArchivePipeline archives the pipeline ArchivePipeline(source, owner, repo string) error }
Client for the estafette-ci-api migration API
type Executor ¶
Executor is a function that executes a migration task and returns any changes and if it succeeded.
type PagedBuildsResponse ¶ added in v0.8.4
type PagedBuildsResponse struct { Items []*contracts.Build `json:"items"` Pagination contracts.Pagination `json:"pagination"` }
type Request ¶ added in v0.4.6
type Request struct { ID string `json:"id,omitempty"` FromSource string `json:"fromSource"` FromOwner string `json:"fromOwner"` FromName string `json:"fromName"` ToSource string `json:"toSource"` ToOwner string `json:"toOwner"` ToName string `json:"toName"` CallbackURL *string `json:"callbackURL,omitempty"` Restart StageName `json:"restart,omitempty"` }
type StageName ¶
type StageName string
const ( // LastStage used when restarting build LastStage StageName = "last_stage" ReleasesStage StageName = "releases" ReleaseLogsStage StageName = "release_logs" ReleaseLogObjectsStage StageName = "release_log_objects" BuildsStage StageName = "builds" BuildLogsStage StageName = "build_logs" BuildLogObjectsStage StageName = "build_log_objects" BuildVersionsStage StageName = "build_versions" ComputedTablesStage StageName = "computed_tables" ArchiveStage StageName = "archive" CallbackStage StageName = "callback" CompletedStage StageName = "completed" )
func (StageName) FailedStep ¶ added in v0.4.0
FailedStep for this stage name
func (StageName) SuccessStep ¶ added in v0.4.0
SuccessStep for this stage name
type Stages ¶ added in v0.4.0
type Status ¶
type Status int
const StatusUnset Status = -1
func StatusFrom ¶
func (*Status) MarshalJSON ¶
func (*Status) UnmarshalJSON ¶
type Step ¶
type Step int
const ( StepWaiting Step = 0 StepReleasesFailed Step = 11 StepReleasesDone Step = 12 StepReleaseLogsFailed Step = 21 StepReleaseLogsDone Step = 22 StepReleaseLogObjectsFailed Step = 31 StepReleaseLogObjectsDone Step = 32 StepBuildsFailed Step = 41 StepBuildsDone Step = 42 StepBuildLogsFailed Step = 51 StepBuildLogsDone Step = 52 StepBuildLogObjectsFailed Step = 61 StepBuildLogObjectsDone Step = 62 StepBuildVersionsFailed Step = 71 StepBuildVersionsDone Step = 72 StepComputedTablesFailed Step = 81 StepComputedTablesDone Step = 82 StepArchiveFailed Step = 89 StepArchiveDone Step = 90 StepCallbackFailed Step = 91 StepCallbackDone Step = 92 StepCompletionFailed Step = 991 StepCompletionDone Step = 992 )
func (*Step) MarshalJSON ¶
func (*Step) UnmarshalJSON ¶
type Task ¶
type Task struct { Request `json:",inline"` Status Status `json:"status"` LastStep Step `json:"lastStep"` Builds int `json:"builds"` Releases int `json:"releases"` TotalDuration time.Duration `json:"totalDuration"` ErrorDetails *string `json:"errorDetails,omitempty"` QueuedAt time.Time `json:"queuedAt,omitempty"` UpdatedAt time.Time `json:"updatedAt,omitempty"` }
Click to show internal directories.
Click to hide internal directories.