Documentation
¶
Index ¶
- type Condition
- type Dictionary
- type Entry
- type Formatter
- type Grouped
- type Metadata
- type OnRename
- type Pending
- type Result
- func (result Result) Conditions(conditions ...Condition) Result
- func (result Result) Fail() Result
- func (result Result) Name(attribute string) Result
- func (result Result) OnRename(callback OnRename) Result
- func (result Result) Pass() Result
- func (result Result) Passes() bool
- func (result Result) PassesAll() bool
- func (result Result) PassesChilds() bool
- func (result Result) Results(name string) Results
- func (result Result) Translate(dictionaries ...Dictionary) Result
- func (result Result) When(condition bool) Result
- func (result Result) With(key string, value any) Result
- func (result Result) WithChild(child Result) Result
- func (result Result) WithMetadata(metadata Metadata) Result
- func (result Result) WithMetadataMerged(metadata Metadata) Result
- func (result Result) WithPrefixedChild(child Result) Result
- type Results
- func (results Results) Failed() Results
- func (results Results) Group() Grouped
- func (results Results) Has(attribute string) bool
- func (results Results) Messages(formatters ...Formatter) []string
- func (results Results) Passed() Results
- func (results Results) PassesAll() bool
- func (results Results) PassesAny() bool
- func (results Results) Prefixed(prefix string) Results
- func (results Results) Translate(dictionaries ...Dictionary) Results
- type Rule
- func (rule Rule) Code(code string) Rule
- func (rule Rule) Conditions(conditions ...Condition) Rule
- func (rule Rule) Message(message string) Rule
- func (rule Rule) Rename(code string) Rule
- func (rule Rule) When(condition bool) Rule
- func (rule Rule) With(key string, val any) Rule
- func (rule Rule) WithMetadata(metadata Metadata) Rule
- func (rule Rule) WithMetadataMerged(metadata Metadata) Rule
- type Rules
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dictionary ¶
type Entry ¶
type Entry func(dictionary Dictionary, result Result) Result
type Pending ¶
type Pending struct {
// contains filtered or unexported fields
}
func (Pending) AppendRules ¶
type Result ¶
type Result struct { Attribute string `json:"attribute"` Value any `json:"value"` Code string `json:"code"` Message string `json:"message"` Metadata Metadata `json:"metadata"` // contains filtered or unexported fields }
func (Result) Conditions ¶
func (Result) PassesChilds ¶
func (Result) Translate ¶
func (result Result) Translate(dictionaries ...Dictionary) Result
func (Result) WithMetadata ¶
func (Result) WithMetadataMerged ¶
func (Result) WithPrefixedChild ¶ added in v0.9.0
type Results ¶
type Results []Result
func (Results) Translate ¶
func (results Results) Translate(dictionaries ...Dictionary) Results
Source Files
¶
Click to show internal directories.
Click to hide internal directories.