Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanRoute ¶
Types ¶
type ChannelEntry ¶
ChannelEntry is one loadable channel definition. Name identifies the reusable definition; dynamic instance keys are supplied at runtime.
type Project ¶
type Project struct {
RootDir string
}
func (*Project) Channels ¶
func (p *Project) Channels() ([]ChannelEntry, error)
Channels builds the lightweight startup index for websocket channel definitions. It reads paths only; source modules are compiled on demand.
func (*Project) ResolvePageRoute ¶
func (p *Project) ResolvePageRoute(route string) (RouteEntry, bool, error)
ResolvePageRoute returns the public page selected for an HTTP route. The runtime represents the root page internally as /index, while the canonical project route is /. Both forms resolve to pages/index.gox.
func (*Project) Routes ¶
func (p *Project) Routes() ([]RouteEntry, error)
func (*Project) UseAsWorkingDir ¶
UseAsWorkingDir makes the project root the process working directory. User code compiled by Gox runs in-process, so relative paths used with standard Go APIs such as os.Open resolve from the project root.