cicd_feedback

package module
v0.0.0-...-2c8fa0f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 26, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeaderFeedback      = "CICD-Feedback"
	HeaderAuthorization = "CICD-Authorization"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact struct {
	Name     string `json:"name"`
	URI      string `json:"uri"`
	MimeType string `json:"mimeType"`
}

type ErrorResponse

type ErrorResponse struct {
	Error            ErrorType `json:"error"`
	ErrorDescription string    `json:"errorDescription,omitempty"`
}

ErrorResponse represents the structure of an error response

type ErrorType

type ErrorType string

ErrorType represents the possible error types

const (
	// ErrorInternal: CI/CD engine encountered an unexpected internal error
	ErrorInternal ErrorType = "internal"
	// ErrorConfig: Error in the pipeline configuration or workflow definition
	ErrorConfig ErrorType = "config"
	// ErrorExternal: Error in an external service that the CI/CD engine depends on
	ErrorExternal ErrorType = "external"
	// ErrorPermission: Insufficient permissions to perform the requested action
	ErrorPermission ErrorType = "permission"
	// ErrorValidation: Input validation errors
	ErrorValidation ErrorType = "validation"
	// ErrorOther: All other unspecified error
	ErrorOther ErrorType = "other"
)

type Inputs

type Inputs struct {
	Commands    []string          `json:"commands,omitempty"`
	Environment map[string]string `json:"environment,omitempty"`
}

type Log

type Log struct {
	Name string `json:"name"`
	URI  string `json:"uri"`
}

type Outputs

type Outputs struct {
	Logs      []Log      `json:"logs,omitempty"`
	Artifacts []Artifact `json:"artifacts,omitempty"`
}

type PipelineResponse

type PipelineResponse struct {
	PipelineID           string     `json:"pipelineId"`
	Title                string     `json:"title"`
	Status               Status     `json:"status"`
	RequiresManualAction bool       `json:"requiresManualAction"`
	Workflows            []Workflow `json:"workflows"`
	ExternalURI          string     `json:"externalURI,omitempty"`
}

PipelineResponse represents the structure of a successful pipeline response

type Status

type Status string

Status represents the possible status values

const (
	StatusSkipped  Status = "skipped"
	StatusPending  Status = "pending"
	StatusRunning  Status = "running"
	StatusSuccess  Status = "success"
	StatusFailed   Status = "failed"
	StatusKilled   Status = "killed"
	StatusManual   Status = "manual"
	StatusDeclined Status = "declined"
)

type Step

type Step struct {
	ID           string   `json:"id"`
	Name         string   `json:"name,omitempty"`
	Status       Status   `json:"status"`
	Inputs       Inputs   `json:"inputs,omitempty"`
	Outputs      Outputs  `json:"outputs,omitempty"`
	Dependencies []string `json:"dependencies,omitempty"`
}

type WellKnownResponse

type WellKnownResponse struct {
	Version      string `json:"version"`
	SoftwareName string `json:"softwareName"`
	Type         string `json:"type"`
}

type Workflow

type Workflow struct {
	ID           string     `json:"id"`
	Name         string     `json:"name,omitempty"`
	Status       Status     `json:"status"`
	Dependencies []string   `json:"dependencies,omitempty"`
	Steps        []Step     `json:"steps,omitempty"`
	SubWorkflows []Workflow `json:"subWorkflows,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL