Documentation
¶
Index ¶
- type BuildPlan
- type BuildResult
- type Builder
- type ExportSlice
- type Manifest
- func (m Manifest) BinaryName() string
- func (m Manifest) BuildTarget() string
- func (m *Manifest) Normalize(sourcePath string)
- func (m Manifest) PackString() string
- func (m Manifest) Plan(path string, target Target, distDir string) BuildPlan
- func (m Manifest) PlannedOutputDir(distDir string) string
- func (m Manifest) ResolveSlice(moduleRoot string) (ExportSlice, error)
- func (m Manifest) Validate() error
- func (m Manifest) Write(path string) error
- type PackBundle
- type PackSlice
- type ResolvedFile
- type Target
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildPlan ¶
type BuildPlan struct {
ManifestPath string `json:"manifest_path"`
Manifest Manifest `json:"manifest"`
Target Target `json:"target"`
BuildTarget string `json:"build_target"`
ArtifactRoot string `json:"artifact_root"`
CreatedAt string `json:"created_at"`
Slice ExportSlice `json:"slice,omitempty"`
Notes []string `json:"notes,omitempty"`
}
BuildPlan captures what bo is asked to export.
type BuildResult ¶
type BuildResult struct {
ManifestPath string `json:"manifest_path"`
Manifest Manifest `json:"manifest"`
Target Target `json:"target"`
BuildTarget string `json:"build_target"`
Status string `json:"status"`
Message string `json:"message"`
OutputPath string `json:"output_path,omitempty"`
BundlePath string `json:"bundle_path,omitempty"`
SlicePath string `json:"slice_path,omitempty"`
Artifacts []string `json:"artifacts,omitempty"`
}
BuildResult describes the output generated by bo.
type ExportSlice ¶
type ExportSlice struct {
ManifestPath string `json:"manifestPath,omitempty"`
ModuleRoot string `json:"moduleRoot,omitempty"`
Name string `json:"name"`
Mode string `json:"mode,omitempty"`
Routes []string `json:"routes,omitempty"`
Folders []string `json:"folders,omitempty"`
Assets []string `json:"assets,omitempty"`
Include []string `json:"include,omitempty"`
Files []ResolvedFile `json:"files,omitempty"`
}
ExportSlice captures the inspectable scope of an export.
type Manifest ¶
type Manifest struct {
Name string `json:"name"`
Mode string `json:"mode,omitempty"`
Output string `json:"output"`
Module string `json:"module"`
Entrypoint string `json:"entrypoint"`
BaseDir string `json:"baseDir,omitempty"`
AgentsDir string `json:"agentsDir,omitempty"`
Runtime string `json:"runtime,omitempty"`
Description string `json:"description,omitempty"`
Pages []string `json:"pages,omitempty"`
Paths []string `json:"paths,omitempty"`
Folders []string `json:"folders,omitempty"`
Include []string `json:"include,omitempty"`
Assets []string `json:"assets,omitempty"`
Slices []PackSlice `json:"slices,omitempty"`
Bundles []PackBundle `json:"bundles,omitempty"`
Environment map[string]string `json:"environment,omitempty"`
Metadata map[string]string `json:"metadata,omitempty"`
Bundle bool `json:"bundle,omitempty"`
}
Manifest describes the scope of an export.
func LoadManifest ¶
LoadManifest reads and parses a BO pack file from disk.
func (Manifest) BinaryName ¶
BinaryName returns the output file name for the host platform.
func (Manifest) BuildTarget ¶
BuildTarget resolves the package path that go build should compile.
func (Manifest) PackString ¶
PackString renders the pack as a stable textual manifest.
func (Manifest) PlannedOutputDir ¶
PlannedOutputDir returns the build root for the manifest.
func (Manifest) ResolveSlice ¶
func (m Manifest) ResolveSlice(moduleRoot string) (ExportSlice, error)
ResolveSlice resolves route hints and filesystem selections into an export slice.
type PackBundle ¶
PackBundle describes a bundle directive declared inside a pack file.
type PackSlice ¶
type PackSlice struct {
Path string `json:"path"`
Default bool `json:"default,omitempty"`
Label string `json:"label,omitempty"`
}
PackSlice describes a slice declared inside a pack file.
type ResolvedFile ¶
type ResolvedFile struct {
Path string `json:"path"`
RelativePath string `json:"relativePath"`
Kind string `json:"kind"`
Size int64 `json:"size,omitempty"`
}
ResolvedFile represents a file included in a BO export slice.
type Target ¶
type Target string
Target represents the packaging format requested by bo.
func ParseTarget ¶
ParseTarget normalizes the requested format.