enumimpl

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 17 Imported by: 80

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	New                      = newCreator{}
	DefaultDiffCheckerImpl   = &differCheckerImpl{}
	LeftRightDiffCheckerImpl = &leftRightDiffCheckerImpl{}
)

Functions

func AllNameValues

func AllNameValues(nameStrings []string, anyEnumVal interface{}) []string

func ConvEnumAnyValToInteger

func ConvEnumAnyValToInteger(val interface{}) int

func Format

func Format(
	typeName,
	enumName,
	valueString string,
	format string,
) string

Format

Outputs name and
value by given format.

sample-format :

  • "Enum of {type-name} - {name} - {value}"

sample-format-output :

  • "Enum of EnumFullName - Invalid - 0"

Key-Meaning :

  • {type-name} : represents type-name string
  • {name} : represents name string
  • {value} : represents value string

func FormatUsingFmt

func FormatUsingFmt(
	fmt formatter,
	format string,
) string

FormatUsingFmt

Outputs name and
value by given format.

sample-format :

  • "Enum of {type-name} - {name} - {value}"

sample-format-output :

  • "Enum of EnumFullName - Invalid - 0"

Key-Meaning :

  • {type-name} : represents type-name string
  • {name} : represents name string
  • {value} : represents value string

func IntegersRangesOfAnyVal

func IntegersRangesOfAnyVal(anyValue interface{}) []int

func JoinPrependUsingDot

func JoinPrependUsingDot(
	prepend interface{},
	anyItems ...interface{},
) string

func NameWithValue

func NameWithValue(
	value interface{},
) string

func OnlySupportedErr

func OnlySupportedErr(
	allNames []string,
	supportedNames ...string,
) error

func PrependJoin

func PrependJoin(
	joiner string,
	prepend interface{},
	anyItems ...interface{},
) string

func UnsupportedNames

func UnsupportedNames(
	allNames []string,
	supportedNames ...string,
) []string

Types

type BasicByte

type BasicByte struct {
	// contains filtered or unexported fields
}

func (BasicByte) AllNameValues

func (it BasicByte) AllNameValues() []string

func (BasicByte) AppendPrependJoinNamer

func (it BasicByte) AppendPrependJoinNamer(
	joiner string,
	appendVal, prependVal toNamer,
) string

func (BasicByte) AppendPrependJoinValue

func (it BasicByte) AppendPrependJoinValue(
	joiner string,
	appendVal, prependVal byte,
) string

func (BasicByte) AsBasicByter

func (it BasicByte) AsBasicByter() BasicByter

func (BasicByte) Count

func (it BasicByte) Count() int

func (*BasicByte) DynamicMap

func (it *BasicByte) DynamicMap() DynamicMap

func (BasicByte) EnumType

func (it BasicByte) EnumType() enumtype.Variant

func (BasicByte) ExpectingEnumValueError

func (it BasicByte) ExpectingEnumValueError(
	rawString string,
	expectedEnum interface{},
) error

func (BasicByte) Format

func (it BasicByte) Format(
	format string,
	value interface{},
) string

Format

Outputs name and
value by given format.

sample-format :

  • "Enum of {type-name} - {name} - {value}"

sample-format-output :

  • "Enum of EnumFullName - Invalid - 0"

Key-Meaning :

  • {type-name} : represents type-name string
  • {name} : represents name string
  • {value} : represents value string

func (BasicByte) GetStringValue

func (it BasicByte) GetStringValue(
	input byte,
) string

func (BasicByte) GetValueByName

func (it BasicByte) GetValueByName(
	name string,
) (byte, error)

func (BasicByte) GetValueByString

func (it BasicByte) GetValueByString(
	jsonValueString string,
) byte

func (BasicByte) Hashmap

func (it BasicByte) Hashmap() map[string]byte

func (BasicByte) HashmapPtr

func (it BasicByte) HashmapPtr() *map[string]byte

func (*BasicByte) IntegerEnumRanges

func (it *BasicByte) IntegerEnumRanges() []int

func (BasicByte) IsAnyNamesOf

func (it BasicByte) IsAnyNamesOf(
	value byte,
	names ...string,
) bool

func (BasicByte) IsAnyOf

func (it BasicByte) IsAnyOf(
	value byte,
	givenBytes ...byte,
) bool

func (BasicByte) IsValidRange

func (it BasicByte) IsValidRange(
	value byte,
) bool

func (BasicByte) JsonMap

func (it BasicByte) JsonMap() map[string]byte

func (BasicByte) JsonString

func (it BasicByte) JsonString(input interface{}) string

func (*BasicByte) KeyAnyValues

func (it *BasicByte) KeyAnyValues() []KeyAnyVal

func (BasicByte) KeyValIntegers

func (it BasicByte) KeyValIntegers() []KeyValInteger

func (BasicByte) Length

func (it BasicByte) Length() int

func (BasicByte) Loop

func (it BasicByte) Loop(looperFunc LooperFunc)

func (BasicByte) LoopInteger

func (it BasicByte) LoopInteger(looperFunc LooperIntegerFunc)

func (BasicByte) Max

func (it BasicByte) Max() byte

func (BasicByte) MaxInt

func (it BasicByte) MaxInt() int

func (*BasicByte) MaxValueString

func (it *BasicByte) MaxValueString() string

func (BasicByte) Min

func (it BasicByte) Min() byte

func (BasicByte) MinInt

func (it BasicByte) MinInt() int

func (BasicByte) MinMaxAny

func (it BasicByte) MinMaxAny() (min, max interface{})

func (*BasicByte) MinValueString

func (it *BasicByte) MinValueString() string

func (BasicByte) NameWithValue

func (it BasicByte) NameWithValue(
	value interface{},
) string

NameWithValue

Warning :

Make sure non ptr is called + String should also be attached with non ptr.

func (BasicByte) NameWithValueOption

func (it BasicByte) NameWithValueOption(
	value interface{},
	isIncludeQuotation bool,
) string

NameWithValueOption

Warning :

Make sure non ptr is called + String should also be attached with non ptr.

func (BasicByte) NamesHashset

func (it BasicByte) NamesHashset() map[string]bool

func (BasicByte) OnlySupportedErr

func (it BasicByte) OnlySupportedErr(supportedNames ...string) error

func (BasicByte) OnlySupportedMsgErr

func (it BasicByte) OnlySupportedMsgErr(errMessage string, supportedNames ...string) error

func (*BasicByte) RangeNamesCsv

func (it *BasicByte) RangeNamesCsv() string

func (BasicByte) Ranges

func (it BasicByte) Ranges() []byte

func (*BasicByte) RangesDynamicMap

func (it *BasicByte) RangesDynamicMap() map[string]interface{}

func (*BasicByte) RangesIntegerStringMap

func (it *BasicByte) RangesIntegerStringMap() map[int]string

func (*BasicByte) RangesInvalidErr

func (it *BasicByte) RangesInvalidErr() error

func (*BasicByte) RangesInvalidMessage

func (it *BasicByte) RangesInvalidMessage() string

func (BasicByte) RangesMap

func (it BasicByte) RangesMap() map[int]string

func (BasicByte) StringRanges

func (it BasicByte) StringRanges() []string

func (BasicByte) StringRangesPtr

func (it BasicByte) StringRangesPtr() *[]string

func (BasicByte) ToEnumJsonBytes

func (it BasicByte) ToEnumJsonBytes(
	value byte,
) ([]byte, error)

ToEnumJsonBytes used for MarshalJSON from map

func (BasicByte) ToEnumString

func (it BasicByte) ToEnumString(
	value byte,
) string

func (BasicByte) ToName

func (it BasicByte) ToName(
	input interface{},
) string

func (BasicByte) ToNumberString

func (it BasicByte) ToNumberString(
	valueInNumberFormat interface{},
) string

func (BasicByte) TypeName

func (it BasicByte) TypeName() string

func (BasicByte) UnmarshallToValue

func (it BasicByte) UnmarshallToValue(
	isMappedToFirstIfEmpty bool,
	jsonUnmarshallingValue []byte,
) (byte, error)

UnmarshallToValue Mostly used for UnmarshalJSON

Given bytes string enum value and transpile to exact enum raw value using map

func (BasicByte) ValueString

func (it BasicByte) ValueString(
	value interface{},
) string

type BasicByter

type BasicByter interface {
	IsAnyOf(
		value byte,
		givenBytes ...byte,
	) bool
	Max() byte
	Min() byte
	GetValueByString(
		jsonValueString string,
	) byte
	GetValueByName(
		name string,
	) (byte, error)
	GetStringValue(
		input byte,
	) string
	Ranges() []byte
	Hashmap() map[string]byte
	HashmapPtr() *map[string]byte
	IsValidRange(
		value byte,
	) bool
	ToEnumJsonBytes(
		value byte,
	) ([]byte, error)
	ToEnumString(
		value byte,
	) string
	AppendPrependJoinValue(
		joiner string,
		appendVal, prependVal byte,
	) string
	AppendPrependJoinNamer(
		joiner string,
		appendVal, prependVal toNamer,
	) string
	ToNumberString(
		valueInRawFormat interface{},
	) string
	// UnmarshallToValue
	//
	//  isMappedToFirstIfEmpty: maps invalid values to first item
	UnmarshallToValue(
		isMappedToFirstIfEmpty bool,
		jsonUnmarshallingValue []byte,
	) (byte, error)
}

type BasicInt16

type BasicInt16 struct {
	// contains filtered or unexported fields
}

func (BasicInt16) AllNameValues

func (it BasicInt16) AllNameValues() []string

func (BasicInt16) AppendPrependJoinNamer

func (it BasicInt16) AppendPrependJoinNamer(
	joiner string,
	appendVal, prependVal coreinterface.ToNamer,
) string

func (BasicInt16) AppendPrependJoinValue

func (it BasicInt16) AppendPrependJoinValue(
	joiner string,
	appendVal, prependVal int16,
) string

func (BasicInt16) Count

func (it BasicInt16) Count() int

func (*BasicInt16) DynamicMap

func (it *BasicInt16) DynamicMap() DynamicMap

func (BasicInt16) EnumType

func (it BasicInt16) EnumType() enumtype.Variant

func (BasicInt16) ExpectingEnumValueError

func (it BasicInt16) ExpectingEnumValueError(
	rawString string,
	expectedEnum interface{},
) error

func (BasicInt16) Format

func (it BasicInt16) Format(
	format string,
	value interface{},
) string

Format

Outputs name and
value by given format.

sample-format :

  • "Enum of {type-name} - {name} - {value}"

sample-format-output :

  • "Enum of EnumFullName - Invalid - 0"

Key-Meaning :

  • {type-name} : represents type-name string
  • {name} : represents name string
  • {value} : represents value string

func (BasicInt16) GetStringValue

func (it BasicInt16) GetStringValue(input int16) string

func (BasicInt16) GetValueByName

func (it BasicInt16) GetValueByName(
	name string,
) (int16, error)

func (BasicInt16) GetValueByString

func (it BasicInt16) GetValueByString(valueString string) int16

func (BasicInt16) Hashmap

func (it BasicInt16) Hashmap() map[string]int16

func (BasicInt16) HashmapPtr

func (it BasicInt16) HashmapPtr() *map[string]int16

func (*BasicInt16) IntegerEnumRanges

func (it *BasicInt16) IntegerEnumRanges() []int

func (BasicInt16) IsAnyNamesOf

func (it BasicInt16) IsAnyNamesOf(
	value int16,
	names ...string,
) bool

func (BasicInt16) IsAnyOf

func (it BasicInt16) IsAnyOf(value int16, checkingItems ...int16) bool

func (BasicInt16) IsValidRange

func (it BasicInt16) IsValidRange(value int16) bool

func (BasicInt16) JsonString

func (it BasicInt16) JsonString(input interface{}) string

func (*BasicInt16) KeyAnyValues

func (it *BasicInt16) KeyAnyValues() []KeyAnyVal

func (BasicInt16) KeyValIntegers

func (it BasicInt16) KeyValIntegers() []KeyValInteger

func (BasicInt16) Length

func (it BasicInt16) Length() int

func (BasicInt16) Loop

func (it BasicInt16) Loop(looperFunc LooperFunc)

func (BasicInt16) LoopInteger

func (it BasicInt16) LoopInteger(looperFunc LooperIntegerFunc)

func (BasicInt16) Max

func (it BasicInt16) Max() int16

func (BasicInt16) MaxInt

func (it BasicInt16) MaxInt() int

func (*BasicInt16) MaxValueString

func (it *BasicInt16) MaxValueString() string

func (BasicInt16) Min

func (it BasicInt16) Min() int16

func (BasicInt16) MinInt

func (it BasicInt16) MinInt() int

func (BasicInt16) MinMaxAny

func (it BasicInt16) MinMaxAny() (min, max interface{})

func (*BasicInt16) MinValueString

func (it *BasicInt16) MinValueString() string

func (BasicInt16) NameWithValue

func (it BasicInt16) NameWithValue(
	value interface{},
) string

NameWithValue

Warning :

Make sure non ptr is called + String should also be attached with non ptr.

func (BasicInt16) NameWithValueOption

func (it BasicInt16) NameWithValueOption(
	value interface{},
	isIncludeQuotation bool,
) string

NameWithValueOption

Warning :

Make sure non ptr is called + String should also be attached with non ptr.

func (BasicInt16) NamesHashset

func (it BasicInt16) NamesHashset() map[string]bool

func (BasicInt16) OnlySupportedErr

func (it BasicInt16) OnlySupportedErr(supportedNames ...string) error

func (BasicInt16) OnlySupportedMsgErr

func (it BasicInt16) OnlySupportedMsgErr(errMessage string, supportedNames ...string) error

func (*BasicInt16) RangeNamesCsv

func (it *BasicInt16) RangeNamesCsv() string

func (BasicInt16) Ranges

func (it BasicInt16) Ranges() []int16

func (*BasicInt16) RangesDynamicMap

func (it *BasicInt16) RangesDynamicMap() map[string]interface{}

func (*BasicInt16) RangesIntegerStringMap

func (it *BasicInt16) RangesIntegerStringMap() map[int]string

func (*BasicInt16) RangesInvalidErr

func (it *BasicInt16) RangesInvalidErr() error

func (*BasicInt16) RangesInvalidMessage

func (it *BasicInt16) RangesInvalidMessage() string

func (BasicInt16) RangesMap

func (it BasicInt16) RangesMap() map[int]string

func (BasicInt16) StringRanges

func (it BasicInt16) StringRanges() []string

func (BasicInt16) StringRangesPtr

func (it BasicInt16) StringRangesPtr() *[]string

func (BasicInt16) ToEnumJsonBytes

func (it BasicInt16) ToEnumJsonBytes(value int16) ([]byte, error)

ToEnumJsonBytes used for MarshalJSON from map

func (BasicInt16) ToEnumString

func (it BasicInt16) ToEnumString(value int16) string

func (BasicInt16) ToName

func (it BasicInt16) ToName(
	input interface{},
) string

func (BasicInt16) ToNumberString

func (it BasicInt16) ToNumberString(valueInRawFormat interface{}) string

func (BasicInt16) TypeName

func (it BasicInt16) TypeName() string

func (BasicInt16) UnmarshallToValue

func (it BasicInt16) UnmarshallToValue(
	isMappedToFirstIfEmpty bool,
	jsonUnmarshallingValue []byte,
) (int16, error)

UnmarshallToValue Mostly used for UnmarshalJSON

Given bytes string enum value and transpile to exact enum raw value using map

func (BasicInt16) ValueString

func (it BasicInt16) ValueString(
	value interface{},
) string

type BasicInt32

type BasicInt32 struct {
	// contains filtered or unexported fields
}

func (BasicInt32) AllNameValues

func (it BasicInt32) AllNameValues() []string

func (BasicInt32) AppendPrependJoinNamer

func (it BasicInt32) AppendPrependJoinNamer(
	joiner string,
	appendVal, prependVal coreinterface.ToNamer,
) string

func (BasicInt32) AppendPrependJoinValue

func (it BasicInt32) AppendPrependJoinValue(
	joiner string,
	appendVal, prependVal int32,
) string

func (BasicInt32) Count

func (it BasicInt32) Count() int

func (*BasicInt32) DynamicMap

func (it *BasicInt32) DynamicMap() DynamicMap

func (BasicInt32) EnumType

func (it BasicInt32) EnumType() enumtype.Variant

func (BasicInt32) ExpectingEnumValueError

func (it BasicInt32) ExpectingEnumValueError(
	rawString string,
	expectedEnum interface{},
) error

func (BasicInt32) Format

func (it BasicInt32) Format(
	format string,
	value interface{},
) string

Format

Outputs name and
value by given format.

sample-format :

  • "Enum of {type-name} - {name} - {value}"

sample-format-output :

  • "Enum of EnumFullName - Invalid - 0"

Key-Meaning :

  • {type-name} : represents type-name string
  • {name} : represents name string
  • {value} : represents value string

func (BasicInt32) GetStringValue

func (it BasicInt32) GetStringValue(input int32) string

func (BasicInt32) GetValueByName

func (it BasicInt32) GetValueByName(name string) (int32, error)

func (BasicInt32) GetValueByString

func (it BasicInt32) GetValueByString(valueString string) int32

func (BasicInt32) Hashmap

func (it BasicInt32) Hashmap() map[string]int32

func (BasicInt32) HashmapPtr

func (it BasicInt32) HashmapPtr() *map[string]int32

func (*BasicInt32) IntegerEnumRanges

func (it *BasicInt32) IntegerEnumRanges() []int

func (BasicInt32) IsAnyNamesOf

func (it BasicInt32) IsAnyNamesOf(
	value int32,
	names ...string,
) bool

func (BasicInt32) IsAnyOf

func (it BasicInt32) IsAnyOf(value int32, checkingItems ...int32) bool

func (BasicInt32) IsValidRange

func (it BasicInt32) IsValidRange(value int32) bool

func (BasicInt32) JsonString

func (it BasicInt32) JsonString(input interface{}) string

func (*BasicInt32) KeyAnyValues

func (it *BasicInt32) KeyAnyValues() []KeyAnyVal

func (BasicInt32) KeyValIntegers

func (it BasicInt32) KeyValIntegers() []KeyValInteger

func (BasicInt32) Length

func (it BasicInt32) Length() int

func (BasicInt32) Loop

func (it BasicInt32) Loop(looperFunc LooperFunc)

func (BasicInt32) LoopInteger

func (it BasicInt32) LoopInteger(looperFunc LooperIntegerFunc)

func (BasicInt32) Max

func (it BasicInt32) Max() int32

func (BasicInt32) MaxInt

func (it BasicInt32) MaxInt() int

func (*BasicInt32) MaxValueString

func (it *BasicInt32) MaxValueString() string

func (BasicInt32) Min

func (it BasicInt32) Min() int32

func (BasicInt32) MinInt

func (it BasicInt32) MinInt() int

func (BasicInt32) MinMaxAny

func (it BasicInt32) MinMaxAny() (min, max interface{})

func (*BasicInt32) MinValueString

func (it *BasicInt32) MinValueString() string

func (BasicInt32) NameWithValue

func (it BasicInt32) NameWithValue(
	value interface{},
) string

NameWithValue

Warning :

Make sure non ptr is called + String should also be attached with non ptr.

func (BasicInt32) NameWithValueOption

func (it BasicInt32) NameWithValueOption(
	value interface{},
	isIncludeQuotation bool,
) string

NameWithValueOption

Warning :

Make sure non ptr is called + String should also be attached with non ptr.

func (BasicInt32) NamesHashset

func (it BasicInt32) NamesHashset() map[string]bool

func (BasicInt32) OnlySupportedErr

func (it BasicInt32) OnlySupportedErr(supportedNames ...string) error

func (BasicInt32) OnlySupportedMsgErr

func (it BasicInt32) OnlySupportedMsgErr(errMessage string, supportedNames ...string) error

func (*BasicInt32) RangeNamesCsv

func (it *BasicInt32) RangeNamesCsv() string

func (BasicInt32) Ranges

func (it BasicInt32) Ranges() []int32

func (*BasicInt32) RangesDynamicMap

func (it *BasicInt32) RangesDynamicMap() map[string]interface{}

func (*BasicInt32) RangesIntegerStringMap

func (it *BasicInt32) RangesIntegerStringMap() map[int]string

func (*BasicInt32) RangesInvalidErr

func (it *BasicInt32) RangesInvalidErr() error

func (*BasicInt32) RangesInvalidMessage

func (it *BasicInt32) RangesInvalidMessage() string

func (BasicInt32) RangesMap

func (it BasicInt32) RangesMap() map[int]string

func (BasicInt32) StringRanges

func (it BasicInt32) StringRanges() []string

func (BasicInt32) StringRangesPtr

func (it BasicInt32) StringRangesPtr() *[]string

func (BasicInt32) ToEnumJsonBytes

func (it BasicInt32) ToEnumJsonBytes(value int32) ([]byte, error)

ToEnumJsonBytes used for MarshalJSON from map

func (BasicInt32) ToEnumString

func (it BasicInt32) ToEnumString(value int32) string

func (BasicInt32) ToName

func (it BasicInt32) ToName(
	input interface{},
) string

func (BasicInt32) ToNumberString

func (it BasicInt32) ToNumberString(valueInRawFormat interface{}) string

func (BasicInt32) TypeName

func (it BasicInt32) TypeName() string

func (BasicInt32) UnmarshallToValue

func (it BasicInt32) UnmarshallToValue(
	isMappedToFirstIfEmpty bool,
	jsonUnmarshallingValue []byte,
) (int32, error)

UnmarshallToValue Mostly used for UnmarshalJSON

Given bytes string enum value and transpile to exact enum raw value using map

func (BasicInt32) ValueString

func (it BasicInt32) ValueString(
	value interface{},
) string

type BasicInt8

type BasicInt8 struct {
	// contains filtered or unexported fields
}

func (BasicInt8) AllNameValues

func (it BasicInt8) AllNameValues() []string

func (BasicInt8) AppendPrependJoinNamer

func (it BasicInt8) AppendPrependJoinNamer(
	joiner string,
	appendVal, prependVal coreinterface.ToNamer,
) string

func (BasicInt8) AppendPrependJoinValue

func (it BasicInt8) AppendPrependJoinValue(
	joiner string,
	appendVal, prependVal int8,
) string

func (BasicInt8) Count

func (it BasicInt8) Count() int

func (*BasicInt8) DynamicMap

func (it *BasicInt8) DynamicMap() DynamicMap

func (BasicInt8) EnumType

func (it BasicInt8) EnumType() enumtype.Variant

func (BasicInt8) ExpectingEnumValueError

func (it BasicInt8) ExpectingEnumValueError(
	rawString string,
	expectedEnum interface{},
) error

func (BasicInt8) Format

func (it BasicInt8) Format(
	format string,
	value interface{},
) string

Format

Outputs name and
value by given format.

sample-format :

  • "Enum of {type-name} - {name} - {value}"

sample-format-output :

  • "Enum of EnumFullName - Invalid - 0"

Key-Meaning :

  • {type-name} : represents type-name string
  • {name} : represents name string
  • {value} : represents value string

func (BasicInt8) GetStringValue

func (it BasicInt8) GetStringValue(input int8) string

func (BasicInt8) GetValueByName

func (it BasicInt8) GetValueByName(name string) (int8, error)

func (BasicInt8) GetValueByString

func (it BasicInt8) GetValueByString(valueString string) int8

func (BasicInt8) Hashmap

func (it BasicInt8) Hashmap() map[string]int8

func (BasicInt8) HashmapPtr

func (it BasicInt8) HashmapPtr() *map[string]int8

func (*BasicInt8) IntegerEnumRanges

func (it *BasicInt8) IntegerEnumRanges() []int

func (BasicInt8) IsAnyNamesOf

func (it BasicInt8) IsAnyNamesOf(
	value int8,
	names ...string,
) bool

func (BasicInt8) IsAnyOf

func (it BasicInt8) IsAnyOf(
	value int8,
	checkingItems ...int8,
) bool

func (BasicInt8) IsValidRange

func (it BasicInt8) IsValidRange(value int8) bool

func (BasicInt8) JsonString

func (it BasicInt8) JsonString(input interface{}) string

func (*BasicInt8) KeyAnyValues

func (it *BasicInt8) KeyAnyValues() []KeyAnyVal

func (BasicInt8) KeyValIntegers

func (it BasicInt8) KeyValIntegers() []KeyValInteger

func (BasicInt8) Length

func (it BasicInt8) Length() int

func (BasicInt8) Loop

func (it BasicInt8) Loop(looperFunc LooperFunc)

func (BasicInt8) LoopInteger

func (it BasicInt8) LoopInteger(looperFunc LooperIntegerFunc)

func (BasicInt8) Max

func (it BasicInt8) Max() int8

func (BasicInt8) MaxInt

func (it BasicInt8) MaxInt() int

func (*BasicInt8) MaxValueString

func (it *BasicInt8) MaxValueString() string

func (BasicInt8) Min

func (it BasicInt8) Min() int8

func (BasicInt8) MinInt

func (it BasicInt8) MinInt() int

func (BasicInt8) MinMaxAny

func (it BasicInt8) MinMaxAny() (min, max interface{})

func (*BasicInt8) MinValueString

func (it *BasicInt8) MinValueString() string

func (BasicInt8) NameWithValue

func (it BasicInt8) NameWithValue(
	value interface{},
) string

NameWithValue

Warning :

Make sure non ptr is called + String should also be attached with non ptr.

func (BasicInt8) NameWithValueOption

func (it BasicInt8) NameWithValueOption(
	value interface{},
	isIncludeQuotation bool,
) string

NameWithValueOption

Warning :

Make sure non ptr is called + String should also be attached with non ptr.

func (BasicInt8) NamesHashset

func (it BasicInt8) NamesHashset() map[string]bool

func (BasicInt8) OnlySupportedErr

func (it BasicInt8) OnlySupportedErr(supportedNames ...string) error

func (BasicInt8) OnlySupportedMsgErr

func (it BasicInt8) OnlySupportedMsgErr(errMessage string, supportedNames ...string) error

func (*BasicInt8) RangeNamesCsv

func (it *BasicInt8) RangeNamesCsv() string

func (BasicInt8) Ranges

func (it BasicInt8) Ranges() []int8

func (*BasicInt8) RangesDynamicMap

func (it *BasicInt8) RangesDynamicMap() map[string]interface{}

func (*BasicInt8) RangesIntegerStringMap

func (it *BasicInt8) RangesIntegerStringMap() map[int]string

func (*BasicInt8) RangesInvalidErr

func (it *BasicInt8) RangesInvalidErr() error

func (*BasicInt8) RangesInvalidMessage

func (it *BasicInt8) RangesInvalidMessage() string

func (BasicInt8) RangesMap

func (it BasicInt8) RangesMap() map[int]string

func (BasicInt8) StringRanges

func (it BasicInt8) StringRanges() []string

func (BasicInt8) StringRangesPtr

func (it BasicInt8) StringRangesPtr() *[]string

func (BasicInt8) ToEnumJsonBytes

func (it BasicInt8) ToEnumJsonBytes(value int8) ([]byte, error)

ToEnumJsonBytes

used for MarshalJSON from map

func (BasicInt8) ToEnumString

func (it BasicInt8) ToEnumString(value int8) string

func (BasicInt8) ToName

func (it BasicInt8) ToName(
	input interface{},
) string

func (BasicInt8) ToNumberString

func (it BasicInt8) ToNumberString(valueInRawFormat interface{}) string

func (BasicInt8) TypeName

func (it BasicInt8) TypeName() string

func (BasicInt8) UnmarshallToValue

func (it BasicInt8) UnmarshallToValue(
	isMappedToFirstIfEmpty bool,
	jsonUnmarshallingValue []byte,
) (int8, error)

UnmarshallToValue Mostly used for UnmarshalJSON

Given bytes string enum value and transpile to exact enum raw value using map

func (BasicInt8) ValueString

func (it BasicInt8) ValueString(
	value interface{},
) string

type BasicString

type BasicString struct {
	// contains filtered or unexported fields
}

func (BasicString) AllNameValues

func (it BasicString) AllNameValues() []string

func (BasicString) AppendPrependJoinNamer

func (it BasicString) AppendPrependJoinNamer(
	joiner string,
	appendVal, prependVal coreinterface.ToNamer,
) string

func (BasicString) AppendPrependJoinValue

func (it BasicString) AppendPrependJoinValue(
	joiner string,
	appendVal, prependVal string,
) string

func (BasicString) Count

func (it BasicString) Count() int

func (*BasicString) DynamicMap

func (it *BasicString) DynamicMap() DynamicMap

func (BasicString) EnumType

func (it BasicString) EnumType() enumtype.Variant

func (BasicString) Format

func (it BasicString) Format(
	format string,
	value interface{},
) string

Format

Outputs name and
value by given format.

sample-format :

  • "Enum of {type-name} - {name} - {value}"

sample-format-output :

  • "Enum of EnumFullName - Invalid - 0"

Key-Meaning :

  • {type-name} : represents type-name string
  • {name} : represents name string
  • {value} : represents value string

func (BasicString) GetIndexByName

func (it BasicString) GetIndexByName(name string) int

GetIndexByName

constants.InvalidValue refers to the invalid index

func (BasicString) GetNameByIndex

func (it BasicString) GetNameByIndex(index int) string

func (BasicString) GetValueByName

func (it BasicString) GetValueByName(name string) (string, error)

func (BasicString) HasAnyItem

func (it BasicString) HasAnyItem() bool

func (BasicString) Hashset

func (it BasicString) Hashset() map[string]bool

func (BasicString) HashsetPtr

func (it BasicString) HashsetPtr() *map[string]bool

func (*BasicString) IntegerEnumRanges

func (it *BasicString) IntegerEnumRanges() []int

func (BasicString) IsAnyNamesOf

func (it BasicString) IsAnyNamesOf(
	valueName string,
	names ...string,
) bool

func (BasicString) IsAnyOf

func (it BasicString) IsAnyOf(value string, checkingItems ...string) bool

func (BasicString) IsValidRange

func (it BasicString) IsValidRange(value string) bool

func (BasicString) JsonString

func (it BasicString) JsonString(input interface{}) string

func (*BasicString) KeyAnyValues

func (it *BasicString) KeyAnyValues() []KeyAnyVal

func (BasicString) KeyValIntegers

func (it BasicString) KeyValIntegers() []KeyValInteger

func (BasicString) Length

func (it BasicString) Length() int

func (BasicString) Loop

func (it BasicString) Loop(looperFunc LooperFunc)

func (BasicString) LoopInteger

func (it BasicString) LoopInteger(looperFunc LooperIntegerFunc)

func (BasicString) Max

func (it BasicString) Max() string

func (BasicString) MaxIndex

func (it BasicString) MaxIndex() int

func (BasicString) MaxInt

func (it BasicString) MaxInt() int

func (*BasicString) MaxValueString

func (it *BasicString) MaxValueString() string

func (BasicString) Min

func (it BasicString) Min() string

func (BasicString) MinInt

func (it BasicString) MinInt() int

func (BasicString) MinMaxAny

func (it BasicString) MinMaxAny() (min, max interface{})

func (*BasicString) MinValueString

func (it *BasicString) MinValueString() string

func (BasicString) NameWithIndexMap

func (it BasicString) NameWithIndexMap() map[string]int

func (BasicString) NameWithValue

func (it BasicString) NameWithValue(
	value interface{},
) string

NameWithValue

Warning :

Make sure non ptr is called + String should also be attached with non ptr.

func (BasicString) NameWithValueOption

func (it BasicString) NameWithValueOption(
	value interface{},
	isIncludeQuotation bool,
) string

NameWithValueOption

Warning :

Make sure non ptr is called + String should also be attached with non ptr.

func (BasicString) NamesHashset

func (it BasicString) NamesHashset() map[string]bool

func (BasicString) OnlySupportedErr

func (it BasicString) OnlySupportedErr(
	supportedNames ...string,
) error

func (BasicString) OnlySupportedMsgErr

func (it BasicString) OnlySupportedMsgErr(
	errMessage string,
	supportedNames ...string,
) error

func (*BasicString) RangeNamesCsv

func (it *BasicString) RangeNamesCsv() string

func (BasicString) Ranges

func (it BasicString) Ranges() []string

func (*BasicString) RangesDynamicMap

func (it *BasicString) RangesDynamicMap() map[string]interface{}

func (*BasicString) RangesIntegerStringMap

func (it *BasicString) RangesIntegerStringMap() map[int]string

func (BasicString) RangesIntegers

func (it BasicString) RangesIntegers() []int

func (*BasicString) RangesInvalidErr

func (it *BasicString) RangesInvalidErr() error

func (*BasicString) RangesInvalidMessage

func (it *BasicString) RangesInvalidMessage() string

func (BasicString) RangesMap

func (it BasicString) RangesMap() map[int]string

func (BasicString) StringRanges

func (it BasicString) StringRanges() []string

func (BasicString) StringRangesPtr

func (it BasicString) StringRangesPtr() *[]string

func (BasicString) ToEnumJsonBytes

func (it BasicString) ToEnumJsonBytes(value string) ([]byte, error)

ToEnumJsonBytes used for MarshalJSON from map

func (BasicString) ToEnumString

func (it BasicString) ToEnumString(
	input interface{},
) string

func (BasicString) ToName

func (it BasicString) ToName(
	input interface{},
) string

func (BasicString) TypeName

func (it BasicString) TypeName() string

func (BasicString) UnmarshallToValue

func (it BasicString) UnmarshallToValue(
	isMappedToFirstIfEmpty bool,
	jsonUnmarshallingValue []byte,
) (string, error)

UnmarshallToValue Mostly used for UnmarshalJSON

Given bytes string enum value and transpile to exact enum raw value using map

func (BasicString) ValueString

func (it BasicString) ValueString(
	value interface{},
) string

type BasicUInt16

type BasicUInt16 struct {
	// contains filtered or unexported fields
}

func (BasicUInt16) AllNameValues

func (it BasicUInt16) AllNameValues() []string

func (BasicUInt16) AppendPrependJoinNamer

func (it BasicUInt16) AppendPrependJoinNamer(
	joiner string,
	appendVal, prependVal coreinterface.ToNamer,
) string

func (BasicUInt16) AppendPrependJoinValue

func (it BasicUInt16) AppendPrependJoinValue(
	joiner string,
	appendVal, prependVal uint16,
) string

func (BasicUInt16) Count

func (it BasicUInt16) Count() int

func (*BasicUInt16) DynamicMap

func (it *BasicUInt16) DynamicMap() DynamicMap

func (BasicUInt16) EnumType

func (it BasicUInt16) EnumType() enumtype.Variant

func (BasicUInt16) ExpectingEnumValueError

func (it BasicUInt16) ExpectingEnumValueError(
	rawString string,
	expectedEnum interface{},
) error

func (BasicUInt16) Format

func (it BasicUInt16) Format(
	format string,
	value interface{},
) string

Format

Outputs name and
value by given format.

sample-format :

  • "Enum of {type-name} - {name} - {value}"

sample-format-output :

  • "Enum of EnumFullName - Invalid - 0"

Key-Meaning :

  • {type-name} : represents type-name string
  • {name} : represents name string
  • {value} : represents value string

func (BasicUInt16) GetStringValue

func (it BasicUInt16) GetStringValue(input uint16) string

func (BasicUInt16) GetValueByName

func (it BasicUInt16) GetValueByName(
	name string,
) (uint16, error)

func (BasicUInt16) GetValueByString

func (it BasicUInt16) GetValueByString(valueString string) uint16

func (BasicUInt16) Hashmap

func (it BasicUInt16) Hashmap() map[string]uint16

func (BasicUInt16) HashmapPtr

func (it BasicUInt16) HashmapPtr() *map[string]uint16

func (*BasicUInt16) IntegerEnumRanges

func (it *BasicUInt16) IntegerEnumRanges() []int

func (BasicUInt16) IsAnyNamesOf

func (it BasicUInt16) IsAnyNamesOf(
	value uint16,
	names ...string,
) bool

func (BasicUInt16) IsAnyOf

func (it BasicUInt16) IsAnyOf(value uint16, checkingItems ...uint16) bool

func (BasicUInt16) IsValidRange

func (it BasicUInt16) IsValidRange(value uint16) bool

func (BasicUInt16) JsonString

func (it BasicUInt16) JsonString(input interface{}) string

func (*BasicUInt16) KeyAnyValues

func (it *BasicUInt16) KeyAnyValues() []KeyAnyVal

func (BasicUInt16) KeyValIntegers

func (it BasicUInt16) KeyValIntegers() []KeyValInteger

func (BasicUInt16) Length

func (it BasicUInt16) Length() int

func (BasicUInt16) Loop

func (it BasicUInt16) Loop(looperFunc LooperFunc)

func (BasicUInt16) LoopInteger

func (it BasicUInt16) LoopInteger(looperFunc LooperIntegerFunc)

func (BasicUInt16) Max

func (it BasicUInt16) Max() uint16

func (BasicUInt16) MaxInt

func (it BasicUInt16) MaxInt() int

func (*BasicUInt16) MaxValueString

func (it *BasicUInt16) MaxValueString() string

func (BasicUInt16) Min

func (it BasicUInt16) Min() uint16

func (BasicUInt16) MinInt

func (it BasicUInt16) MinInt() int

func (BasicUInt16) MinMaxAny

func (it BasicUInt16) MinMaxAny() (min, max interface{})

func (*BasicUInt16) MinValueString

func (it *BasicUInt16) MinValueString() string

func (BasicUInt16) NameWithValue

func (it BasicUInt16) NameWithValue(
	value interface{},
) string

NameWithValue

Warning :

Make sure non ptr is called + String should also be attached with non ptr.

func (BasicUInt16) NameWithValueOption

func (it BasicUInt16) NameWithValueOption(
	value interface{},
	isIncludeQuotation bool,
) string

NameWithValueOption

Warning :

Make sure non ptr is called + String should also be attached with non ptr.

func (BasicUInt16) NamesHashset

func (it BasicUInt16) NamesHashset() map[string]bool

func (BasicUInt16) OnlySupportedErr

func (it BasicUInt16) OnlySupportedErr(supportedNames ...string) error

func (BasicUInt16) OnlySupportedMsgErr

func (it BasicUInt16) OnlySupportedMsgErr(errMessage string, supportedNames ...string) error

func (*BasicUInt16) RangeNamesCsv

func (it *BasicUInt16) RangeNamesCsv() string

func (BasicUInt16) Ranges

func (it BasicUInt16) Ranges() []uint16

func (*BasicUInt16) RangesDynamicMap

func (it *BasicUInt16) RangesDynamicMap() map[string]interface{}

func (*BasicUInt16) RangesIntegerStringMap

func (it *BasicUInt16) RangesIntegerStringMap() map[int]string

func (*BasicUInt16) RangesInvalidErr

func (it *BasicUInt16) RangesInvalidErr() error

func (*BasicUInt16) RangesInvalidMessage

func (it *BasicUInt16) RangesInvalidMessage() string

func (BasicUInt16) RangesMap

func (it BasicUInt16) RangesMap() map[int]string

func (BasicUInt16) StringRanges

func (it BasicUInt16) StringRanges() []string

func (BasicUInt16) StringRangesPtr

func (it BasicUInt16) StringRangesPtr() *[]string

func (BasicUInt16) ToEnumJsonBytes

func (it BasicUInt16) ToEnumJsonBytes(value uint16) ([]byte, error)

ToEnumJsonBytes used for MarshalJSON from map

func (BasicUInt16) ToEnumString

func (it BasicUInt16) ToEnumString(value uint16) string

func (BasicUInt16) ToName

func (it BasicUInt16) ToName(
	input interface{},
) string

func (BasicUInt16) ToNumberString

func (it BasicUInt16) ToNumberString(valueInRawFormat interface{}) string

func (BasicUInt16) TypeName

func (it BasicUInt16) TypeName() string

func (BasicUInt16) UnmarshallToValue

func (it BasicUInt16) UnmarshallToValue(
	isMappedToFirstIfEmpty bool,
	jsonUnmarshallingValue []byte,
) (uint16, error)

UnmarshallToValue Mostly used for UnmarshalJSON

Given bytes string enum value and transpile to exact enum raw value using map

func (BasicUInt16) ValueString

func (it BasicUInt16) ValueString(
	value interface{},
) string

type DiffLeftRight added in v1.4.4

type DiffLeftRight struct {
	Left, Right interface{}
}

func (*DiffLeftRight) DiffString added in v1.4.4

func (it *DiffLeftRight) DiffString() string

func (*DiffLeftRight) HasMismatch added in v1.4.4

func (it *DiffLeftRight) HasMismatch(isRegardless bool) bool

func (*DiffLeftRight) HasMismatchRegardlessOfType added in v1.4.4

func (it *DiffLeftRight) HasMismatchRegardlessOfType() bool

func (*DiffLeftRight) IsEqual added in v1.4.4

func (it *DiffLeftRight) IsEqual(isRegardless bool) bool

func (*DiffLeftRight) IsNotEqual added in v1.4.4

func (it *DiffLeftRight) IsNotEqual() bool

func (*DiffLeftRight) IsSame added in v1.4.4

func (it *DiffLeftRight) IsSame() bool

func (*DiffLeftRight) IsSameRegardlessOfType added in v1.4.4

func (it *DiffLeftRight) IsSameRegardlessOfType() bool

func (*DiffLeftRight) IsSameTypeSame added in v1.4.4

func (it *DiffLeftRight) IsSameTypeSame() bool

func (*DiffLeftRight) JsonString added in v1.4.4

func (it *DiffLeftRight) JsonString() string

func (*DiffLeftRight) SpecificFullString added in v1.4.4

func (it *DiffLeftRight) SpecificFullString() (l, r string)

func (*DiffLeftRight) String added in v1.4.4

func (it *DiffLeftRight) String() string

func (*DiffLeftRight) Types added in v1.4.4

func (it *DiffLeftRight) Types() (l, r reflect.Type)

type DifferChecker added in v1.4.4

type DifferChecker interface {
	GetSingleDiffResult(isLeft bool, l, r interface{}) interface{}
	GetResultOnKeyMissingInRightExistInLeft(lKey string, lVal interface{}) interface{}
	IsEqual(isRegardless bool, l, r interface{}) bool
}

type DynamicMap

type DynamicMap map[string]interface{}

func (*DynamicMap) Add

func (it *DynamicMap) Add(
	key string,
	valInf interface{},
) *DynamicMap

func (*DynamicMap) AddNewOnly

func (it *DynamicMap) AddNewOnly(key string, val interface{}) (isAdded bool)

AddNewOnly

Don't update existing

func (DynamicMap) AddOrUpdate

func (it DynamicMap) AddOrUpdate(key string, val interface{}) (isAddNewly bool)

func (DynamicMap) AllKeys

func (it DynamicMap) AllKeys() []string

func (DynamicMap) AllKeysSorted

func (it DynamicMap) AllKeysSorted() []string

func (DynamicMap) AllValuesIntegers

func (it DynamicMap) AllValuesIntegers() []int

func (DynamicMap) AllValuesStrings

func (it DynamicMap) AllValuesStrings() []string

func (DynamicMap) AllValuesStringsSorted

func (it DynamicMap) AllValuesStringsSorted() []string

func (DynamicMap) BasicByte

func (it DynamicMap) BasicByte(typeName string) *BasicByte

func (DynamicMap) BasicByteUsingAliasMap

func (it DynamicMap) BasicByteUsingAliasMap(
	typeName string,
	aliasingMap map[string]byte,
) *BasicByte

func (DynamicMap) BasicInt16

func (it DynamicMap) BasicInt16(
	typeName string,
) *BasicInt16

func (DynamicMap) BasicInt16UsingAliasMap

func (it DynamicMap) BasicInt16UsingAliasMap(
	typeName string,
	aliasingMap map[string]int16,
) *BasicInt16

func (DynamicMap) BasicInt32

func (it DynamicMap) BasicInt32(
	typeName string,
) *BasicInt32

func (DynamicMap) BasicInt32UsingAliasMap

func (it DynamicMap) BasicInt32UsingAliasMap(
	typeName string,
	aliasingMap map[string]int32,
) *BasicInt32

func (DynamicMap) BasicInt8

func (it DynamicMap) BasicInt8(typeName string) *BasicInt8

func (DynamicMap) BasicInt8UsingAliasMap

func (it DynamicMap) BasicInt8UsingAliasMap(
	typeName string,
	aliasingMap map[string]int8,
) *BasicInt8

func (DynamicMap) BasicString

func (it DynamicMap) BasicString(
	typeName string,
) *BasicString

func (DynamicMap) BasicStringUsingAliasMap

func (it DynamicMap) BasicStringUsingAliasMap(
	typeName string,
	aliasingMap map[string]string,
) *BasicString

func (DynamicMap) BasicUInt16

func (it DynamicMap) BasicUInt16(
	typeName string,
) *BasicUInt16

func (DynamicMap) BasicUInt16UsingAliasMap

func (it DynamicMap) BasicUInt16UsingAliasMap(
	typeName string,
	aliasingMap map[string]uint16,
) *BasicUInt16

func (DynamicMap) ConcatNew

func (it DynamicMap) ConcatNew(
	isOverrideExisting bool,
	another DynamicMap,
) DynamicMap

func (DynamicMap) ConvMapByteString

func (it DynamicMap) ConvMapByteString() map[byte]string

ConvMapByteString

Conv value to key and key to value.

func (DynamicMap) ConvMapInt16String

func (it DynamicMap) ConvMapInt16String() map[int16]string

ConvMapInt16String

Conv value to key and key to value.

func (DynamicMap) ConvMapInt32String

func (it DynamicMap) ConvMapInt32String() map[int32]string

ConvMapInt32String

Conv value to key and key to value.

func (DynamicMap) ConvMapInt64String

func (it DynamicMap) ConvMapInt64String() map[int64]string

ConvMapInt64String

Conv value to key and key to value.

func (DynamicMap) ConvMapInt8String

func (it DynamicMap) ConvMapInt8String() map[int8]string

ConvMapInt8String

Conv value to key and key to value.

func (DynamicMap) ConvMapIntegerString

func (it DynamicMap) ConvMapIntegerString() map[int]string

ConvMapIntegerString

Conv value to key and key to value.

func (DynamicMap) ConvMapStringInteger

func (it DynamicMap) ConvMapStringInteger() map[string]int

ConvMapStringInteger

Conv value to key and key to value.

func (DynamicMap) ConvMapStringString

func (it DynamicMap) ConvMapStringString() map[string]string

ConvMapStringString

Conv value to key and key to value.

func (DynamicMap) ConvMapUInt16String

func (it DynamicMap) ConvMapUInt16String() map[uint16]string

ConvMapUInt16String

Conv value to key and key to value.

func (DynamicMap) Count

func (it DynamicMap) Count() int

func (*DynamicMap) DiffJsonMessage

func (it *DynamicMap) DiffJsonMessage(
	isRegardlessType bool,
	rightMap map[string]interface{},
) string

func (*DynamicMap) DiffJsonMessageLeftRight added in v1.4.4

func (it *DynamicMap) DiffJsonMessageLeftRight(
	isRegardlessType bool,
	rightMap map[string]interface{},
) string

func (*DynamicMap) DiffJsonMessageLeftRightUsingDifferChecker added in v1.4.4

func (it *DynamicMap) DiffJsonMessageLeftRightUsingDifferChecker(
	differChecker DifferChecker,
	isRegardlessType bool,
	rightMap map[string]interface{},
) string

func (*DynamicMap) DiffJsonMessageUsingDifferChecker added in v1.4.4

func (it *DynamicMap) DiffJsonMessageUsingDifferChecker(
	differChecker DifferChecker,
	isRegardlessType bool,
	rightMap map[string]interface{},
) string

func (*DynamicMap) DiffRaw

func (it *DynamicMap) DiffRaw(
	isRegardlessType bool,
	rightMap map[string]interface{},
) DynamicMap

func (*DynamicMap) DiffRawLeftRightUsingDifferChecker added in v1.4.4

func (it *DynamicMap) DiffRawLeftRightUsingDifferChecker(
	differChecker DifferChecker,
	isRegardlessType bool,
	rightMap map[string]interface{},
) (lDiff, rDiff DynamicMap)

DiffRawLeftRightUsingDifferChecker

Returns

  • lDiff : contains what differs in right
  • rDiff : contains what differs in left

func (*DynamicMap) DiffRawUsingDifferChecker added in v1.4.4

func (it *DynamicMap) DiffRawUsingDifferChecker(
	differChecker DifferChecker,
	isRegardlessType bool,
	rightMap map[string]interface{},
) DynamicMap

func (*DynamicMap) ExpectingMessage

func (it *DynamicMap) ExpectingMessage(
	title string,
	expected map[string]interface{},
) string

func (DynamicMap) First

func (it DynamicMap) First() (key string, valInf interface{})

func (DynamicMap) HasAllKeys

func (it DynamicMap) HasAllKeys(keys ...string) bool

func (DynamicMap) HasAnyItem

func (it DynamicMap) HasAnyItem() bool

func (DynamicMap) HasAnyKeys

func (it DynamicMap) HasAnyKeys(keys ...string) bool

func (DynamicMap) HasIndex

func (it DynamicMap) HasIndex(index int) bool

func (DynamicMap) HasKey

func (it DynamicMap) HasKey(key string) bool

func (DynamicMap) IsEmpty

func (it DynamicMap) IsEmpty() bool

func (*DynamicMap) IsEqual

func (it *DynamicMap) IsEqual(
	isRegardlessType bool,
	rightMap *DynamicMap,
) bool

func (*DynamicMap) IsKeysEqualOnly

func (it *DynamicMap) IsKeysEqualOnly(
	rightMap map[string]interface{},
) bool

func (*DynamicMap) IsMismatch

func (it *DynamicMap) IsMismatch(
	isRegardlessType bool,
	rightMap *DynamicMap,
) bool

func (DynamicMap) IsMissingKey

func (it DynamicMap) IsMissingKey(key string) bool

func (*DynamicMap) IsRawEqual

func (it *DynamicMap) IsRawEqual(
	isRegardlessType bool,
	rightMap map[string]interface{},
) bool

func (*DynamicMap) IsRawMismatch

func (it *DynamicMap) IsRawMismatch(
	isRegardlessType bool,
	rightMap map[string]interface{},
) bool

func (DynamicMap) IsStringEqual

func (it DynamicMap) IsStringEqual(anotherMapString string) bool

func (DynamicMap) IsValueString

func (it DynamicMap) IsValueString() bool

func (DynamicMap) IsValueTypeOf

func (it DynamicMap) IsValueTypeOf(rfType reflect.Type) bool

func (DynamicMap) KeyValue

func (it DynamicMap) KeyValue(
	key string,
) (val interface{}, isFound bool)

func (DynamicMap) KeyValueByte

func (it DynamicMap) KeyValueByte(
	key string,
) (val byte, isFound, isConvFailed bool)

func (DynamicMap) KeyValueInt

func (it DynamicMap) KeyValueInt(
	key string,
) (val int, isFound, isConvFailed bool)

func (DynamicMap) KeyValueIntDefault

func (it DynamicMap) KeyValueIntDefault(
	key string,
) (val int)

func (DynamicMap) KeyValueString

func (it DynamicMap) KeyValueString(
	key string,
) (val string, isFound bool)

func (DynamicMap) LastIndex

func (it DynamicMap) LastIndex() int

func (*DynamicMap) Length

func (it *DynamicMap) Length() int

func (*DynamicMap) LogExpectingMessage

func (it *DynamicMap) LogExpectingMessage(
	title string,
	expected map[string]interface{},
)

func (*DynamicMap) LogShouldDiffLeftRightMessage added in v1.4.4

func (it *DynamicMap) LogShouldDiffLeftRightMessage(
	isRegardlessType bool,
	title string,
	rightMap map[string]interface{},
) (diffMessage string)

func (*DynamicMap) LogShouldDiffLeftRightMessageUsingDifferChecker added in v1.4.4

func (it *DynamicMap) LogShouldDiffLeftRightMessageUsingDifferChecker(
	differChecker DifferChecker,
	isRegardlessType bool,
	title string,
	rightMap map[string]interface{},
) (diffMessage string)

func (*DynamicMap) LogShouldDiffMessage

func (it *DynamicMap) LogShouldDiffMessage(
	isRegardlessType bool,
	title string,
	rightMap map[string]interface{},
) (diffMessage string)

func (*DynamicMap) LogShouldDiffMessageUsingDifferChecker added in v1.4.4

func (it *DynamicMap) LogShouldDiffMessageUsingDifferChecker(
	differChecker DifferChecker,
	isRegardlessType bool,
	title string,
	rightMap map[string]interface{},
) (diffMessage string)

func (DynamicMap) MapIntegerString

func (it DynamicMap) MapIntegerString() (
	rangeMap map[int]string,
	allKeysSorted []int,
)

func (DynamicMap) Raw

func (it DynamicMap) Raw() map[string]interface{}

func (DynamicMap) Serialize

func (it DynamicMap) Serialize() ([]byte, error)

func (*DynamicMap) Set

func (it *DynamicMap) Set(key string, val interface{}) (isAddNewly bool)

func (*DynamicMap) ShouldDiffLeftRightMessageUsingDifferChecker added in v1.4.4

func (it *DynamicMap) ShouldDiffLeftRightMessageUsingDifferChecker(
	differChecker DifferChecker,
	isRegardlessType bool,
	title string,
	rightMap map[string]interface{},
) string

func (*DynamicMap) ShouldDiffMessage

func (it *DynamicMap) ShouldDiffMessage(
	isRegardlessType bool,
	title string,
	rightMap map[string]interface{},
) string

func (*DynamicMap) ShouldDiffMessageUsingDifferChecker added in v1.4.4

func (it *DynamicMap) ShouldDiffMessageUsingDifferChecker(
	differChecker DifferChecker,
	isRegardlessType bool,
	title string,
	rightMap map[string]interface{},
) string

func (DynamicMap) SortedKeyAnyValues

func (it DynamicMap) SortedKeyAnyValues() (
	keyAnyValues []KeyAnyVal,
)

func (DynamicMap) SortedKeyValues

func (it DynamicMap) SortedKeyValues() (
	keyValues []KeyValInteger,
)

func (DynamicMap) String

func (it DynamicMap) String() string

func (DynamicMap) Strings

func (it DynamicMap) Strings() []string

func (DynamicMap) StringsUsingFmt

func (it DynamicMap) StringsUsingFmt(
	formatter func(index int, key string, val interface{}) string,
) []string

type GetOnKeyMissingResultFunc added in v1.4.4

type GetOnKeyMissingResultFunc func(lKey string, lVal interface{}) interface{}

type GetSingleDiffResultFunc added in v1.4.4

type GetSingleDiffResultFunc func(isLeft bool, l, r interface{}) interface{}

type IsEqualCheckerFunc added in v1.4.4

type IsEqualCheckerFunc func(isRegardless bool, l, r interface{}) bool

type KeyAnyVal

type KeyAnyVal struct {
	Key      string
	AnyValue interface{}
}

func KeyAnyValues

func KeyAnyValues(names []string, values interface{}) []KeyAnyVal

func (KeyAnyVal) AnyVal

func (it KeyAnyVal) AnyVal() interface{}

func (KeyAnyVal) AnyValString

func (it KeyAnyVal) AnyValString() string

func (KeyAnyVal) IsString

func (it KeyAnyVal) IsString() bool

func (KeyAnyVal) KeyString

func (it KeyAnyVal) KeyString() string

func (KeyAnyVal) KeyValInteger

func (it KeyAnyVal) KeyValInteger() KeyValInteger

func (KeyAnyVal) String

func (it KeyAnyVal) String() string

func (KeyAnyVal) ValInt

func (it KeyAnyVal) ValInt() int

func (KeyAnyVal) WrapKey

func (it KeyAnyVal) WrapKey() string

func (KeyAnyVal) WrapValue

func (it KeyAnyVal) WrapValue() string

type KeyValInteger

type KeyValInteger struct {
	Key          string
	ValueInteger int
}

func (KeyValInteger) IsString

func (it KeyValInteger) IsString() bool

func (KeyValInteger) KeyAnyVal

func (it KeyValInteger) KeyAnyVal() KeyAnyVal

func (KeyValInteger) String

func (it KeyValInteger) String() string

func (KeyValInteger) WrapKey

func (it KeyValInteger) WrapKey() string

func (KeyValInteger) WrapValue

func (it KeyValInteger) WrapValue() string

type LooperFunc

type LooperFunc func(index int, name string, anyVal interface{}) (isBreak bool)

type LooperIntegerFunc

type LooperIntegerFunc func(index int, name string, anyVal int) (isBreak bool)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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