settings

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProjectSchema added in v0.20.1

func ProjectSchema() *jsonschema.Schema

Types

type CliSettings

type CliSettings struct {
	ConfigProject ConfigProject         // 1. defaults loaded
	ConfigPath    string                // 2. user config overrides defaults
	Crie          crie.RunConfiguration // 3. final config
	Quiet         bool
	Verbose       bool
	Trace         bool
	JSON          bool
}

CliSettings are all the things for crie cli

var Cli CliSettings

Cli is the entire current Crie Cli settings

func (*CliSettings) CreateNewProjectSettings

func (cli *CliSettings) CreateNewProjectSettings() error

CreateNewProjectSettings Creates the settings file locally

func (*CliSettings) LoadConfigFile

func (cli *CliSettings) LoadConfigFile() error

LoadConfigFile load overrides for our projects' settings

func (*CliSettings) SaveConfiguration

func (cli *CliSettings) SaveConfiguration()

SaveConfiguration pushes the ConfigProject to the crie.RunConfiguration

type ConfigLanguage

type ConfigLanguage struct {
	Regex *ConfigRegex `` /* 193-byte string literal not displayed */
	Fmt   ConfigLinter `json:"fmt,omitempty" yaml:"fmt,omitempty" jsonschema_description:"used for the given language when formatting"`
	Chk   ConfigLinter `json:"chk,omitempty" yaml:"chk,omitempty" jsonschema_description:"used for the given language when linting/checking"`
}

ConfigLanguage is used to map customer yaml decoders for implementations of Crie linters

type ConfigLinter

type ConfigLinter struct {
	linter.Linter
}

ConfigLinter attaches a type discriminator field to make a Crie Linter implementation yaml parsable

func (ConfigLinter) JSONSchema added in v0.20.1

func (c ConfigLinter) JSONSchema() *jsonschema.Schema

func (*ConfigLinter) UnmarshalYAML

func (cl *ConfigLinter) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML implements custom YAML unmarshalling

type ConfigProject

type ConfigProject struct {
	Languages map[string]ConfigLanguage `json:"languages" yaml:"languages" jsonschema_description:"a map of languages that crie should be able to run"`
	Ignore    []string                  `` /* 137-byte string literal not displayed */
}

ConfigProject is the schema for a projects' settings file

type ConfigRegex

type ConfigRegex struct {
	*regexp.Regexp
}

ConfigRegex wraps regexp.Regexp with custom YAML unmarshaling

func (*ConfigRegex) UnmarshalYAML

func (cr *ConfigRegex) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML implements custom YAML unmarshalling

Jump to

Keyboard shortcuts

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