workflow

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSpecParser

func NewSpecParser(
	fetcher ComponentFetcher,
	componentParser ComponentParser,
	imageResolver ComponentImageResolver,
) (*specParser, error)

NewSpecParser returns a new workflow spec parser.

Types

type Component

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

Component decouples from the v1 type to handle concrete, local or remote components.

func (*Component) HasLocalReference

func (c *Component) HasLocalReference() bool

HasLocalReference returns whether the component has a local reference or not.

func (*Component) HasRemoteReference

func (c *Component) HasRemoteReference() bool

HasRemoteReference returns whether the component has a remote reference or not.

func (*Component) IsInitialised

func (c *Component) IsInitialised() bool

IsInitialised returns whether the component has been initialised (not nil) or not.

func (*Component) UnmarshalYAML

func (c *Component) UnmarshalYAML(unmarshal func(any) error) error

UnmarshalYAML overrides default yaml unmarshalling to cover for remotes being specified in paths or remotely.

type ComponentFetcher

type ComponentFetcher interface {
	FetchPackage(ctx context.Context, ref reference.Reference) (*registry.FetchPackageResponse, error)
}

ComponentFetcher can be implemented to fetch packages.

type ComponentImageResolver added in v0.0.2

type ComponentImageResolver interface {
	Remote() (images.Resolver, error)
	Local(context.Context, string) (images.Resolver, error)
}

func NewDockerImageResolver added in v0.0.2

func NewDockerImageResolver(
	buildComponentImages bool,
	dockerClient *dockerclient.Client,
	credsStore credentials.Store,
	opts ...dockerimages.BuilderOptionFn,
) (ComponentImageResolver, error)

type ComponentParser

type ComponentParser interface {
	Parse(path string) (*v1.Component, error)
}

ComponentParser defines how to parse a component.yaml.

type ComponentRef

type ComponentRef struct {
	Component Component `yaml:"component"`
}

ComponentRef decouples from the v1 type to handle concrete, local or remote components.

type ParserConfig added in v0.0.2

type ParserConfig struct {
	SpecPath       string
	OverridesPath  string
	ResolutionOpts []images.ResolutionOptionFn
}

Jump to

Keyboard shortcuts

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