Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Root string `yaml:"root"`
Include []string `yaml:"include"`
Exclude []string `yaml:"exclude"`
Mark struct {
LLMCmd string `yaml:"llm_cmd"`
LLMExcerptBytes int `yaml:"llm_excerpt_bytes"`
LLMPrompt string `yaml:"llm_prompt"`
} `yaml:"mark"`
Index struct {
Template string `yaml:"template"`
Output string `yaml:"output"`
} `yaml:"index"`
Output struct {
DefaultFormat string `yaml:"default_format"`
} `yaml:"output"`
}
Config is a loaded .nasc/config.yaml. Every field is optional.
func LoadConfig ¶
LoadConfig reads config from path, returning defaults when it is absent.
type Field ¶
type Field struct {
Type string `yaml:"type"`
Required bool `yaml:"required"`
Derive string `yaml:"derive"`
Enum []string `yaml:"enum"`
MinLength int `yaml:"min_length"`
MaxLength int `yaml:"max_length"`
Items string `yaml:"items"`
}
Field is one declared frontmatter field.
type Rule ¶
type Rule struct {
Name string `yaml:"name"`
When string `yaml:"when"`
Assert string `yaml:"assert"`
Severity string `yaml:"severity"`
Message string `yaml:"message"`
}
Rule is one custom validation rule.
Click to show internal directories.
Click to hide internal directories.