core

package
v0.0.0-...-ff4f71a Latest Latest
Warning

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

Go to latest
Published: May 10, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CatalogCreate

func CatalogCreate(ui UI, catalogNameStr string) error

func Init

func Init(ui UI) error

func ReleaseAddItem

func ReleaseAddItem(ui UI, itemNameStr, wareStr string) error

func ReleaseCommit

func ReleaseCommit(ui UI) error

func ReleaseStart

func ReleaseStart(ui UI, catalogNameStr, releaseNameStr string) error

func Show

func Show(ui UI, nameStr string) error

Types

type ErrorCategory

type ErrorCategory string
const (
	ErrBadArgs       ErrorCategory = "badargs"       // Indicates usage errors.
	ErrCorruptState  ErrorCategory = "corruptstate"  // Indicates saved state is corrupt somehow (does not parse, or fails invariant checks).
	ErrDataNotFound  ErrorCategory = "datanotfound"  // Indicates content not found -- the db was, but the e.g. catalog name (or release name, etc; whatever was requested) was not present.
	ErrFS            ErrorCategory = "fs"            // Indicates some local I/O error: permission denied, etc.  Retries unwise.
	ErrDBNotFound    ErrorCategory = "dbnotfound"    // Returned when a hitch command is used outside of a hitch.db path.
	ErrInProgress    ErrorCategory = "inprogress"    // Indicates desired operation is already begun -- e.g., `hitch init` is used and a hitch.db already exists; `hitch release start` when something is already staged, etc.
	ErrNameCollision ErrorCategory = "namecollision" // Indicates that a name is already used, e.g. a catalog already has a release of the same name you just tried to create, etc.
	ErrPiping        ErrorCategory = "pipecollapse"  // Returned when IO to the *user* (e.g. stdout) fails.  (*Not* when disk or db IO fails.)
)

type ReleaseEntryBuilder

type ReleaseEntryBuilder struct {
}

func (*ReleaseEntryBuilder) AppendStep

func (x *ReleaseEntryBuilder) AppendStep(
	name api.StepName,
	upstream map[api.AbsPath]api.ReleaseItemID,
	formula api.Formula,
	runRecord api.RunRecord,
)

func (*ReleaseEntryBuilder) MustVerify

func (x *ReleaseEntryBuilder) MustVerify()

Call Verify or MustVerify to check the connectedness of all steps in the entry so far.

Calling this after every append is possible if you know you're streaming in records in the same order they were built, but it's equally valid to append an unordered set of records and then call verify once at the end.

type UI

type UI struct {
	Stdin  io.Reader
	Stdout io.Writer
	Stderr io.Writer
}

Bundles the "UI" types -- stdin/out/err. If a function has this as a parameter, it's a top-level command function.

Directories

Path Synopsis
Package 'stage' handles assembling a release.
Package 'stage' handles assembling a release.

Jump to

Keyboard shortcuts

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