types

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetModConfig

func GetModConfig[T any](b *BuildConfig, name string) (*T, error)

Types

type Arch

type Arch string
const (
	AMD64 Arch = "amd64"
	ARM64 Arch = "arm64"
	ARM   Arch = "arm"
)

func ParseArch

func ParseArch(s string) (Arch, error)

type BuildConfig

type BuildConfig struct {
	Name        string   `yaml:"name"`
	Targets     []Target `yaml:"targets"`
	Cwd         string
	Modules     []ModuleConfig `yaml:"modules"`
	IncludeDirs []string       `yaml:"includeDirs"`
	Version     VerConfig      `yaml:"version"`
	Produced    []string
}

type Module

type Module interface {
	Name() string
	RunModule(*log.Logger, Target) bool
	Configure(*BuildConfig) error
	Requires() []string
	TargetAgnostic() bool
	RunOnCached() bool
}

type ModuleConfig

type ModuleConfig struct {
	Name   string                 `yaml:"name"`
	Config map[string]interface{} `yaml:"config"`
}

type OS

type OS string
const (
	Windows OS = "windows"
	Linux   OS = "linux"
	MacOS   OS = "darwin"
)

func ParseOS

func ParseOS(s string) (OS, error)

type Target

type Target struct {
	OS   OS   `yaml:"os"`
	Arch Arch `yaml:"arch"`
}

func ParseTarget

func ParseTarget(s string) (Target, error)

func (Target) CleanName added in v0.1.0

func (t Target) CleanName(n string, addExe bool) string

func (Target) ExeName added in v0.1.0

func (t Target) ExeName(n string, addExe bool) string

func (Target) String

func (t Target) String() string

func (Target) TempDir added in v0.3.0

func (t Target) TempDir(cwd string) string

func (*Target) Validate

func (t *Target) Validate() error

type VerConfig added in v0.3.0

type VerConfig struct {
	Path string `yaml:"path"`
	VtS  string `yaml:"type"`
}

Jump to

Keyboard shortcuts

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