config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2025 License: MIT Imports: 7 Imported by: 0

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

func FindWorkspaceRoot(startDir string) (string, error)

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

func WriteDefaultConfig(workspaceRoot string) error

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 NewLoader

func NewLoader(workspaceRoot string) *Loader

NewLoader creates a new config loader.

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.

Jump to

Keyboard shortcuts

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