configuration

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	And logicalOperator = iota
	Or
)

Variables

This section is empty.

Functions

func Is

func Is(v1, v2 value.Value) bool

func IsImpossible

func IsImpossible(v1, v2 value.Value) bool

func NewCompositeCondition

func NewCompositeCondition(left condition, op logicalOperator, right condition) compositeCondition

func NewDisableExecution

func NewDisableExecution(paramId int) disableExecution

func NewDisabledCondition

func NewDisabledCondition(paramId int) parameterDisabledCondition

func NewExcludeValueExecution

func NewExcludeValueExecution(srcId, targetId int, value value.Value) excludeValueExecution

func NewFinalCondition

func NewFinalCondition(paramId int) parameterFinalCondition

func NewSetValueExecution

func NewSetValueExecution(srcId, targetId int, value value.Value) setValueExecution

func NewValueCondition

func NewValueCondition(paramId int, op compareOperator, value value.Value) parameterValueCondition

Types

type Constraint

type Constraint func(map[int]*InternalParameter) (bool, error)

func CreateContraint

func CreateContraint(condition condition, exexution execution) Constraint

type InternalConfiguration

type InternalConfiguration struct {
	Parameters map[int]*InternalParameter
}

func NewInternalConfiguration

func NewInternalConfiguration(parameters map[int]*InternalParameter) InternalConfiguration

func (InternalConfiguration) MutableParameterById

func (config InternalConfiguration) MutableParameterById(id int) (*InternalParameter, error)

func (InternalConfiguration) ParameterById

func (config InternalConfiguration) ParameterById(id int) (configuration.Parameter, error)

type InternalParameter

type InternalParameter struct {
	Constraints []Constraint
	// contains filtered or unexported fields
}

func NewInternalParameter

func NewInternalParameter(id int, name string, value value.Value) InternalParameter

func (*InternalParameter) AppendConstraint

func (p *InternalParameter) AppendConstraint(newConstraints Constraint)

func (InternalParameter) Final

func (p InternalParameter) Final() bool

func (InternalParameter) Id

func (p InternalParameter) Id() int

func (InternalParameter) Name

func (p InternalParameter) Name() string

func (*InternalParameter) RemoveRestrictionsFromConstraint

func (p *InternalParameter) RemoveRestrictionsFromConstraint(srcId int)

func (*InternalParameter) RestrictValue

func (p *InternalParameter) RestrictValue(aValue value.Value) (bool, error)

func (*InternalParameter) RestrictValueFromConstraint

func (p *InternalParameter) RestrictValueFromConstraint(srcId int, aValue value.Value) (bool, error)

func (InternalParameter) RestrictedValue

func (p InternalParameter) RestrictedValue() value.Value

func (InternalParameter) Selectable

func (p InternalParameter) Selectable() bool

func (InternalParameter) Value

func (p InternalParameter) Value() string

Jump to

Keyboard shortcuts

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