Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigDir ¶
func ConfigDir() string
ConfigDir returns the project's config/secrets directory. Dev: ~/.{project}/dev/etc/ Prod: ~/.{project}/etc/
func DataDir ¶
func DataDir() string
DataDir returns the project's persistent data directory, creating it if needed. Dev: ~/.{project}/dev/var/ Prod: ~/.{project}/var/
func EnsureDir ¶
EnsureDir ensures a directory exists, creating it if needed. Returns the absolute path to the directory.
func EnsureProjectConfigured ¶ added in v1.8.2
func EnsureProjectConfigured() error
EnsureProjectConfigured makes sure the project name is registered. If it was not compiled in via constants.gen.go (the usual case when the framework CLI runs on the host rather than the project's own binary), it reads name/port from the nearest schemaf.toml — the canonical definition of a project.
Returns an actionable error if no configured schemaf.toml can be found, so callers can tell the user to run `schemaf init` instead of crashing.
func LoadEnv ¶
LoadEnv reads KEY=VALUE lines from <dir>/env and sets them in the process environment (only if the variable is not already set).
func ProjectHome ¶
func ProjectHome() string
ProjectHome returns the project's home directory (~/.{project}). Panics if the project name has not been set via constants.SetProjectName.
Types ¶
This section is empty.