path

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package path resolves a local directory into a frozen snapshot.

It is the simplest resolver and the one that shows what the contract is for: even for a directory the build account already owns, the material is copied into private storage and hashed on the way in, because "local" does not mean "stable for the duration of a build".

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DirectSpec

func DirectSpec(name, dir, mountPath string, include, exclude []string) (*bundle.Spec, string, error)

DirectSpec synthesizes a one-source manifest for a direct path build.

Direct mode is convenience syntax over the manifest pipeline, not a second implementation: the same loader, resolver, composer, and packager run either way, so there is no path through which the two could diverge.

Types

type Config

type Config struct {
	// Path is the directory to package. A relative path resolves against the
	// manifest's directory, never the process working directory, so a
	// manifest means the same thing wherever it is invoked from.
	Path string `json:"path"`
}

Config is a path source's configuration.

type Resolver

type Resolver struct {
	AllowAbsolute bool
}

Resolver resolves local directories.

AllowAbsolute must be enabled explicitly for a manifest to name an absolute path. A manifest that reaches outside its own directory is not portable and usually is not intended, so it is opt-in rather than merely discouraged.

func New

func New() *Resolver

New returns a path resolver.

func (*Resolver) Identity

func (r *Resolver) Identity() source.Identity

Identity describes the resolver in provenance, so evidence records which implementation produced a resolution rather than only what it resolved to.

func (*Resolver) Resolve

func (r *Resolver) Resolve(ctx context.Context, req source.ResolveRequest) (_ source.Snapshot, retErr error)

Resolve snapshots the configured directory.

func (*Resolver) Type

func (r *Resolver) Type() string

Type is the manifest source type this resolver handles.

Jump to

Keyboard shortcuts

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