spec

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: ISC Imports: 6 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 {
	Owner    string          `json:"owner" yaml:"owner"`
	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"
	// ProjectProfileLibrary represents a library/package.
	ProjectProfileLibrary ProjectProfile = "library"
	// ProjectProfileCLI represents a command-line application.
	ProjectProfileCLI ProjectProfile = "command-line-app"
	// ProjectProfileGRPCService represents a gRPC service.
	ProjectProfileGRPCService ProjectProfile = "grpc-service"
	// ProjectProfileGRPCServiceHorizontal represents a gRPC service.
	ProjectProfileGRPCServiceHorizontal ProjectProfile = "grpc-service-horizontal"
	// ProjectProfileHTTPService represents an HTTP service.
	ProjectProfileHTTPService ProjectProfile = "http-service"
	// ProjectProfileHTTPServiceHorizontal represents an HTTP service.
	ProjectProfileHTTPServiceHorizontal ProjectProfile = "http-service-horizontal"
)

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"
)

func (ReleaseMode) String added in v0.1.1

func (m ReleaseMode) String() string

String returns the release mode in upper case.

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 Read added in v0.1.3

func Read() (Spec, error)

Read 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