hitch

package
v0.0.0-...-b93919e Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Interfaces of hitch commands.

The hitch CLI provides all these functions; it's also an interface used purely in-memory by some other systems (like heft) which handle both plan evaluation and release management in the same process.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LineagePluckReleaseByName

func LineagePluckReleaseByName(lin api.Lineage, releaseName api.ReleaseName) (*api.Release, error)

LineagePluckReleaseByName traverses a linage and returns a release by name. This is a useful function because the serial form of release catalogs stores them in an ordered array.

An error may be returned of category LookupError.

A pointer is returned to express maybe-ness; mutating it has no effect.

func LineagePluckReleaseItem

func LineagePluckReleaseItem(lin api.Lineage, releaseName api.ReleaseName, itemName api.ItemName) (*api.WareID, error)

LineagePluckReleaseItem traverses a lineage and returns a wareID looked up by release and item label.

An error may be returned of category LookupError.

A pointer is returned to express maybe-ness; mutating it has no effect.

func LineagePrependRelease

func LineagePrependRelease(lin api.Lineage, rel api.Release) (*api.Lineage, error)

LineagePrependRelease returns a new modified lineage with the release pushed onto the top of the lineage's list of releases.

Any error will be of category LookupError.

A pointer is returned to express maybe-ness.

Types

type ErrorCategory

type ErrorCategory string
const (
	ErrUsage         ErrorCategory = ("hitch-usage-error")
	ErrCorruptState  ErrorCategory = ("hitch-corrupt-state")  // Indicates saved state is corrupt somehow (does not parse, or fails invariant checks).
	ErrNameCollision ErrorCategory = ("hitch-name-collision") // Indicates some mutation could not be performed because it tried to add data under some name that's already used.
)

type LookupError

type LookupError string
const (
	ErrNoSuchLineage LookupError = ("no-such-lineage")
	ErrNoSuchRelease LookupError = ("no-such-release")
	ErrNoSuchItem    LookupError = ("no-such-item")
)

type ViewLineageTool

type ViewLineageTool func(
	context.Context,
	api.ModuleName,
) (*api.Lineage, error)

type ViewWarehousesTool

type ViewWarehousesTool func(
	context.Context,
	api.ModuleName,
) (*api.WareSourcing, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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