Documentation
¶
Overview ¶
Package config handles loading and validation of monox configuration files.
Index ¶
Constants ¶
View Source
const ( // ConfigFileName is the name of the workspace config file ConfigFileName = "monox.yaml" // ProjectConfigFileName is the name of per-project config files ProjectConfigFileName = "project.yaml" // DefaultCacheDir is the default local cache directory DefaultCacheDir = ".monox/cache" // CurrentConfigVersion is the current config schema version CurrentConfigVersion = 1 )
Variables ¶
This section is empty.
Functions ¶
func FindWorkspaceRoot ¶
FindWorkspaceRoot searches for the workspace root directory. It walks up the directory tree looking for monox.yaml.
func Load ¶
func Load(workspaceRoot string) (*api.WorkspaceConfig, error)
Load is a convenience function that loads workspace configuration from a root path.
func Save ¶
func Save(workspaceRoot string, config *api.WorkspaceConfig) error
Save saves a workspace configuration to the given root path.
func WriteDefaultConfig ¶
WriteDefaultConfig writes a default monox.yaml to the workspace root.
Types ¶
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
Loader handles loading configuration from files.
func (*Loader) LoadProjectConfig ¶
func (l *Loader) LoadProjectConfig(projectPath string) (*api.ProjectConfig, error)
LoadProjectConfig loads a project-specific configuration.
func (*Loader) LoadWorkspaceConfig ¶
func (l *Loader) LoadWorkspaceConfig() (*api.WorkspaceConfig, error)
LoadWorkspaceConfig loads the workspace configuration from monox.yaml.
Click to show internal directories.
Click to hide internal directories.