Documentation
¶
Overview ¶
Package assets resolves the repository-relative files the engine reads. A file present in the workspace root wins, so a run inside an api-platform checkout reads the live source. Otherwise the embedded copy shipped with the framework module is used, which lets a project that imports the module run without an api-platform checkout.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var SnapshotSources = []string{
"gateway/configs/config.toml",
"gateway/configs/llm-pricing/model_prices.json",
"gateway/gateway-controller/pkg/storage/gateway-controller-db.postgres.sql",
"gateway/gateway-controller/pkg/storage/gateway-controller-db.sqlserver.sql",
}
SnapshotSources lists the repository files and directories outside the framework module that the engine reads and that the module therefore carries a copy of. Each is mirrored under snapshots/ at its repository-relative path.
Functions ¶
func Resolve ¶
Resolve maps a repository-relative path to a path on disk. A file or directory that exists beneath workspaceRoot is used as is. Otherwise the framework's embedded copy is extracted once and its path returned. A path that is empty, absolute or unknown is returned unchanged, or beneath workspaceRoot, so the caller's own error names the file.
func SyncSnapshots ¶
SyncSnapshots compares each snapshot source in repoRoot with its copy under moduleRoot/snapshots and returns the repository-relative files that differ or are missing. When write is true it copies the sources over the snapshots. A snapshot file whose source no longer exists is reported as well and removed when write is true.
Types ¶
This section is empty.