builder

package
v1.27.5 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LocalBuildTags = []string{"encore_local", "encore_no_gcp", "encore_no_aws", "encore_no_azure"}

Functions

This section is empty.

Types

type BuildInfo

type BuildInfo struct {
	BuildTags          []string
	CgoEnabled         bool
	StaticLink         bool
	Debug              bool
	GOOS, GOARCH       string
	KeepOutput         bool
	Revision           string
	UncommittedChanges bool

	// MainPkg is the path to the existing main package to use, if any.
	MainPkg option.Option[paths.Pkg]

	// Overrides to explicitly set the GoRoot and EncoreRuntime paths.
	// if not set, they will be inferred from the current executable.
	GoRoot        option.Option[paths.FS]
	EncoreRuntime option.Option[paths.FS]

	// Logger allows a custom logger to be used by the various phases of the builder.
	Logger option.Option[zerolog.Logger]
}

func DefaultBuildInfo added in v1.16.1

func DefaultBuildInfo() BuildInfo

DefaultBuildInfo returns a BuildInfo with default values. It can be modified afterwards.

type CompileParams

type CompileParams struct {
	Build       BuildInfo
	App         *apps.Instance
	Parse       *ParseResult
	OpTracker   *optracker.OpTracker
	Experiments *experiments.Set
	WorkingDir  string
	CueMeta     *cueutil.Meta

	// Override to explicitly allow the Encore version to be set.
	EncoreVersion option.Option[string]
}

type CompileResult

type CompileResult struct {
	Dir         string
	Exe         string
	Configs     map[string]string
	ConfigFiles fs.FS
}

type GenUserFacingParams

type GenUserFacingParams struct {
	App   *apps.Instance
	Parse *ParseResult
}

type ParseParams

type ParseParams struct {
	Build       BuildInfo
	App         *apps.Instance
	Experiments *experiments.Set
	WorkingDir  string
	ParseTests  bool
}

type ParseResult

type ParseResult struct {
	Meta *meta.Data
	Data any
}

type TestParams

type TestParams struct {
	Compile CompileParams

	// Env sets environment variables for "go test".
	Env []string

	// Args sets extra arguments for "go test".
	Args []string

	// Stdout and Stderr are where to redirect "go test" output.
	Stdout, Stderr io.Writer
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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