Documentation ¶
Index ¶
- type AllSpecification
- type AndNotSpecification
- type AndSpecification
- type AnySpecification
- type ErrChain
- type NotSpecification
- type Notification
- type OrNotSpecification
- type OrSpecification
- type Specification
- func NewAllSpecification(specs ...Specification) Specification
- func NewAndNotSpecification(s1, s2 Specification) Specification
- func NewAndSpecification(s1, s2 Specification) Specification
- func NewAnySpecification(specs ...Specification) Specification
- func NewNotSpecification(spec Specification) Specification
- func NewOrNotSpecification(s1, s2 Specification) Specification
- func NewOrSpecification(s1, s2 Specification) Specification
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
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 ¶
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
Click to show internal directories.
Click to hide internal directories.