files

package
v1.8.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 8 Imported by: 0

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 DockerDir

func DockerDir() string

func EnsureDir

func EnsureDir(path string) (string, error)

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

func LoadEnv(dir string) error

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.

func VarDir

func VarDir() string

VarDir returns the runtime data directory. Dev: ~/.{project}/dev/var/ Prod: ~/.{project}/var/

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL