Documentation
¶
Index ¶
- func Feature(config ...func(*Installer)) miruken.Feature
- func Groups(groups ...any) miruken.Constraint
- func Output(installer *Installer)
- type Builder
- type Constraints
- func (p *Constraints) AppliesTo(callback miruken.Callback) bool
- func (p *Constraints) Filters(binding miruken.Binding, callback any, composer miruken.Handler) ([]miruken.Filter, error)
- func (p *Constraints) InitWithTag(tag reflect.StructTag) error
- func (p *Constraints) Required() bool
- func (p *Constraints) ValidateOutput() bool
- type Group
- type Installer
- type It
- func (v *It) Dispatch(handler any, greedy bool, composer miruken.Handler) miruken.HandleResult
- func (v *It) Groups() []any
- func (v *It) InGroup(group any) bool
- func (v *It) Key() any
- func (v *It) Outcome() *Outcome
- func (v *It) Policy() miruken.Policy
- func (v *It) Source() any
- func (v *It) String() string
- type Outcome
- type Strict
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Groups ¶
func Groups(groups ...any) miruken.Constraint
Groups builds a validation Group constraint.
Types ¶
type Builder ¶
type Builder struct { miruken.CallbackBuilder // contains filtered or unexported fields }
Builder builds It callbacks.
type Constraints ¶ added in v0.30.1
type Constraints struct {
// contains filtered or unexported fields
}
Constraints is a FilterProvider for validation.
func (*Constraints) AppliesTo ¶ added in v0.30.1
func (p *Constraints) AppliesTo( callback miruken.Callback, ) bool
func (*Constraints) InitWithTag ¶ added in v0.30.1
func (p *Constraints) InitWithTag(tag reflect.StructTag) error
func (*Constraints) Required ¶ added in v0.30.1
func (p *Constraints) Required() bool
func (*Constraints) ValidateOutput ¶ added in v0.30.2
func (p *Constraints) ValidateOutput() bool
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
Group marks a set of related validations.
type Installer ¶
type Installer struct {
// contains filtered or unexported fields
}
Installer enables validation support.
type It ¶
type It struct { miruken.CallbackBase // contains filtered or unexported fields }
It validates callbacks contravariantly.
type Outcome ¶
type Outcome struct {
// contains filtered or unexported fields
}
Outcome captures structured validation errors.
func Input ¶ added in v0.30.2
func Input( handler miruken.Handler, source any, constraints ...any, ) (o *Outcome, po *promise.Promise[*Outcome], err error)
Input performs all validations on `source`.
func (*Outcome) FieldErrors ¶
func (*Outcome) RequirePath ¶
Click to show internal directories.
Click to hide internal directories.