Documentation
¶
Index ¶
- Constants
- func DirBlobStore(layout BlobStore, targets ...string) string
- func FindAllCwdOverridePaths(cwd, utilityName string, ceilings []string) []string
- func GetBlobStoreConfigPaths(ctx interfaces.ActiveContext, directoryLayout BlobStore) []string
- func GetLegacyBlobStoreConfigPaths(ctx interfaces.ActiveContext, directoryLayout BlobStore) []string
- func MakeBlobStorePath(id scoped_id.Id, base, config string) blobStorePath
- func PathBlobStore(layout BlobStore, targets ...string) interfaces.DirectoryLayoutPath
- func ResolveNthAncestorMatch(cwd, utilityName string, depth uint, ceilings []string, ...) (string, error)
- type BlobStore
- type BlobStorePath
- type Common
- type XDG
Constants ¶
const (
FileNameBlobStoreConfig = "blob_store-config"
)
Variables ¶
This section is empty.
Functions ¶
func FindAllCwdOverridePaths ¶
FindAllCwdOverridePaths walks up from cwd and returns every ancestor that contains `.<utilityName>/` (file or directory), deepest-first. Honors `<UTILITYNAME>_CEILING_DIRECTORIES` (parsed via dewey's xdg.ParseCeilingDirectories + xdg.IsAboveCeiling).
Multi-match counterpart of dewey's xdg.getCwdXDGOverridePath, which returns only the deepest match. Loop shape mirrors the post-#75 dewey: the ceiling dir is the LAST dir checked, not the first excluded — match git's GIT_CEILING_DIRECTORIES semantics. See #145 and amarbel-llc/purse-first#75.
xdg.IsAboveCeiling symlink-resolves both dir and each ceiling before comparison (amarbel-llc/purse-first#80), so this wrapper no longer needs to canonicalize either side.
func GetBlobStoreConfigPaths ¶
func GetBlobStoreConfigPaths( ctx interfaces.ActiveContext, directoryLayout BlobStore, ) []string
func GetLegacyBlobStoreConfigPaths ¶
func GetLegacyBlobStoreConfigPaths( ctx interfaces.ActiveContext, directoryLayout BlobStore, ) []string
func PathBlobStore ¶
func PathBlobStore( layout BlobStore, targets ...string, ) interfaces.DirectoryLayoutPath
func ResolveNthAncestorMatch ¶
func ResolveNthAncestorMatch( cwd, utilityName string, depth uint, ceilings []string, matches func(ancestorPath string) bool, ) (string, error)
ResolveNthAncestorMatch walks up from cwd via FindAllCwdOverridePaths (deepest-first, ceiling-respecting ancestors carrying `.<utilityName>/`) and returns the depth-th ancestor for which matches reports true: depth 0 is the deepest match, depth 1 the next match up, etc. This is the store-aware, depth-ranked OPERATE-path resolver (dodder#281) — the counterpart to env_dir.MakeDefaultAndInitialize's literal Nth-parent walk-up (madder#153), which is the INIT-path resolver. Operate stays nearest-ancestor so a command can run from a child directory below the addressed root.
It ERRORS (does not clamp) when fewer than depth+1 matching ancestors exist, mirroring scoped_id's strict posture and #153's overflow policy.
matches is the caller's name/identity check for a candidate ancestor: madder would pass "this ancestor hosts a blob store named <name>"; dodder passes its own ".dodder repo named <name>" check. Injecting it keeps this single deepest-first walk utility-agnostic (it never needs to know either layout's store/repo model) while reusing the discovery walk rather than duplicating it. matches must be non-nil.
Types ¶
type BlobStore ¶
type BlobStore interface {
Common
MakePathBlobStore(...string) interfaces.DirectoryLayoutPath
}
func CloneBlobStoreWithXDG ¶
func MakeBlobStoreSystem ¶
MakeBlobStoreSystem builds the XDG-system (`//name`) layout (madder#230). The xdg must already be rooted at the system path (env_dir.rootAtSystem); the layout reports LocationTypeXDGSystem so init/discovery accept `//name` ids against it.
type BlobStorePath ¶
func GetBlobStorePath ¶
func GetBlobStorePath( directoryLayout BlobStore, idString string, ) BlobStorePath
func GetBlobStorePathForCustomPath ¶
func GetBlobStorePathForCustomPath( idString, basePath string, configPath string, ) BlobStorePath
func GetDefaultBlobStore ¶
func GetDefaultBlobStore( directoryLayout BlobStore, ) BlobStorePath
type Common ¶
type Common interface {
scoped_id.LocationTypeGetter
// contains filtered or unexported methods
}
Source Files
¶
- blob_store_path.go
- main.go
- util.go
- util_private.go
- v3.go
- v3_cache.go
- v3_system.go