Documentation
¶
Overview ¶
Package gitref holds the pure, dependency-light logic for classifying and parsing module reference strings (local path vs git, scheme detection, git repo-root resolution). It deliberately avoids importing the engine "core" package (and the Linux-only engine code that comes with it) so that the CLI can reuse this logic and still cross-compile for darwin/windows.
The richer, dagql-aware wrappers (ModuleSourceKind enum, ParsedGitRefString with its GitRef resolution) live in package core and delegate here.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EndpointError ¶
type EndpointError struct {
// contains filtered or unexported fields
}
EndpointError indicates the ref could not be parsed/resolved as a git endpoint (callers may choose to fall back to treating it as a local path).
type Kind ¶
type Kind int
Kind is a quick classification of a module ref string.
func FastKindCheck ¶
FastKindCheck performs a quick heuristic check to determine whether a module ref string refers to a local path or a git source. Returns KindUnknown if the kind cannot be determined without further inspection.
type Parsed ¶
type Parsed struct {
ModPath string
ModVersion string
HasVersion bool
RepoRoot *vcs.RepoRoot
RepoRootSubdir string
Scheme SchemeType
SourceUser string
CloneUser string
SourceCloneRef string // original user-provided username
CloneRef string // resolved username
}
Parsed holds the parsed components of a git ref string.
type SchemeType ¶
type SchemeType int
SchemeType is the URL scheme of a git ref string.
const ( NoScheme SchemeType = iota SchemeHTTP SchemeHTTPS SchemeSSH SchemeSCPLike )
func (SchemeType) IsSSH ¶
func (s SchemeType) IsSSH() bool
func (SchemeType) Prefix ¶
func (s SchemeType) Prefix() string