Documentation
¶
Index ¶
- type AndSpecification
- type BaseSpecification
- func (self *BaseSpecification) And(spec Specification) Specification
- func (self *BaseSpecification) IsSatisfiedBy(elm Invoice) bool
- func (self *BaseSpecification) Not() Specification
- func (self *BaseSpecification) Or(spec Specification) Specification
- func (self *BaseSpecification) Relate(spec Specification)
- type InCollectionSpecification
- type Invoice
- type NotSpecification
- type NoticeSentSpecification
- type OrSpecification
- type OverDueSpecification
- type Specification
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AndSpecification ¶
type AndSpecification struct {
Specification
// contains filtered or unexported fields
}
AndSpecification
func (*AndSpecification) IsSatisfiedBy ¶
func (self *AndSpecification) IsSatisfiedBy(elm Invoice) bool
Check specification
type BaseSpecification ¶
type BaseSpecification struct {
Specification
}
Invoice BaseSpecification
func (*BaseSpecification) And ¶
func (self *BaseSpecification) And(spec Specification) Specification
Condition AND
func (*BaseSpecification) IsSatisfiedBy ¶
func (self *BaseSpecification) IsSatisfiedBy(elm Invoice) bool
Check specification
func (*BaseSpecification) Or ¶
func (self *BaseSpecification) Or(spec Specification) Specification
Condition OR
func (*BaseSpecification) Relate ¶
func (self *BaseSpecification) Relate(spec Specification)
Relate to specification
type InCollectionSpecification ¶
type InCollectionSpecification struct {
Specification
}
Invoice has already been sent to the collection agency.
func (*InCollectionSpecification) IsSatisfiedBy ¶
func (self *InCollectionSpecification) IsSatisfiedBy(elm Invoice) bool
Check specification
type NotSpecification ¶
type NotSpecification struct {
Specification
}
NotSpecification
func (*NotSpecification) IsSatisfiedBy ¶
func (self *NotSpecification) IsSatisfiedBy(elm Invoice) bool
Check specification
type NoticeSentSpecification ¶
type NoticeSentSpecification struct {
Specification
}
Three notices have been sent to the customer
func (*NoticeSentSpecification) IsSatisfiedBy ¶
func (self *NoticeSentSpecification) IsSatisfiedBy(elm Invoice) bool
Check specification
type OrSpecification ¶
type OrSpecification struct {
Specification
// contains filtered or unexported fields
}
OrSpecification
func (*OrSpecification) IsSatisfiedBy ¶
func (self *OrSpecification) IsSatisfiedBy(elm Invoice) bool
Check specification
type OverDueSpecification ¶
type OverDueSpecification struct {
Specification
}
Invoice's due date is 30 days or older
func (*OverDueSpecification) IsSatisfiedBy ¶
func (self *OverDueSpecification) IsSatisfiedBy(elm Invoice) bool
Check specification
type Specification ¶
type Specification interface {
IsSatisfiedBy(Invoice) bool
And(Specification) Specification
Or(Specification) Specification
Not() Specification
Relate(Specification)
}
Invoice Specification Interface
Click to show internal directories.
Click to hide internal directories.