config

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigDir

func ConfigDir() (string, error)

ConfigDir returns the path to the .velocity directory

func ConfigPath

func ConfigPath() (string, error)

ConfigPath returns the path to the config.yaml file

func ValidateCache

func ValidateCache(cache string) error

ValidateCache validates cache driver value

func ValidateDatabase

func ValidateDatabase(db string) error

ValidateDatabase validates database driver value

func ValidateQueue

func ValidateQueue(queue string) error

ValidateQueue validates queue driver value

Types

type Config

type Config struct {
	Defaults DefaultConfig `yaml:"defaults"`
}

Config represents global CLI configuration

func Load

func Load() (*Config, error)

Load reads the configuration from disk

func (*Config) Save

func (c *Config) Save() error

Save writes the configuration to disk with file locking

type DefaultConfig

type DefaultConfig struct {
	Database string `yaml:"database,omitempty"`
	Cache    string `yaml:"cache,omitempty"`
	Queue    string `yaml:"queue,omitempty"`
	Auth     bool   `yaml:"auth,omitempty"`
	API      bool   `yaml:"api,omitempty"`
}

DefaultConfig holds default values for project creation

Jump to

Keyboard shortcuts

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