validation

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllSpecification

type AllSpecification struct {
	// contains filtered or unexported fields
}

func (*AllSpecification) IsSatisfiedBy

func (all *AllSpecification) IsSatisfiedBy(candidate interface{}) bool

func (*AllSpecification) String

func (all *AllSpecification) String() string

type AndNotSpecification

type AndNotSpecification struct {
	// contains filtered or unexported fields
}

func (*AndNotSpecification) IsSatisfiedBy

func (an *AndNotSpecification) IsSatisfiedBy(candidate interface{}) bool

func (*AndNotSpecification) String

func (an *AndNotSpecification) String() string

type AndSpecification

type AndSpecification struct {
	// contains filtered or unexported fields
}

func (*AndSpecification) IsSatisfiedBy

func (and *AndSpecification) IsSatisfiedBy(candidate interface{}) bool

func (*AndSpecification) String

func (and *AndSpecification) String() string

type AnySpecification

type AnySpecification struct {
	// contains filtered or unexported fields
}

func (*AnySpecification) IsSatisfiedBy

func (any *AnySpecification) IsSatisfiedBy(candidate interface{}) bool

func (*AnySpecification) String

func (any *AnySpecification) String() string

type ErrChain

type ErrChain struct {
	// contains filtered or unexported fields
}

ErrChain implement error interface

func (*ErrChain) Error

func (e *ErrChain) Error() string

type NotSpecification

type NotSpecification struct {
	// contains filtered or unexported fields
}

func (*NotSpecification) IsSatisfiedBy

func (not *NotSpecification) IsSatisfiedBy(candidate interface{}) bool

func (*NotSpecification) String

func (not *NotSpecification) String() string

type Notification

type Notification interface {
	Add(error)
	Err() error
}

Notification define a interface to abstract notification pattern

func NewSimpleNotification

func NewSimpleNotification() Notification

type OrNotSpecification

type OrNotSpecification struct {
	// contains filtered or unexported fields
}

func (*OrNotSpecification) IsSatisfiedBy

func (on *OrNotSpecification) IsSatisfiedBy(candidate interface{}) bool

func (*OrNotSpecification) String

func (on *OrNotSpecification) String() string

type OrSpecification

type OrSpecification struct {
	// contains filtered or unexported fields
}

func (*OrSpecification) IsSatisfiedBy

func (or *OrSpecification) IsSatisfiedBy(candidate interface{}) bool

func (*OrSpecification) String

func (or *OrSpecification) String() string

type Specification

type Specification interface {
	// // String print the specification details
	fmt.Stringer
	// IsSatisfiedBy check if candidate matched the specification
	IsSatisfiedBy(candidate interface{}) bool
}

Specification define a interface

func NewAllSpecification

func NewAllSpecification(specs ...Specification) Specification

func NewAndNotSpecification

func NewAndNotSpecification(s1, s2 Specification) Specification

func NewAndSpecification

func NewAndSpecification(s1, s2 Specification) Specification

func NewAnySpecification

func NewAnySpecification(specs ...Specification) Specification

func NewNotSpecification

func NewNotSpecification(spec Specification) Specification

func NewOrNotSpecification

func NewOrNotSpecification(s1, s2 Specification) Specification

func NewOrSpecification

func NewOrSpecification(s1, s2 Specification) Specification

Jump to

Keyboard shortcuts

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