spec

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 License: ISC Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Build

type Build struct {
	CrossCompile bool     `json:"crossCompile" yaml:"cross_compile" flag:"cross-compile"`
	Platforms    []string `json:"platforms" yaml:"platforms" flag:"platforms"`
}

Build has the specifications for the build command.

func (Build) WithDefaults

func (b Build) WithDefaults() Build

WithDefaults returns a new object with default values.

type Project

type Project struct {
	Language ProjectLanguage `json:"language" yaml:"language"`
	Profile  ProjectProfile  `json:"profile" yaml:"profile"`
	Build    Build           `json:"build" yaml:"build"`
	Release  Release         `json:"release" yaml:"release"`
}

Project has the specifications for a Basil project.

func (Project) WithDefaults

func (p Project) WithDefaults() Project

WithDefaults returns a new object with default values.

type ProjectLanguage

type ProjectLanguage string

ProjectLanguage is the type for the project language.

const (
	// ProjectLanguageGo represents the Go programming language.
	ProjectLanguageGo ProjectLanguage = "go"
)

type ProjectProfile

type ProjectProfile string

ProjectProfile is the type for the project profile.

const (
	// ProjectProfileGeneric represents a generic application/library.
	ProjectProfileGeneric ProjectProfile = "generic"
)

type Release

type Release struct {
	Mode ReleaseMode `json:"mode" yaml:"mode" flag:"mode"`
}

Release has the specifications for the release command.

func (Release) WithDefaults

func (r Release) WithDefaults() Release

WithDefaults returns a new object with default values.

type ReleaseMode

type ReleaseMode string

ReleaseModelis the type for the release mode.

const (
	// ReleaseModeIndirect creates a release commit through a pull request.
	ReleaseModeIndirect ReleaseMode = "indirect"
	// ReleaseModeDirect creates a release commit and pushes it to the default branch.
	ReleaseModeDirect ReleaseMode = "direct"
)

type Spec

type Spec struct {
	Version string  `json:"version" yaml:"version"`
	Project Project `json:"project" yaml:"project"`
}

Spec is the model for all specifications.

func FromFile

func FromFile() (Spec, error)

FromFile reads specifications from a file. If no spec file is found, an empty spec will be returned.

func (Spec) WithDefaults

func (s Spec) WithDefaults() Spec

WithDefaults returns a new object with default values.

Jump to

Keyboard shortcuts

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