Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AliasRoot ¶
AliasRoot returns the source-tree boundary used by @ imports. Pages and WebSocket/Channel modules use identical ancestral lookup rules but never cross from one tree into the other.
func IsPublicPage ¶
IsPublicPage reports whether rel is a routable .gox file below pages/. A segment beginning with @ and a filename with an additional dot are private.
func PublicChannelIdentity ¶
PublicChannelIdentity returns the canonical static channel name and handler function represented by a public .gox file below websocket/. The root websocket/index.gox is reserved for the global WebSocket and is never a channel. Repeated terminal segments collapse (chat/chat.gox -> Chat), while nested names remain hierarchical (chat/index.gox -> Chat/Index).
func PublicPageRoute ¶
PublicPageRoute returns the canonical HTTP route represented by a public page path relative to the project root.
Types ¶
type ModuleContext ¶
type ModuleContext struct {
Kind ModuleKind
RelativePath string
ChannelName string
ChannelFunction string
}
func ClassifyModule ¶
func ClassifyModule(rel string) ModuleContext
ClassifyModule describes the filesystem role of a .gox source file. It does not validate which GOX entrypoints the module declares; compiler validation applies those rules separately.
type ModuleKind ¶
type ModuleKind string
const ( ModuleOther ModuleKind = "other" ModulePublicPage ModuleKind = "public-page" ModulePrivatePage ModuleKind = "private-page" ModulePageAlias ModuleKind = "page-alias" ModuleGlobalWebSocket ModuleKind = "global-websocket" ModulePublicChannel ModuleKind = "public-channel" ModulePrivateWebSocket ModuleKind = "private-websocket" ModuleWebSocketAlias ModuleKind = "websocket-alias" )
type Resolution ¶
func ResolveAlias ¶
func ResolveAlias(sourceRoot, importerPath, importPath string) (Resolution, error)
ResolveAlias resolves an @ import by searching only the importer's directory and its ancestors up to sourceRoot. The first existing regular file wins.