example

package
v0.0.0-...-8d22ec3 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

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
}

与规格

func (*AndSpecification) IsSatisfiedBy

func (as *AndSpecification) IsSatisfiedBy(obj Object) bool

检查规格

type BusinessSpecification

type BusinessSpecification struct {
	Specification
}

业务规格

func (*BusinessSpecification) IsSatisfiedBy

func (bs *BusinessSpecification) IsSatisfiedBy(obj Object) bool

检查规格

type CompositeSpecification

type CompositeSpecification struct {
	Specification
}

组合规格

func (*CompositeSpecification) And

规格与操作

func (*CompositeSpecification) IsSatisfiedBy

func (cs *CompositeSpecification) IsSatisfiedBy(obj Object) bool

检查规格

func (*CompositeSpecification) Not

规格非操作

func (*CompositeSpecification) Or

规格或操作

func (*CompositeSpecification) Relate

func (cs *CompositeSpecification) Relate(spec Specification)

与规格有关

type NotSpecification

type NotSpecification struct {
	Specification
}

非规格

func (*NotSpecification) IsSatisfiedBy

func (ns *NotSpecification) IsSatisfiedBy(obj Object) bool

检查规格

type Object

type Object struct {
	Attribute int
}

对象

type OrSpecification

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

或规格

func (*OrSpecification) IsSatisfiedBy

func (os *OrSpecification) IsSatisfiedBy(obj Object) bool

检查规格

type Specification

type Specification interface {
	IsSatisfiedBy(Object) bool
	And(Specification) Specification
	Or(Specification) Specification
	Not() Specification
	Relate(Specification)
}

规格接口

func NewBusinessSpecification

func NewBusinessSpecification() Specification

构造函数

Jump to

Keyboard shortcuts

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