config

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Version        string   `yaml:"version"`
	Provider       string   `yaml:"provider"`
	Model          string   `yaml:"model"`
	APIKey         string   `yaml:"api_key"`
	BaseURL        string   `yaml:"base_url,omitempty"`
	Timeout        int      `yaml:"timeout"`
	MaxTokens      int      `yaml:"max_tokens"`
	Temperature    *float64 `yaml:"temperature,omitempty"`
	FailOnIssues   *bool    `yaml:"fail_on_issues,omitempty"`
	InferenceDelay *int     `yaml:"inference_delay,omitempty"`
	Rules          []Rule   `yaml:"rules"`
}

func Load

func Load(path string) (*Config, error)

func ParseFromBytes

func ParseFromBytes(data []byte) (*Config, error)

func (*Config) PrintAsYAML

func (c *Config) PrintAsYAML() error

type FilePattern

type FilePattern struct {
	Include []string `yaml:"include"`
	Exclude []string `yaml:"exclude,omitempty"`
}

type Rule

type Rule struct {
	Name                string      `yaml:"name"`
	Description         string      `yaml:"description"`
	Enabled             bool        `yaml:"enabled"`
	Files               FilePattern `yaml:"files"`
	Specs               []Spec      `yaml:"specs"`
	Prompt              string      `yaml:"prompt,omitempty"`
	FailOn              string      `yaml:"fail_on"`
	ConfidenceThreshold *float64    `yaml:"confidence_threshold,omitempty"` // Deprecated field
}

type Spec

type Spec struct {
	Path string `yaml:"path"`
}

Jump to

Keyboard shortcuts

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