Documentation
¶
Overview ¶
Package config loads the funq.yaml project file that anchors schema, generated output, migration, and development-database locations for every CLI command. It exists so commands take zero path flags in the common case: the file is discovered by walking up from the working directory, the same way go.mod is discovered.
Index ¶
Constants ¶
View Source
const FileName = "funq.yaml"
FileName is the project file discovered by Find and Load.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// Path is the absolute path to the loaded funq.yaml.
Path string
// Root is the directory containing funq.yaml. Relative paths in the
// file are resolved against it, not against the working directory.
Root string
// SchemaDir is the absolute directory containing schema declarations.
SchemaDir string
// OutDir is the absolute directory generated Go output is written to.
OutDir string
// MigrationsDir is the absolute directory Goose migrations are written
// to and read from.
MigrationsDir string
// contains filtered or unexported fields
}
Config is a funq.yaml project file resolved to absolute paths.
func Init ¶
Init scaffolds a new funq.yaml in dir. It fails if a project file already exists at or above dir.
Click to show internal directories.
Click to hide internal directories.