Versions in this module Expand all Collapse all v0 v0.0.1 Feb 14, 2021 Changes in this version + const CaseContains + const CaseEq + const CaseGe + const CaseGt + const CaseInvalid + const CaseLe + const CaseLt + const CaseNe + const CaseNotContains + const ConfigBoolKeyName + const ConfigDoubleKeyName + const ConfigExistKeyName + const ConfigIntKeyName + const ConfigNotExistKeyName + const ConfigStrKeyName + const ConfigUintKeyName + const ParamNumMax + var ErrInvalidCondition = errors.New("Invalid condition") + func IntCase2Str(i int) string + func Str2IntCase(s string) int + type Condition struct + func NewBoolCondition(c int, b bool) (*Condition, error) + func NewDoubleCondition(c int, d float64) (*Condition, error) + func NewIntCondition(c int, i int) (*Condition, error) + func NewStringCondition(c int, s string) (*Condition, error) + func NewUintCondition(c int, i uint) (*Condition, error) + func (c Condition) Compare(ic Condition) bool + func (c Condition) IsMatch(v interface{}) (bool, error) + func (c Condition) String() string + type Config struct + Exists []Keys + NotExists []Keys + TypeConditions []TypeCondition + func (c Config) Validate() error + func (cnf *Config) HasExistKeys(ks *Keys) bool + func (cnf *Config) HasNotExistKeys(ks *Keys) bool + func (cnf *Config) HasTypeCondition(t *TypeCondition) bool + func (cnf *Config) SetExist(c *ConfigLine, isExist bool) error + func (cnf *Config) SetTypeCondition(c *ConfigLine, t types.BasicKind) error + type ConfigLine struct + ClCondition string + ClKey interface{} + ClValue interface{} + func NewConfigLineFromJson(s string) (*ConfigLine, error) + type Keys struct + FlattenKeys string + Keys []string + func (k Keys) Compare(ks Keys) bool + func (k Keys) GetValueFromMap(m map[interface{}]interface{}) (interface{}, bool) + func (k Keys) String() string + type TypeCondition struct + Condition Condition + Keys Keys + TypeConditionStr string + func (tc TypeCondition) String() string