Documentation
¶
Overview ¶
Package buildpaths centralizes the gobeyond.builds/v1 asset layout: the on-disk locations gobeyond build writes and the public URLs the runtime and CDN serve them from. Every producer and consumer of a build artifact must go through this package so the disk layout and the URL space never drift apart.
Disk:
dist/static/_gobeyond/builds/<build-id>/assets/... dist/static/_gobeyond/builds/<build-id>/manifest.json dist/static/_gobeyond/builds/<build-id>/static/<route-id>
URLs:
/_gobeyond/builds/<id>/assets/... /_gobeyond/builds/<id>/manifest.json /_gobeyond/builds/<id>/static/<route-id> /_gobeyond/builds/<id>/runtime/... /_gobeyond/builds/<id>/actions/...
Index ¶
- Constants
- func ActionURL(buildID, actionID string) string
- func AssetBaseURL(buildID string) string
- func AssetURL(buildID, file string) string
- func AssetsDir(staticDir, buildID string) string
- func BuildPathKind(path string) (kind string, ok bool)
- func BuildRootURL(buildID string) string
- func IsStaticArtifact(path string) bool
- func ManifestPath(staticDir, buildID string) string
- func ManifestURL(buildID string) string
- func ParseActionPath(path string) (buildID, actionID string, ok bool)
- func ParseRuntimePath(path string) (buildID, routeID string, ok bool)
- func RuntimeURL(buildID, routeID string) string
- func StaticBuildRoot(staticDir, buildID string) string
- func StaticRoutePath(staticDir, buildID, routeID string) string
- func StaticRouteURL(buildID, routeID string) string
Constants ¶
const ( WorkersDir = "workers" WorkerEntryName = "gobeyond-worker" WorkersManifest = "workers.json" AgentsManifest = "agents.json" WakeManifest = "wake.json" // DurablesAdapterTemporal is the v1 runtime adapter stamped into // dist/deploy/workers.json. Platform ensure/provisioning keys off this id. DurablesAdapterTemporal = "temporal" )
Worker artifact locations inside dist/ under AssetLayoutV3.
const ( KindAssets = "assets" KindManifest = "manifest.json" KindStatic = "static" KindRuntime = "runtime" KindActions = "actions" )
Well-known path segments immediately following a build ID.
const AssetLayout = AssetLayoutV5
AssetLayout identifies the current on-disk/URL layout implemented by this package. It is published in build metadata so tooling and deployment references can detect the layout a build was produced with.
const AssetLayoutV5 = "gobeyond.builds/v5"
AssetLayoutV5 runs authored Go middleware inside the application process and emits the immutable proxy policy artifact.
const BuildsPrefix = "/_gobeyond/builds/"
BuildsPrefix is the reserved public URL prefix every build-scoped path falls under.
Variables ¶
This section is empty.
Functions ¶
func AssetBaseURL ¶
AssetBaseURL is the public URL root for one build's browser assets.
func AssetURL ¶
AssetURL is the public URL for one emitted browser asset file. file may be slash-separated and is normalized to forward slashes.
func BuildPathKind ¶
BuildPathKind returns the path segment immediately following the build ID in a "/_gobeyond/builds/<id>/<kind>/..." request, e.g. "runtime", "actions", "assets", "static", or "manifest.json". It reports ok=false when path is not under the builds namespace or is missing that segment.
func BuildRootURL ¶
BuildRootURL is the public URL root for one build's artifacts.
func IsStaticArtifact ¶
IsStaticArtifact reports whether path addresses a build's static-served artifact (browser assets, the manifest, or packaged static route data) rather than a dynamic runtime/action request that must reach the Go handler.
func ManifestPath ¶
ManifestPath is the on-disk location of a build's browser asset manifest.
func ManifestURL ¶
ManifestURL is the public URL for a build's browser asset manifest.
func ParseActionPath ¶
ParseActionPath parses a "/_gobeyond/builds/<id>/actions/<actionId>" request path.
func ParseRuntimePath ¶
ParseRuntimePath parses a "/_gobeyond/builds/<id>/runtime/<routeId>" request path.
func RuntimeURL ¶
RuntimeURL is the public URL soft navigation fetches for one page route.
func StaticBuildRoot ¶
StaticBuildRoot is the on-disk root for one build's static artifacts.
func StaticRoutePath ¶
StaticRoutePath is the on-disk location of one route's packaged static data.
func StaticRouteURL ¶
StaticRouteURL is the public URL for one build's packaged static route data.
Types ¶
This section is empty.