concourse

package
v0.0.0-...-f7cf045 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Build

type Build struct {
	ID           int            `json:"id"`
	Team         string         `json:"team_name"`
	Name         string         `json:"name"`
	Status       string         `json:"status"`
	Job          string         `json:"job_name"`
	APIURL       string         `json:"api_url"`
	Pipeline     string         `json:"pipeline_name"`
	InstanceVars map[string]any `json:"pipeline_instance_vars,omitempty"`
	StartTime    int            `json:"start_time"`
	EndTime      int            `json:"end_time"`
}

A Build is a build's data from the undocumented Concourse API.

type BuildMetadata

type BuildMetadata struct {
	Host         string
	ID           string
	TeamName     string
	PipelineName string
	InstanceVars string
	JobName      string
	BuildName    string
	URL          string
}

BuildMetadata is the current build's metadata exposed via the environment. https://concourse-ci.org/implementing-resources.html#resource-metadata

func NewBuildMetadata

func NewBuildMetadata(atcurl string) BuildMetadata

NewBuildMetadata returns a populated BuildMetadata. The default external URL can be overridden by the URL.

type CheckResponse

type CheckResponse []Version

CheckResponse is the output for the check operation.

type Client

type Client struct {
	// contains filtered or unexported fields
}

A Client is a Concourse API connection.

func NewClient

func NewClient(atcurl, team, username, password string) (*Client, error)

NewClient returns an authorized Client (if private) for the Concourse API.

func (*Client) JobBuild

func (c *Client) JobBuild(pipeline, job, name, instanceVars string) (*Build, error)

JobBuild finds and returns a Build from the Concourse API by its pipeline name, job name and build name.

type InResponse

type InResponse struct {
	Version  Version    `json:"version"`
	Metadata []Metadata `json:"metadata"`
}

InResponse is the output for the in operation.

type Info

type Info struct {
	ATCVersion    string `json:"version"`
	WorkerVersion string `json:"worker_version"`
}

Info is version information from the Concourse API.

type Metadata

type Metadata struct {
	Name  string `json:"name,omitempty"`
	Value string `json:"value,omitempty"`
}

Metadata are a key-value pair that must be included for in the in and out operation responses.

type OutParams

type OutParams struct {
	AlertType   string `json:"alert_type"`
	Channel     string `json:"channel"`
	ChannelFile string `json:"channel_file"`
	Color       string `json:"color"`
	Message     string `json:"message"`
	MessageFile string `json:"message_file"`
	Text        string `json:"text"`
	TextFile    string `json:"text_file"`
	Disable     bool   `json:"disable"`
}

OutParams are the parameters that can be configured for the out operation.

type OutRequest

type OutRequest struct {
	Source Source    `json:"source"`
	Params OutParams `json:"params"`
}

OutRequest is in the input for the out operation.

type OutResponse

type OutResponse struct {
	Version  Version    `json:"version"`
	Metadata []Metadata `json:"metadata"`
}

OutResponse is the output for the out operation.

type Source

type Source struct {
	URL          string `json:"url"`
	Username     string `json:"username"`
	Password     string `json:"password"`
	ConcourseURL string `json:"concourse_url"`
	Channel      string `json:"channel"`
	Disable      bool   `json:"disable"`
}

A Source is the resource's source configuration.

type Token

type Token struct {
	Type  string `json:"type"`
	Value string `json:"value"`
}

A Token is a legacy Concourse access token.

type Version

type Version map[string]string

Version is the key-value pair that the resource is checking, getting or putting.

Jump to

Keyboard shortcuts

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