job

package
v0.0.0-...-1eff689 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPropertyItems

func NewPropertyItems(props []Property) map[string]*PropertyItem

Types

type Job

type Job struct {
	Release bhrelui.Release

	Name string

	Description string

	Templates []Template
	Packages  []Package

	PropertyItems map[string]*PropertyItem
}

func NewJob

func NewJob(j bpreljob.Job, rel bhrelui.Release) Job

func (Job) BinTemplates

func (j Job) BinTemplates() []Template

func (Job) ConfigTemplates

func (j Job) ConfigTemplates() []Template

func (Job) GithubURL

func (j Job) GithubURL() string

func (Job) GithubURLOnMaster

func (j Job) GithubURLOnMaster() string

func (Job) HasGithubURL

func (j Job) HasGithubURL() bool

func (Job) IsErrand

func (j Job) IsErrand() bool

func (Job) OtherTemplates

func (j Job) OtherTemplates() []Template

func (Job) URL

func (j Job) URL() string

type Package

type Package struct {
	Release bhrelui.Release

	Name string
}

func NewPackages

func NewPackages(ps []bpreljob.Package, rel bhrelui.Release) []Package

func (Package) URL

func (p Package) URL() string

type PackageSorting

type PackageSorting []Package

func (PackageSorting) Len

func (s PackageSorting) Len() int

func (PackageSorting) Less

func (s PackageSorting) Less(i, j int) bool

func (PackageSorting) Swap

func (s PackageSorting) Swap(i, j int)

type Property

type Property struct {
	Name        string
	Description string

	Default  interface{}
	Examples []PropertyExample
}

func NewProperties

func NewProperties(ps []bpreljob.Property) []Property

func NewProperty

func NewProperty(p bpreljob.Property) Property

func (Property) DefaultAsYAML

func (p Property) DefaultAsYAML() (string, error)

func (Property) DescriptionInMarkdown

func (p Property) DescriptionInMarkdown() (template.HTML, error)

func (Property) GroupName

func (p Property) GroupName() string

func (Property) HasDefault

func (p Property) HasDefault() bool

type PropertyExample

type PropertyExample struct {
	Description string
	Value       interface{}
}

func (PropertyExample) DescriptionInMarkdown

func (e PropertyExample) DescriptionInMarkdown() (template.HTML, error)

func (PropertyExample) ValueAsYAML

func (e PropertyExample) ValueAsYAML() (string, error)

type PropertyItem

type PropertyItem struct {
	Indent int

	FullPath string
	Key      string
	Anchor   string

	// HasDefaults shows if either this item or sub-items have defaults
	MissingValues bool

	// technically could have both...
	Property *Property
	Children map[string]*PropertyItem
}

func (PropertyItem) DefaultAsYAML

func (i PropertyItem) DefaultAsYAML() (string, error)

func (PropertyItem) HasLongKey

func (i PropertyItem) HasLongKey() bool

func (PropertyItem) PoundAnchor

func (i PropertyItem) PoundAnchor() string

type PropertySorting

type PropertySorting []Property

func (PropertySorting) Len

func (s PropertySorting) Len() int

func (PropertySorting) Less

func (s PropertySorting) Less(i, j int) bool

func (PropertySorting) Swap

func (s PropertySorting) Swap(i, j int)

type Template

type Template struct {
	SrcPathEnd string
	DstPathEnd string
}

func NewTemplates

func NewTemplates(ts []bpreljob.Template) []Template

func (Template) IsBin

func (t Template) IsBin() bool

func (Template) IsBinRun

func (t Template) IsBinRun() bool

func (Template) IsConfig

func (t Template) IsConfig() bool

func (Template) IsOther

func (t Template) IsOther() bool

type TemplateSorting

type TemplateSorting []Template

func (TemplateSorting) Len

func (s TemplateSorting) Len() int

func (TemplateSorting) Less

func (s TemplateSorting) Less(i, j int) bool

func (TemplateSorting) Swap

func (s TemplateSorting) Swap(i, j int)

Jump to

Keyboard shortcuts

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