settings

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserSettingsDirName     = ".arara"
	UserSettingsFileName    = "settings.json"
	ProjectSettingsDirName  = ".arara"
	ProjectSettingsFileName = "settings.json"

	SourceDefault = "default"
	SourceUser    = "user"
	SourceProject = "project"
)

Variables

This section is empty.

Functions

func GetValue

func GetValue(workingDir, dottedPath string) (any, string, error)

func KnownPaths

func KnownPaths() []string

func ProjectSettingsPath

func ProjectSettingsPath(workingDir string) string

func UserSettingsPath

func UserSettingsPath() string

func WriteValue

func WriteValue(scope WriteScope, workingDir, dottedPath string, value any) error

Types

type Experimental

type Experimental struct {
	OAuth bool `json:"oauth,omitempty"`
}

type Hooks

type Hooks struct {
	PreSend      []string `json:"preSend,omitempty"`
	PostDeliver  []string `json:"postDeliver,omitempty"`
	PreCampaign  []string `json:"preCampaign,omitempty"`
	PostCampaign []string `json:"postCampaign,omitempty"`
	OnError      []string `json:"onError,omitempty"`
}

type MCPSettings

type MCPSettings struct {
	AllowWriteTools bool `json:"allowWriteTools,omitempty"`
}

type PluginSettings

type PluginSettings struct {
	SearchPaths []string `json:"searchPaths,omitempty"`
	Disabled    []string `json:"disabled,omitempty"`
}

type Resolved

type Resolved struct {
	Settings Settings
	Fields   []ResolvedField
	Sources  []Source
}

func Load

func Load(workingDir string) (*Resolved, error)

type ResolvedField

type ResolvedField struct {
	Path   string
	Value  any
	Source string
}

type Settings

type Settings struct {
	Theme              string         `json:"theme,omitempty"`
	Output             string         `json:"output,omitempty"`
	Hooks              Hooks          `json:"hooks,omitempty"`
	Plugins            PluginSettings `json:"plugins,omitempty"`
	MCP                MCPSettings    `json:"mcp,omitempty"`
	HookTimeoutSeconds int            `json:"hookTimeoutSeconds,omitempty"`
	Experimental       Experimental   `json:"experimental,omitempty"`
}

func Defaults

func Defaults() Settings

type Source

type Source struct {
	Name string
	Path string
}

type WriteScope

type WriteScope string
const (
	ScopeUser    WriteScope = "user"
	ScopeProject WriteScope = "project"
)

Jump to

Keyboard shortcuts

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