concourse

package
v0.0.0-...-3931f63 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDestroyRefused = errors.New("not-permitted-to-destroy-as-requested")
View Source
var ErrForbidden = internal.ErrForbidden

ErrForbidden is returned for 403 response codes.

View Source
var ErrUnauthorized = internal.ErrUnauthorized

ErrUnauthorized is returned for 401 response codes.

Functions

This section is empty.

Types

type Client

type Client interface {
	URL() string
	HTTPClient() *http.Client
	Builds(Page) ([]atc.Build, Pagination, error)
	Build(buildID string) (atc.Build, bool, error)
	BuildEvents(buildID string) (Events, error)
	BuildResources(buildID int) (atc.BuildInputsOutputs, bool, error)
	ListBuildArtifacts(buildID string) ([]atc.WorkerArtifact, error)
	AbortBuild(buildID string) error
	BuildPlan(buildID int) (atc.PublicBuildPlan, bool, error)
	SaveWorker(atc.Worker, *time.Duration) (*atc.Worker, error)
	ListWorkers() ([]atc.Worker, error)
	PruneWorker(workerName string) error
	LandWorker(workerName string) error
	GetInfo() (atc.Info, error)
	GetCLIReader(arch, platform string) (io.ReadCloser, http.Header, error)
	ListPipelines() ([]atc.Pipeline, error)
	ListAllJobs() ([]atc.Job, error)
	ListTeams() ([]atc.Team, error)
	FindTeam(teamName string) (Team, error)
	Team(teamName string) Team
	UserInfo() (atc.UserInfo, error)
	ListActiveUsersSince(since time.Time) ([]atc.User, error)
	Check(checkID string) (atc.Check, bool, error)
}

func NewClient

func NewClient(apiURL string, httpClient *http.Client, tracing bool) Client

type ConfigWarning

type ConfigWarning struct {
	Type    string `json:"type"`
	Message string `json:"message"`
}

type Events

type Events interface {
	NextEvent() (atc.Event, error)
	Close() error
}

type GenericError

type GenericError struct {
	Message string
}

GenericError is used when no more specific error is available, i.e. a generic 500 Internal Server Error response with a message in the body.

func (GenericError) Error

func (err GenericError) Error() string

Error just returns the message from the response body.

type InvalidConfigError

type InvalidConfigError struct {
	Errors []string `json:"errors"`
}

InvalidConfigError is returned when saving a pipeline returns errors (i.e. validation failures).

func (InvalidConfigError) Error

func (c InvalidConfigError) Error() string

Error lists the errors returned for the config.

type Page

type Page struct {
	Since      int
	Until      int
	Limit      int
	Timestamps bool
}

func (Page) QueryParams

func (p Page) QueryParams() url.Values

type Pagination

type Pagination struct {
	Next     *Page
	Previous *Page
}

type PruneWorkerError

type PruneWorkerError struct {
	atc.PruneWorkerResponseBody
}

func (PruneWorkerError) Error

func (e PruneWorkerError) Error() string

type Team

type Team interface {
	Name() string

	Auth() atc.TeamAuth

	CreateOrUpdate(team atc.Team) (atc.Team, bool, bool, []ConfigWarning, error)
	RenameTeam(teamName, name string) (bool, []ConfigWarning, error)
	DestroyTeam(teamName string) error

	Pipeline(name string) (atc.Pipeline, bool, error)
	PipelineBuilds(pipelineName string, page Page) ([]atc.Build, Pagination, bool, error)
	DeletePipeline(pipelineName string) (bool, error)
	PausePipeline(pipelineName string) (bool, error)
	ArchivePipeline(pipelineName string) (bool, error)
	UnpausePipeline(pipelineName string) (bool, error)
	ExposePipeline(pipelineName string) (bool, error)
	HidePipeline(pipelineName string) (bool, error)
	RenamePipeline(pipelineName, name string) (bool, []ConfigWarning, error)
	ListPipelines() ([]atc.Pipeline, error)
	PipelineConfig(pipelineName string) (atc.Config, string, bool, error)
	CreateOrUpdatePipelineConfig(pipelineName string, configVersion string, passedConfig []byte, checkCredentials bool) (bool, bool, []ConfigWarning, error)

	CreatePipelineBuild(pipelineName string, plan atc.Plan) (atc.Build, error)

	BuildInputsForJob(pipelineName string, jobName string) ([]atc.BuildInput, bool, error)

	Job(pipelineName, jobName string) (atc.Job, bool, error)
	JobBuild(pipelineName, jobName, buildName string) (atc.Build, bool, error)
	JobBuilds(pipelineName string, jobName string, page Page) ([]atc.Build, Pagination, bool, error)
	CreateJobBuild(pipelineName string, jobName string) (atc.Build, error)
	RerunJobBuild(pipelineName string, jobName string, buildName string) (atc.Build, error)
	ListJobs(pipelineName string) ([]atc.Job, error)
	ScheduleJob(pipelineName string, jobName string) (bool, error)

	PauseJob(pipelineName string, jobName string) (bool, error)
	UnpauseJob(pipelineName string, jobName string) (bool, error)

	ClearTaskCache(pipelineName string, jobName string, stepName string, cachePath string) (int64, error)

	Resource(pipelineName string, resourceName string) (atc.Resource, bool, error)
	ListResources(pipelineName string) ([]atc.Resource, error)
	VersionedResourceTypes(pipelineName string) (atc.VersionedResourceTypes, bool, error)
	ResourceVersions(pipelineName string, resourceName string, page Page, filter atc.Version) ([]atc.ResourceVersion, Pagination, bool, error)
	CheckResource(pipelineName string, resourceName string, version atc.Version) (atc.Check, bool, error)
	CheckResourceType(pipelineName string, resourceTypeName string, version atc.Version) (atc.Check, bool, error)
	DisableResourceVersion(pipelineName string, resourceName string, resourceVersionID int) (bool, error)
	EnableResourceVersion(pipelineName string, resourceName string, resourceVersionID int) (bool, error)

	PinResourceVersion(pipelineName string, resourceName string, resourceVersionID int) (bool, error)
	UnpinResource(pipelineName string, resourceName string) (bool, error)
	SetPinComment(pipelineName string, resourceName string, comment string) (bool, error)

	BuildsWithVersionAsInput(pipelineName string, resourceName string, resourceVersionID int) ([]atc.Build, bool, error)
	BuildsWithVersionAsOutput(pipelineName string, resourceName string, resourceVersionID int) ([]atc.Build, bool, error)

	ListContainers(queryList map[string]string) ([]atc.Container, error)
	GetContainer(id string) (atc.Container, error)
	ListVolumes() ([]atc.Volume, error)
	CreateBuild(plan atc.Plan) (atc.Build, error)
	Builds(page Page) ([]atc.Build, Pagination, error)
	OrderingPipelines(pipelineNames []string) error

	CreateArtifact(io.Reader, string) (atc.WorkerArtifact, error)
	GetArtifact(int) (io.ReadCloser, error)
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.
eventstreamfakes
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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