Documentation
¶
Index ¶
Constants ¶
const (
// ModuleConfigFileName is the module config filename.
ModuleConfigFileName = "dagger.json"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LegacyBlueprint ¶
LegacyBlueprint represents a blueprint extracted from a legacy dagger.json.
func ParseLegacyBlueprint ¶
func ParseLegacyBlueprint(data []byte) (*LegacyBlueprint, error)
ParseLegacyBlueprint parses a legacy dagger.json and extracts its blueprint. Returns nil if no blueprint is present.
type LegacyToolchain ¶
type LegacyToolchain struct {
Name string
Source string
Pin string
ConfigDefaults map[string]any
Customizations []*modules.ModuleConfigArgument
}
LegacyToolchain represents a toolchain extracted from a legacy dagger.json, with constructor arg defaults already resolved from customizations.
func ParseLegacyToolchains ¶
func ParseLegacyToolchains(data []byte) ([]LegacyToolchain, error)
ParseLegacyToolchains parses a legacy dagger.json and extracts its toolchains with their constructor arg defaults. Returns nil if no toolchains are present.
type PathExistsFunc ¶
type PathExistsFunc func(ctx context.Context, path string) (parentDir string, exists bool, err error)
PathExistsFunc checks whether a filesystem path exists. Returns the canonical parent directory and whether the path exists.
type Workspace ¶
type Workspace struct {
// Root is the outer filesystem boundary (git root, or cwd if no git).
Root string
// Path is the workspace location relative to Root (e.g., "apps/frontend" or ".").
Path string
}
Workspace represents a detected workspace boundary.
func Detect ¶
func Detect( ctx context.Context, pathExists PathExistsFunc, _ func(ctx context.Context, path string) ([]byte, error), cwd string, ) (*Workspace, error)
Detect finds the workspace boundary from the given working directory.
Uses a 2-step fallback chain:
- FindUp .git → workspace root = directory containing .git
- No .git → cwd is workspace root