Documentation
¶
Overview ¶
Package source parses the source-reference vocabulary shared by package installation and Pig piglet resource origins. It preserves upstream Pi's npm/git/local grammar while allowing Pig products to contribute explicit lowercase schemes without teaching generic code their transport semantics.
pig additive (D18): product-neutral typed source and contributed schemes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BarePolicy ¶
type BarePolicy uint8
BarePolicy controls how a source without an explicit scheme/path marker is interpreted at a boundary. Package install uses BareNPM for upstream parity; piglets require explicit typed strings.
const ( BareReject BarePolicy = iota BareLocal BareNPM )
type Options ¶
type Options struct {
BaseDir string
Bare BarePolicy
AllowContributed bool
}
Options defines boundary-specific parsing behavior.
type Ref ¶
type Ref struct {
Raw string
Kind Kind
Scheme string
Locator string
NPMName string
NPMVer string
NPMRegistry string
GitHost string
GitPath string
GitRef string
GitRepo string
GitSubdir string
}
Ref is a parsed source. Raw is retained for settings/piglet serialization; identity fields exclude mutable version/ref selectors where upstream package de-duplication does.