config

package
v0.11.7 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AvailableWorkflows = Workflows{WorkflowDirect, WorkflowPR}

AvailableWorkflows contains all valid workflow values.

Functions

This section is empty.

Types

type Config

type Config struct {
	Workflow       Workflow `yaml:"workflow"`
	InboxDir       string   `yaml:"inboxDir"`
	QueueDir       string   `yaml:"queueDir"`
	CompletedDir   string   `yaml:"completedDir"`
	LogDir         string   `yaml:"logDir"`
	ContainerImage string   `yaml:"containerImage"`
	DebounceMs     int      `yaml:"debounceMs"`
	ServerPort     int      `yaml:"serverPort"`
}

Config holds the dark-factory configuration.

func Defaults

func Defaults() Config

Defaults returns a Config with all default values.

func (Config) Validate

func (c Config) Validate(ctx context.Context) error

Validate validates the config fields.

type Loader

type Loader interface {
	Load(ctx context.Context) (Config, error)
}

Loader loads configuration from a file.

func NewLoader

func NewLoader() Loader

NewLoader creates a Loader that reads from .dark-factory.yaml in the current directory.

type Workflow

type Workflow string

Workflow is a string-based enum for workflow types.

const (
	WorkflowDirect Workflow = "direct"
	WorkflowPR     Workflow = "pr"
)

Workflow defines how prompts are processed.

func (Workflow) Ptr

func (w Workflow) Ptr() *Workflow

func (Workflow) String

func (w Workflow) String() string

func (Workflow) Validate

func (w Workflow) Validate(ctx context.Context) error

type Workflows

type Workflows []Workflow

Workflows is a collection of Workflow values.

func (Workflows) Contains

func (w Workflows) Contains(workflow Workflow) bool

Jump to

Keyboard shortcuts

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