Documentation ¶
Index ¶
Constants ¶
View Source
const ( CustomRulesFilterName = "custom-rules" CustomTagName = "custom" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Instance ¶
type List ¶
type Parameter ¶ added in v0.29.0
type Parameter struct { Name string `validate:"required"` Description string `validate:"required"` Link string `validate:"omitempty,url" yaml:",omitempty"` Type ParamType `validate:"required,oneof=checkbox string list multiline"` OnlyIf string `validate:"omitempty,valid_only_if" yaml:",omitempty"` Default interface{} `validate:"valid_default"` Rules string `validate:"omitempty,raw_rules_allowed" yaml:",omitempty"` Presets []Preset `validate:"omitempty,preset_allowed,dive" yaml:",omitempty"` }
func (*Parameter) BuildPresetParamName ¶ added in v0.29.0
type Preset ¶
type Preset struct { Name string `validate:"required"` Description string `validate:"required"` Source string `validate:"omitempty,url" yaml:",omitempty"` License string `validate:"required_with=Source" yaml:",omitempty"` Values []string `validate:"required_without=Source"` Default bool `yaml:",omitempty"` }
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
Repository holds parsed Templates ready for use
func Load ¶ added in v0.29.0
func Load(templates, presets fs.FS) (*Repository, error)
Load parses template definitions from the given filesystem
func (*Repository) GetAll ¶ added in v0.29.0
func (r *Repository) GetAll() []*Template
func (*Repository) GetTags ¶
func (r *Repository) GetTags() []string
func (*Repository) Has ¶ added in v0.31.0
func (r *Repository) Has(name string) bool
type Template ¶ added in v0.29.0
type Template struct { Name string `validate:"required" yaml:"-"` Title string `validate:"required"` Params []Parameter `validate:"dive" yaml:",omitempty"` Tags []string `validate:"dive,alphaunicode" yaml:",omitempty"` Template string `validate:"required_without=rawRules,excluded_with=rawRules"` Tests []testCase Description string `validate:"required" yaml:"-"` Contributors []string Sponsors []string // contains filtered or unexported fields }
type TestModeTransformer ¶ added in v0.21.0
type TestModeTransformer struct {
// contains filtered or unexported fields
}
func NewTestModeTransformer ¶ added in v0.21.0
func NewTestModeTransformer(out io.Writer) *TestModeTransformer
Source Files ¶
Click to show internal directories.
Click to hide internal directories.