types

package
v2.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackendOptions

type BackendOptions struct {
	Kubernetes KubernetesBackendOptions `yaml:"kubernetes,omitempty"`
}

BackendOptions are advanced options for specific backends

type Container

type Container struct {
	BackendOptions BackendOptions     `yaml:"backend_options,omitempty"`
	Commands       base.StringOrSlice `yaml:"commands,omitempty"`
	Detached       bool               `yaml:"detach,omitempty"`
	Directory      string             `yaml:"directory,omitempty"`
	Environment    base.SliceOrMap    `yaml:"environment,omitempty"`
	Failure        string             `yaml:"failure,omitempty"`
	Group          string             `yaml:"group,omitempty"`
	Image          string             `yaml:"image,omitempty"`
	Name           string             `yaml:"name,omitempty"`
	Pull           bool               `yaml:"pull,omitempty"`
	Secrets        Secrets            `yaml:"secrets,omitempty"`
	Settings       map[string]any     `yaml:"settings"`
	Volumes        Volumes            `yaml:"volumes,omitempty"`
	When           constraint.When    `yaml:"when,omitempty"`
	Ports          []base.StringOrInt `yaml:"ports,omitempty"`
	DependsOn      base.StringOrSlice `yaml:"depends_on,omitempty"`

	// Docker Specific
	Privileged bool `yaml:"privileged,omitempty"`

	// Undocumented
	CPUQuota     base.StringOrInt    `yaml:"cpu_quota,omitempty"`
	CPUSet       string              `yaml:"cpuset,omitempty"`
	CPUShares    base.StringOrInt    `yaml:"cpu_shares,omitempty"`
	Devices      []string            `yaml:"devices,omitempty"`
	DNSSearch    base.StringOrSlice  `yaml:"dns_search,omitempty"`
	DNS          base.StringOrSlice  `yaml:"dns,omitempty"`
	ExtraHosts   []string            `yaml:"extra_hosts,omitempty"`
	IpcMode      string              `yaml:"ipc_mode,omitempty"`
	MemLimit     base.MemStringOrInt `yaml:"mem_limit,omitempty"`
	MemSwapLimit base.MemStringOrInt `yaml:"memswap_limit,omitempty"`
	NetworkMode  string              `yaml:"network_mode,omitempty"`
	Networks     Networks            `yaml:"networks,omitempty"`
	ShmSize      base.MemStringOrInt `yaml:"shm_size,omitempty"`
	Sysctls      base.SliceOrMap     `yaml:"sysctls,omitempty"`
	Tmpfs        []string            `yaml:"tmpfs,omitempty"`
}

Container defines a container.

func (*Container) IsPlugin

func (c *Container) IsPlugin() bool

func (*Container) IsTrustedCloneImage

func (c *Container) IsTrustedCloneImage() bool

type ContainerList

type ContainerList struct {
	ContainerList []*Container
}

ContainerList denotes an ordered collection of containers.

func (*ContainerList) UnmarshalYAML

func (c *ContainerList) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML implements the Unmarshaler interface.

type KubernetesBackendOptions

type KubernetesBackendOptions struct {
	Resources          Resources         `yaml:"resources,omitempty"`
	ServiceAccountName string            `yaml:"serviceAccountName,omitempty"`
	NodeSelector       map[string]string `yaml:"nodeSelector,omitempty"`
	Tolerations        []Toleration      `yaml:"tolerations,omitempty"`
	SecurityContext    *SecurityContext  `yaml:"securityContext,omitempty"`
}

type Network

type Network struct {
	Name        string   `yaml:"-"`
	Aliases     []string `yaml:"aliases,omitempty"`
	IPv4Address string   `yaml:"ipv4_address,omitempty"`
	IPv6Address string   `yaml:"ipv6_address,omitempty"`
}

Network represents a service network in compose file.

type Networks

type Networks struct {
	Networks []*Network
}

Networks represents a list of service networks in compose file. It has several representation, hence this specific struct.

func (Networks) MarshalYAML

func (n Networks) MarshalYAML() (any, error)

MarshalYAML implements the Marshaller interface.

func (*Networks) UnmarshalYAML

func (n *Networks) UnmarshalYAML(unmarshal func(any) error) error

UnmarshalYAML implements the Unmarshaler interface.

type Resources

type Resources struct {
	Requests map[string]string `yaml:"requests,omitempty"`
	Limits   map[string]string `yaml:"limits,omitempty"`
}

type Secret

type Secret struct {
	Source string `yaml:"source"`
	Target string `yaml:"target"`
}

Secret defines a container secret.

type Secrets

type Secrets struct {
	Secrets []*Secret
}

Secrets defines a collection of secrets.

func (*Secrets) UnmarshalYAML

func (s *Secrets) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML implements the Unmarshaler interface.

type SecurityContext

type SecurityContext struct {
	Privileged   *bool  `yaml:"privileged,omitempty"`
	RunAsNonRoot *bool  `yaml:"runAsNonRoot,omitempty"`
	RunAsUser    *int64 `yaml:"runAsUser,omitempty"`
	RunAsGroup   *int64 `yaml:"runAsGroup,omitempty"`
	FSGroup      *int64 `yaml:"fsGroup,omitempty"`
}

type TaintEffect

type TaintEffect string
const (
	TaintEffectNoSchedule       TaintEffect = "NoSchedule"
	TaintEffectPreferNoSchedule TaintEffect = "PreferNoSchedule"
	TaintEffectNoExecute        TaintEffect = "NoExecute"
)

type Toleration

type Toleration struct {
	Key               string             `yaml:"key,omitempty"`
	Operator          TolerationOperator `yaml:"operator,omitempty"`
	Value             string             `yaml:"value,omitempty"`
	Effect            TaintEffect        `yaml:"effect,omitempty"`
	TolerationSeconds *int64             `yaml:"tolerationSeconds,omitempty"`
}

type TolerationOperator

type TolerationOperator string
const (
	TolerationOpExists TolerationOperator = "Exists"
	TolerationOpEqual  TolerationOperator = "Equal"
)

type Volume

type Volume struct {
	Source      string `yaml:"-"`
	Destination string `yaml:"-"`
	AccessMode  string `yaml:"-"`
}

Volume represent a service volume

func (*Volume) String

func (v *Volume) String() string

String implements the Stringer interface.

type Volumes

type Volumes struct {
	Volumes []*Volume
}

Volumes represents a list of service volumes in compose file. It has several representation, hence this specific struct.

func (Volumes) MarshalYAML

func (v Volumes) MarshalYAML() (any, error)

MarshalYAML implements the Marshaller interface.

func (*Volumes) UnmarshalYAML

func (v *Volumes) UnmarshalYAML(unmarshal func(any) error) error

UnmarshalYAML implements the Unmarshaler interface.

type Workflow

type Workflow struct {
	When      constraint.When `yaml:"when,omitempty"`
	Workspace Workspace       `yaml:"workspace,omitempty"`
	Clone     ContainerList   `yaml:"clone,omitempty"`
	Steps     ContainerList   `yaml:"steps,omitempty"`
	Services  ContainerList   `yaml:"services,omitempty"`
	Labels    base.SliceOrMap `yaml:"labels,omitempty"`
	DependsOn []string        `yaml:"depends_on,omitempty"`
	RunsOn    []string        `yaml:"runs_on,omitempty"`
	SkipClone bool            `yaml:"skip_clone"`
	Version   int             `yaml:"version"`

	// Undocumented
	Cache    base.StringOrSlice `yaml:"cache,omitempty"`
	Networks WorkflowNetworks   `yaml:"networks,omitempty"`
	Volumes  WorkflowVolumes    `yaml:"volumes,omitempty"`

	// Deprecated
	PlatformDontUseIt string `yaml:"platform,omitempty"` // TODO: remove in next major version
	// Deprecated
	BranchesDontUseIt *constraint.List `yaml:"branches,omitempty"` // TODO: remove in next major version
	// Deprecated
	PipelineDontUseIt ContainerList `yaml:"pipeline,omitempty"` // TODO: remove in next major version
}

Workflow defines a workflow configuration.

type WorkflowNetwork

type WorkflowNetwork struct {
	Name       string            `yaml:"name,omitempty"`
	Driver     string            `yaml:"driver,omitempty"`
	DriverOpts map[string]string `yaml:"driver_opts,omitempty"`
}

WorkflowNetwork defines a container network.

type WorkflowNetworks

type WorkflowNetworks struct {
	WorkflowNetworks []*WorkflowNetwork
}

WorkflowNetworks defines a collection of networks.

func (*WorkflowNetworks) UnmarshalYAML

func (n *WorkflowNetworks) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML implements the Unmarshaler interface.

type WorkflowVolume

type WorkflowVolume struct {
	Name       string            `yaml:"name,omitempty"`
	Driver     string            `yaml:"driver,omitempty"`
	DriverOpts map[string]string `yaml:"driver_opts,omitempty"`
}

WorkflowVolume defines a container volume.

type WorkflowVolumes

type WorkflowVolumes struct {
	WorkflowVolumes []*WorkflowVolume
}

WorkflowVolumes defines a collection of volumes.

func (*WorkflowVolumes) UnmarshalYAML

func (v *WorkflowVolumes) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML implements the Unmarshaler interface.

type Workspace

type Workspace struct {
	Base string
	Path string
}

Workspace defines a pipeline workspace.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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