concourse

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: May 21, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

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]string `json:"params,omitempty"`
	Source  map[string]string `json:"source,omitempty"`
	Version map[string]string `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 is the struct which 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]string `json:"source,omitempty"`
}

Resource is the struct which 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     *struct {
		Repository string `json:"repository,omitempty"`
		Tag        string `json:"tag,omitempty"`
	} `json:"source,omitempty"`
}

ResourceType is the struct which 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.

Jump to

Keyboard shortcuts

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