concourse

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MethodGet   = "get"
	MethodPut   = "put"
	MethodCheck = "check"
)

Variables

View Source
var BuiltinResourceTypes = []ResourceType{
	{
		Name: "git",
		Source: &ResourceTypeSource{
			Repository: "docker.io/concourse/git-resource",
			Tag:        "1.15.0",
		},
	},
	{
		Name: "s3",
		Source: &ResourceTypeSource{
			Repository: "docker.io/concourse/s3-resource",
			Tag:        "1.3.0",
		},
	},
	{
		Name: "docker-image",
		Source: &ResourceTypeSource{
			Repository: "docker.io/concourse/docker-image-resource",
			Tag:        "1.8.0",
		},
	},
	{
		Name: "github-release",
		Source: &ResourceTypeSource{
			Repository: "docker.io/concourse/github-release-resource",
			Tag:        "1.9.0",
		},
	},
	{
		Name: "registry-image",
		Source: &ResourceTypeSource{
			Repository: "docker.io/concourse/registry-image-resource",
			Tag:        "1.9.0",
		},
	},
	{
		Name: "pool",
		Source: &ResourceTypeSource{
			Repository: "docker.io/concourse/pool-resource",
			Tag:        "1.4.0",
		},
	},
	{
		Name: "time",
		Source: &ResourceTypeSource{
			Repository: "docker.io/concourse/time-resource",
			Tag:        "1.7.0",
		},
	},
	{
		Name: "semver",
		Source: &ResourceTypeSource{
			Repository: "docker.io/concourse/semver-resource",
			Tag:        "1.7.0",
		},
	},
}

Functions

func WithResourceTypes

func WithResourceTypes(ctx context.Context, resourceTypes ...*ResourceType) context.Context

WithResourceTypes embeds the given resource types into the given context.

func WithResources

func WithResources(ctx context.Context, resources ...*Resource) context.Context

WithResources embeds the given resources into the given context.

Types

type Input

type Input struct {
	Params  map[string]any `json:"params,omitempty"`
	Source  map[string]any `json:"source,omitempty"`
	Version map[string]any `json:"version,omitempty"`
}

Input is the struct which has the JSON encoding which gets passed on stdin to a resource.

type Output

type Output struct {
	Version  map[string]string `json:"version,omitempty"`
	Metadata []struct {
		Name  string `json:"name,omitempty"`
		Value string `json:"value,omitempty"`
	} `json:"metadata,omitempty"`
}

Output has the JSON encoding which a resource outputs on stdout.

type Pipeline added in v0.7.0

type Pipeline struct {
	ResourceTypes []ResourceType `yaml:"resource_types,omitempty"`
	Resources     []Resource     `yaml:"resources,omitempty"`
}

Pipeline is the subset of a Concourse pipeline file relevant to finding resource_types.

type Resource

type Resource struct {
	Name   string         `json:"name,omitempty"`
	Type   string         `json:"type,omitempty"`
	Source map[string]any `json:"source,omitempty"`
}

Resource has the YAML encoding of a resource as it would appear in the `resource` array of a Concourse pipeline configuration file.

func ResourcesFrom

func ResourcesFrom(ctx context.Context) (resources []Resource, ok bool)

ResourcesFrom returns whatever resources have been embedded in given context.

type ResourceType

type ResourceType struct {
	Name       string              `json:"name,omitempty"`
	Privileged bool                `json:"privileged,omitempty"`
	Source     *ResourceTypeSource `json:"source,omitempty"`
}

ResourceType has the YAML encoding of a resource type as it would appear in the `resource_types` array of a Concourse pipeline configuration file.

func ResourceTypesFrom

func ResourceTypesFrom(ctx context.Context) (resourceTypes []ResourceType, ok bool)

ResourceTypesFrom returns whatever resource types have been embedded in given context.

type ResourceTypeSource added in v0.13.0

type ResourceTypeSource struct {
	Repository string `json:"repository,omitempty"`
	Tag        string `json:"tag,omitempty"`
}

Jump to

Keyboard shortcuts

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