v1

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoValue   = errors.New("no value found for option")
	ErrWrongType = errors.New("wrong type for option")
)

Functions

func GetAny added in v0.1.7

func GetAny[T any](ol OptionsList, key string) (T, error)

GetAny retrieves the first matching value from a given OptionsList and returns ErrNoValue if nothing could be found.

func GetOptional

func GetOptional[T any](o Options, key string) (T, error)

GetOptional retrieves a value by a given key. It returns the zero value of T if the key could not be found.

func GetRequired

func GetRequired[T any](o Options, key string) (T, error)

GetRequired retrieves a value by a given key. It returns ErrNoValue if the key could not be found.

Types

type Config added in v0.1.2

type Config struct {
	OverwriteEntrypoint bool     `json:"overwrite-entrypoint"`
	Entrypoint          []string `json:"entrypoint"`
	Command             []string `json:"command"`
}

type Options

type Options map[string]any

type OptionsList added in v0.1.7

type OptionsList []Options

type Pipeline

type Pipeline struct {
	Base       string      `json:"base"`
	Statements []Statement `json:"statements"`
	Config     Config      `json:"config"`
}

type Statement

type Statement struct {
	ID        string   `json:"id"`
	Name      string   `json:"name"`
	Options   Options  `json:"options"`
	DependsOn []string `json:"depends-on"`
}

Jump to

Keyboard shortcuts

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