Documentation ¶
Index ¶
- Variables
- func IntegerEnumRanges() []int
- func IsOutOfRange(n byte) bool
- func MaxByte() byte
- func MinByte() byte
- func RangeNamesCsv() string
- type Value
- func CombinedBooleans(isConditions ...bool) Value
- func GetBool(isCondition bool) Value
- func GetSet(isCondition bool, trueValue Value, falseValue Value) Value
- func GetSetByte(isCondition bool, trueValue byte, falseValue byte) Value
- func GetSetUnset(isCondition bool) Value
- func GetSetterByComparing(trueVal, falseVal Value, expectedVal interface{}, trueRanges ...interface{}) Value
- func Max() Value
- func Min() Value
- func New(name string) (Value, error)
- func NewBool(isResult bool) Value
- func NewBooleans(isResults ...bool) Value
- func NewMust(name string) Value
- func (it Value) Add(n byte) Value
- func (it Value) AllNameValues() []string
- func (it Value) And(inputVal Value) Value
- func (it Value) AndBool(inputBool bool) bool
- func (it Value) Boolean() bool
- func (it Value) Deserialize(jsonBytes []byte) (Value, error)
- func (it Value) EnumType() enuminf.EnumTyper
- func (it Value) Format(format string) (compiled string)
- func (it Value) GetErrorOnOutOfRange(n byte, msg string) error
- func (it *Value) GetSetBoolOnInvalid(setterValue bool) bool
- func (it *Value) GetSetBoolOnInvalidFunc(setterFunc func() bool) bool
- func (it Value) HasInitialized() bool
- func (it Value) HasInitializedAndSet() bool
- func (it Value) HasInitializedAndTrue() bool
- func (it Value) IntegerEnumRanges() []int
- func (it Value) Is(n Value) bool
- func (it Value) IsAccept() bool
- func (it Value) IsAccepted() bool
- func (it Value) IsAnyNamesOf(names ...string) bool
- func (it Value) IsAnyValuesEqual(anyByteValues ...byte) bool
- func (it Value) IsAsk() bool
- func (it Value) IsBetween(start, end byte) bool
- func (it Value) IsBetweenInt(start, end int) bool
- func (it Value) IsByteValueEqual(value byte) bool
- func (it Value) IsCompareResult(n byte, compare corecomparator.Compare) bool
- func (it Value) IsDefinedBoolean() bool
- func (it Value) IsDefinedLogically() bool
- func (it Value) IsEqual(n byte) bool
- func (it Value) IsEqualInt(n int) bool
- func (it Value) IsFailed() bool
- func (it Value) IsFalse() bool
- func (it Value) IsGreater(n byte) bool
- func (it Value) IsGreaterEqual(n byte) bool
- func (it Value) IsGreaterEqualInt(n int) bool
- func (it Value) IsGreaterInt(n int) bool
- func (it Value) IsIndeterminate() bool
- func (it Value) IsInit() bool
- func (it Value) IsInitBoolean() bool
- func (it Value) IsInitBooleanWild() bool
- func (it Value) IsInitSet() bool
- func (it Value) IsInitSetWild() bool
- func (it Value) IsInitialized() bool
- func (it Value) IsInvalid() bool
- func (it Value) IsLater() bool
- func (it Value) IsLess(n byte) bool
- func (it Value) IsLessEqual(n byte) bool
- func (it Value) IsLessEqualInt(n int) bool
- func (it Value) IsLessInt(n int) bool
- func (it Value) IsNameEqual(name string) bool
- func (it Value) IsNegative() bool
- func (it Value) IsNo() bool
- func (it Value) IsOff() bool
- func (it Value) IsOffLogically() bool
- func (it Value) IsOn() bool
- func (it Value) IsOnLogically() bool
- func (it Value) IsPositive() bool
- func (it Value) IsReject() bool
- func (it Value) IsRejected() bool
- func (it Value) IsSet() bool
- func (it Value) IsSkip() bool
- func (it Value) IsSuccess() bool
- func (it Value) IsTrue() bool
- func (it Value) IsTrueOrSet() bool
- func (it Value) IsUnSetOrUninitialized() bool
- func (it Value) IsUndefinedLogically() bool
- func (it Value) IsUninitialized() bool
- func (it Value) IsUnset() bool
- func (it Value) IsValid() bool
- func (it Value) IsValueEqual(value byte) bool
- func (it Value) IsWildcard() bool
- func (it Value) IsWildcardOrBool(isBool bool) bool
- func (it Value) IsYes() bool
- func (it *Value) LazyEvaluateBool(evaluatorFunc func()) (isCalled bool)
- func (it *Value) LazyEvaluateSet(evaluatorFunc func()) (isCalled bool)
- func (it Value) MarshalJSON() ([]byte, error)
- func (it Value) MaxByte() byte
- func (it Value) MaxInt() int
- func (it Value) MaxValueString() string
- func (it Value) MinByte() byte
- func (it Value) MinInt() int
- func (it Value) MinMaxAny() (min, max interface{})
- func (it Value) MinValueString() string
- func (it Value) Name() string
- func (it Value) NameValue() string
- func (it Value) OnOffLowercaseName() string
- func (it Value) OnOffName() string
- func (it Value) OnlySupportedErr(names ...string) error
- func (it Value) OnlySupportedMsgErr(message string, names ...string) error
- func (it Value) OrBool(inputBool bool) bool
- func (it Value) OrValue(inputVal Value) bool
- func (it Value) PanicOnOutOfRange(n byte, msg string)
- func (it Value) RangeNamesCsv() string
- func (it Value) RangesByte() []byte
- func (it Value) RangesDynamicMap() map[string]interface{}
- func (it Value) Serialize() ([]byte, error)
- func (it Value) SetUnsetLowercaseName() string
- func (it Value) String() string
- func (it Value) StringValue() string
- func (it Value) ToBooleanValue() Value
- func (it Value) ToByteCondition(trueVal, falseVal, invalid byte) byte
- func (it Value) ToByteConditionWithWildcard(wildcard, trueVal, falseVal, invalid byte) byte
- func (it Value) ToNumberString() string
- func (it Value) ToPtr() *Value
- func (it Value) ToSetUnsetValue() Value
- func (it Value) TrueFalseLowercaseName() string
- func (it Value) TrueFalseName() string
- func (it Value) TypeName() string
- func (it *Value) UnmarshalJSON(data []byte) error
- func (it Value) UnmarshallEnumToValue(jsonUnmarshallingValue []byte) (byte, error)
- func (it Value) Value() byte
- func (it Value) ValueByte() byte
- func (it Value) ValueInt() int
- func (it Value) ValueInt16() int16
- func (it Value) ValueInt32() int32
- func (it Value) ValueInt8() int8
- func (it Value) ValueString() string
- func (it Value) ValueUInt16() uint16
- func (it Value) WildcardApply(inputBool bool) bool
- func (it Value) WildcardValueApply(inputVal Value) bool
- func (it Value) YesNoLowercaseName() string
- func (it Value) YesNoMappedValue() string
- func (it Value) YesNoName() string
Constants ¶
This section is empty.
Variables ¶
var ( Yes = "yes" No = "no" )
Functions ¶
func IntegerEnumRanges ¶ added in v1.2.16
func IntegerEnumRanges() []int
func IsOutOfRange ¶
IsOutOfRange n < Uninitialized.Value() || n > Set.Value()
func RangeNamesCsv ¶ added in v1.2.9
func RangeNamesCsv() string
Types ¶
type Value ¶
type Value byte
Value
Used evaluate lazy boolean valuesNames.
Values:
- Uninitialized Value = 0
- True Value = 1
- False Value = 2
- Unset Value = 3
- Set Value = 4
- Wildcard Value = 5
func CombinedBooleans ¶ added in v1.1.6
CombinedBooleans
Any false, final result returns as False or else True
func GetSetByte ¶ added in v0.0.8
func GetSetUnset ¶ added in v0.1.0
func GetSetterByComparing ¶ added in v0.6.2
func GetSetterByComparing( trueVal, falseVal Value, expectedVal interface{}, trueRanges ...interface{}, ) Value
GetSetterByComparing
returns true value if any of ranges value matches
func NewBooleans ¶ added in v1.1.6
NewBooleans
Any false, final result returns as False or else True
func (Value) AllNameValues ¶ added in v1.2.16
func (Value) And ¶ added in v0.4.1
And
if IsWildcard() || IsUnSetOrUninitialized() then
return inputVal
else
return GetBool(v. IsTrue() && inputVal. IsTrue())
func (Value) AndBool ¶ added in v0.4.1
AndBool
if IsWildcard() || IsUnSetOrUninitialized() then
return inputVal
else
return v. IsTrue() && inputBool
func (Value) Deserialize ¶ added in v1.3.28
func (*Value) GetSetBoolOnInvalid ¶ added in v1.1.5
func (*Value) GetSetBoolOnInvalidFunc ¶ added in v1.1.5
func (Value) HasInitialized ¶
func (Value) HasInitializedAndSet ¶
func (Value) HasInitializedAndTrue ¶
func (Value) IntegerEnumRanges ¶ added in v1.2.16
func (Value) IsAccepted ¶ added in v1.1.5
func (Value) IsAnyNamesOf ¶ added in v1.2.3
func (Value) IsAnyValuesEqual ¶ added in v1.2.7
func (Value) IsBetweenInt ¶
IsBetweenInt val >= start && val <= end
func (Value) IsByteValueEqual ¶ added in v1.2.4
func (Value) IsCompareResult ¶
func (it Value) IsCompareResult(n byte, compare corecomparator.Compare) bool
IsCompareResult Here left is v, and right is `n`
func (Value) IsDefinedBoolean ¶ added in v0.9.5
func (Value) IsEqualInt ¶
func (Value) IsGreaterEqual ¶
IsGreaterEqual v.Value() >= n
func (Value) IsGreaterEqualInt ¶
IsGreaterEqualInt v.Value() >= n
func (Value) IsIndeterminate ¶ added in v1.1.9
IsIndeterminate
Returns true if Uninitialized or Wildcard
func (Value) IsInitBoolean ¶ added in v0.9.3
func (Value) IsInitBooleanWild ¶ added in v0.9.3
func (Value) IsInitSetWild ¶ added in v0.9.3
func (Value) IsInitialized ¶ added in v1.1.5
func (Value) IsLessEqualInt ¶
IsLessEqualInt v.Value() <= n
func (Value) IsNameEqual ¶ added in v1.1.9
func (Value) IsNegative ¶
IsNegative v == Uninitialized || v == Unset || v == False
func (Value) IsOffLogically ¶ added in v1.1.5
func (Value) IsOnLogically ¶ added in v1.1.5
func (Value) IsRejected ¶ added in v1.1.5
func (Value) IsTrueOrSet ¶ added in v0.8.1
func (Value) IsUnSetOrUninitialized ¶
IsUnSetOrUninitialized v == Uninitialized || v == Unset
func (Value) IsUndefinedLogically ¶ added in v1.1.5
IsUndefinedLogically
Either Uninitialized, Wildcard
func (Value) IsUninitialized ¶
IsUninitialized v == Uninitialized
func (Value) IsValueEqual ¶ added in v1.2.4
func (Value) IsWildcard ¶ added in v0.4.1
func (Value) IsWildcardOrBool ¶ added in v0.6.2
IsWildcardOrBool
if v.IsWildcard() then returns true regardless
or else
returns (isBool && v.IsTrue()) || (!isBool && v.IsFalse())
func (*Value) LazyEvaluateBool ¶ added in v1.1.6
LazyEvaluateBool
Only execute evaluatorFunc if Uninitialized and then set True to self and returns t/f based on called or not
func (*Value) LazyEvaluateSet ¶ added in v1.1.6
LazyEvaluateSet
Only execute evaluatorFunc if Uninitialized and then set True to self and returns t/f based on called or not
func (Value) MarshalJSON ¶ added in v0.6.8
func (Value) MaxValueString ¶ added in v1.2.15
func (Value) MinValueString ¶ added in v1.2.15
func (Value) OnOffLowercaseName ¶ added in v1.1.8
func (Value) OnlySupportedErr ¶ added in v1.2.16
func (Value) OnlySupportedMsgErr ¶ added in v1.2.16
func (Value) OrBool ¶ added in v0.4.1
OrBool
if IsWildcard() || IsUnSetOrUninitialized() then
return inputBool
else
return v. IsTrue() || inputBool
func (Value) OrValue ¶ added in v0.4.1
OrValue
if IsWildcard() || IsUnSetOrUninitialized() then
return inputVal
else
return v. IsTrue() || inputVal. IsTrue()
func (Value) PanicOnOutOfRange ¶
func (Value) RangeNamesCsv ¶ added in v1.2.4
func (Value) RangesByte ¶ added in v1.2.7
func (Value) RangesDynamicMap ¶ added in v1.2.15
func (Value) SetUnsetLowercaseName ¶ added in v1.1.5
func (Value) StringValue ¶
func (Value) ToBooleanValue ¶ added in v1.1.6
func (Value) ToByteCondition ¶ added in v0.6.2
func (Value) ToByteConditionWithWildcard ¶ added in v0.6.2
func (Value) ToNumberString ¶ added in v1.1.9
func (Value) ToSetUnsetValue ¶ added in v1.1.6
func (Value) TrueFalseLowercaseName ¶ added in v1.1.5
func (Value) TrueFalseName ¶ added in v1.1.5
func (*Value) UnmarshalJSON ¶ added in v0.6.8
func (Value) UnmarshallEnumToValue ¶ added in v1.2.7
func (Value) ValueInt16 ¶ added in v1.1.9
func (Value) ValueInt32 ¶ added in v1.1.9
func (Value) ValueString ¶ added in v1.1.9
func (Value) ValueUInt16 ¶ added in v1.2.16
func (Value) WildcardApply ¶ added in v0.4.1
WildcardApply
if IsWildcard() || IsUnSetOrUninitialized() then
return inputVal
else
return v. IsTrue()
func (Value) WildcardValueApply ¶ added in v0.4.1
WildcardValueApply
if IsWildcard() || IsUnSetOrUninitialized() then
return inputVal
else
return v. IsTrue()
func (Value) YesNoLowercaseName ¶ added in v1.1.5
func (Value) YesNoMappedValue ¶ added in v0.8.1
Source Files ¶
- CombinedBooleans.go
- GetBool.go
- GetSet.go
- GetSetByte.go
- GetSetUnset.go
- GetSetterByComparing.go
- IntegerEnumRanges.go
- IsCompareResult.go
- IsOutOfRange.go
- Max.go
- MaxByte.go
- Min.go
- MinByte.go
- New.go
- NewBool.go
- NewBooleans.go
- NewMust.go
- RangesNamesCsv.go
- Value.go
- consts.go
- generateDynamicRangesMap.go
- jsonBytes.go
- toHashset.go
- vars.go