enumimpl

package
v1.3.55 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2022 License: MIT Imports: 16 Imported by: 90

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	New = newCreator{}
)

Functions

func AllNameValues added in v1.2.16

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

func ConvEnumAnyValToInteger added in v1.2.16

func ConvEnumAnyValToInteger(val interface{}) int

func Format added in v1.3.1

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 added in v1.3.3

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 added in v1.2.16

func IntegersRangesOfAnyVal(anyValue interface{}) []int

func JoinPrependUsingDot added in v0.8.3

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

func NameWithValue added in v1.2.16

func NameWithValue(
	value interface{},
) string

func OnlySupportedErr added in v1.2.16

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

func PrependJoin added in v0.8.3

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

func UnsupportedNames added in v1.2.16

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

Types

type BasicByte

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

func (BasicByte) AllNameValues added in v1.2.16

func (it BasicByte) AllNameValues() []string

func (BasicByte) AppendPrependJoinNamer added in v0.8.3

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

func (BasicByte) AppendPrependJoinValue added in v0.8.3

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

func (BasicByte) AsBasicByter added in v1.1.9

func (it BasicByte) AsBasicByter() BasicByter

func (BasicByte) Count added in v1.2.15

func (it BasicByte) Count() int

func (*BasicByte) DynamicMap added in v1.2.15

func (it *BasicByte) DynamicMap() DynamicMap

func (BasicByte) EnumType added in v1.1.9

func (it BasicByte) EnumType() enumtype.Variant

func (BasicByte) ExpectingEnumValueError added in v1.3.22

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

func (BasicByte) Format added in v1.1.9

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 added in v1.1.2

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 added in v1.2.16

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

func (BasicByte) IsAnyNamesOf added in v1.2.2

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

func (BasicByte) IsAnyOf added in v0.4.6

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

func (BasicByte) IsValidRange

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

func (BasicByte) JsonMap added in v1.3.16

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

func (BasicByte) JsonString added in v0.9.5

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

func (*BasicByte) KeyAnyValues added in v1.2.15

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

func (BasicByte) KeyValIntegers added in v1.2.15

func (it BasicByte) KeyValIntegers() []KeyValInteger

func (BasicByte) Length added in v1.2.15

func (it BasicByte) Length() int

func (BasicByte) Loop added in v1.2.15

func (it BasicByte) Loop(looperFunc LooperFunc)

func (BasicByte) LoopInteger added in v1.2.15

func (it BasicByte) LoopInteger(looperFunc LooperIntegerFunc)

func (BasicByte) Max

func (it BasicByte) Max() byte

func (BasicByte) MaxInt added in v1.2.14

func (it BasicByte) MaxInt() int

func (*BasicByte) MaxValueString added in v1.2.14

func (it *BasicByte) MaxValueString() string

func (BasicByte) Min

func (it BasicByte) Min() byte

func (BasicByte) MinInt added in v1.2.14

func (it BasicByte) MinInt() int

func (BasicByte) MinMaxAny added in v1.3.15

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

func (*BasicByte) MinValueString added in v1.2.14

func (it *BasicByte) MinValueString() string

func (BasicByte) NameWithValue added in v0.9.5

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 added in v0.9.5

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 added in v1.2.16

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

func (BasicByte) OnlySupportedErr added in v1.2.16

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

func (BasicByte) OnlySupportedMsgErr added in v1.2.16

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 added in v1.2.14

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

func (*BasicByte) RangesIntegerStringMap added in v1.2.15

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 added in v1.2.14

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 added in v0.4.2

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 added in v1.3.1

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

func (BasicByte) ToNumberString added in v0.4.6

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

func (BasicByte) TypeName added in v0.8.0

func (it BasicByte) TypeName() string

func (BasicByte) UnmarshallToValue added in v0.6.9

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 added in v1.1.9

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

type BasicByter added in v1.1.9

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 added in v1.2.16

func (it BasicInt16) AllNameValues() []string

func (BasicInt16) AppendPrependJoinNamer added in v0.8.3

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

func (BasicInt16) AppendPrependJoinValue added in v0.8.3

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

func (BasicInt16) Count added in v1.2.15

func (it BasicInt16) Count() int

func (*BasicInt16) DynamicMap added in v1.2.15

func (it *BasicInt16) DynamicMap() DynamicMap

func (BasicInt16) EnumType added in v1.1.9

func (it BasicInt16) EnumType() enumtype.Variant

func (BasicInt16) ExpectingEnumValueError added in v1.3.22

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

func (BasicInt16) Format added in v1.1.9

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 added in v1.1.2

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 added in v1.2.16

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

func (BasicInt16) IsAnyNamesOf added in v1.2.2

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

func (BasicInt16) IsAnyOf added in v0.4.6

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

func (BasicInt16) IsValidRange

func (it BasicInt16) IsValidRange(value int16) bool

func (BasicInt16) JsonString added in v0.9.5

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

func (*BasicInt16) KeyAnyValues added in v1.2.15

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

func (BasicInt16) KeyValIntegers added in v1.2.15

func (it BasicInt16) KeyValIntegers() []KeyValInteger

func (BasicInt16) Length added in v1.2.15

func (it BasicInt16) Length() int

func (BasicInt16) Loop added in v1.2.15

func (it BasicInt16) Loop(looperFunc LooperFunc)

func (BasicInt16) LoopInteger added in v1.2.15

func (it BasicInt16) LoopInteger(looperFunc LooperIntegerFunc)

func (BasicInt16) Max

func (it BasicInt16) Max() int16

func (BasicInt16) MaxInt added in v1.2.14

func (it BasicInt16) MaxInt() int

func (*BasicInt16) MaxValueString added in v1.2.14

func (it *BasicInt16) MaxValueString() string

func (BasicInt16) Min

func (it BasicInt16) Min() int16

func (BasicInt16) MinInt added in v1.2.14

func (it BasicInt16) MinInt() int

func (BasicInt16) MinMaxAny added in v1.3.15

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

func (*BasicInt16) MinValueString added in v1.2.14

func (it *BasicInt16) MinValueString() string

func (BasicInt16) NameWithValue added in v0.9.5

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 added in v0.9.5

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 added in v1.2.16

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

func (BasicInt16) OnlySupportedErr added in v1.2.16

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

func (BasicInt16) OnlySupportedMsgErr added in v1.2.16

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 added in v1.2.14

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

func (*BasicInt16) RangesIntegerStringMap added in v1.2.15

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 added in v1.2.14

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 added in v0.4.2

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 added in v1.3.1

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

func (BasicInt16) ToNumberString added in v0.4.6

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

func (BasicInt16) TypeName added in v0.8.0

func (it BasicInt16) TypeName() string

func (BasicInt16) UnmarshallToValue added in v0.6.9

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 added in v1.1.9

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

type BasicInt32

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

func (BasicInt32) AllNameValues added in v1.2.16

func (it BasicInt32) AllNameValues() []string

func (BasicInt32) AppendPrependJoinNamer added in v0.8.3

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

func (BasicInt32) AppendPrependJoinValue added in v0.8.3

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

func (BasicInt32) Count added in v1.2.15

func (it BasicInt32) Count() int

func (*BasicInt32) DynamicMap added in v1.2.15

func (it *BasicInt32) DynamicMap() DynamicMap

func (BasicInt32) EnumType added in v1.1.9

func (it BasicInt32) EnumType() enumtype.Variant

func (BasicInt32) ExpectingEnumValueError added in v1.3.22

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

func (BasicInt32) Format added in v1.1.9

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 added in v1.1.2

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 added in v1.2.16

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

func (BasicInt32) IsAnyNamesOf added in v1.2.2

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

func (BasicInt32) IsAnyOf added in v0.4.6

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

func (BasicInt32) IsValidRange

func (it BasicInt32) IsValidRange(value int32) bool

func (BasicInt32) JsonString added in v0.9.5

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

func (*BasicInt32) KeyAnyValues added in v1.2.15

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

func (BasicInt32) KeyValIntegers added in v1.2.15

func (it BasicInt32) KeyValIntegers() []KeyValInteger

func (BasicInt32) Length added in v1.2.15

func (it BasicInt32) Length() int

func (BasicInt32) Loop added in v1.2.15

func (it BasicInt32) Loop(looperFunc LooperFunc)

func (BasicInt32) LoopInteger added in v1.2.15

func (it BasicInt32) LoopInteger(looperFunc LooperIntegerFunc)

func (BasicInt32) Max

func (it BasicInt32) Max() int32

func (BasicInt32) MaxInt added in v1.2.14

func (it BasicInt32) MaxInt() int

func (*BasicInt32) MaxValueString added in v1.2.14

func (it *BasicInt32) MaxValueString() string

func (BasicInt32) Min

func (it BasicInt32) Min() int32

func (BasicInt32) MinInt added in v1.2.14

func (it BasicInt32) MinInt() int

func (BasicInt32) MinMaxAny added in v1.3.15

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

func (*BasicInt32) MinValueString added in v1.2.14

func (it *BasicInt32) MinValueString() string

func (BasicInt32) NameWithValue added in v0.9.5

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 added in v0.9.5

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 added in v1.2.16

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

func (BasicInt32) OnlySupportedErr added in v1.2.16

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

func (BasicInt32) OnlySupportedMsgErr added in v1.2.16

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 added in v1.2.14

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

func (*BasicInt32) RangesIntegerStringMap added in v1.2.15

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 added in v1.2.14

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 added in v0.4.2

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 added in v1.3.1

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

func (BasicInt32) ToNumberString added in v0.4.6

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

func (BasicInt32) TypeName added in v0.8.0

func (it BasicInt32) TypeName() string

func (BasicInt32) UnmarshallToValue added in v0.6.9

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 added in v1.1.9

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

type BasicInt8

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

func (BasicInt8) AllNameValues added in v1.2.16

func (it BasicInt8) AllNameValues() []string

func (BasicInt8) AppendPrependJoinNamer added in v0.8.3

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

func (BasicInt8) AppendPrependJoinValue added in v0.8.3

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

func (BasicInt8) Count added in v1.2.15

func (it BasicInt8) Count() int

func (*BasicInt8) DynamicMap added in v1.2.15

func (it *BasicInt8) DynamicMap() DynamicMap

func (BasicInt8) EnumType added in v1.1.9

func (it BasicInt8) EnumType() enumtype.Variant

func (BasicInt8) ExpectingEnumValueError added in v1.3.22

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

func (BasicInt8) Format added in v1.1.9

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 added in v1.1.2

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 added in v1.2.16

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

func (BasicInt8) IsAnyNamesOf added in v1.2.2

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

func (BasicInt8) IsAnyOf added in v0.4.6

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

func (BasicInt8) IsValidRange

func (it BasicInt8) IsValidRange(value int8) bool

func (BasicInt8) JsonString added in v0.9.5

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

func (*BasicInt8) KeyAnyValues added in v1.2.15

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

func (BasicInt8) KeyValIntegers added in v1.2.15

func (it BasicInt8) KeyValIntegers() []KeyValInteger

func (BasicInt8) Length added in v1.2.15

func (it BasicInt8) Length() int

func (BasicInt8) Loop added in v1.2.15

func (it BasicInt8) Loop(looperFunc LooperFunc)

func (BasicInt8) LoopInteger added in v1.2.15

func (it BasicInt8) LoopInteger(looperFunc LooperIntegerFunc)

func (BasicInt8) Max

func (it BasicInt8) Max() int8

func (BasicInt8) MaxInt added in v1.2.14

func (it BasicInt8) MaxInt() int

func (*BasicInt8) MaxValueString added in v1.2.14

func (it *BasicInt8) MaxValueString() string

func (BasicInt8) Min

func (it BasicInt8) Min() int8

func (BasicInt8) MinInt added in v1.2.14

func (it BasicInt8) MinInt() int

func (BasicInt8) MinMaxAny added in v1.3.15

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

func (*BasicInt8) MinValueString added in v1.2.14

func (it *BasicInt8) MinValueString() string

func (BasicInt8) NameWithValue added in v0.9.5

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 added in v0.9.5

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 added in v1.2.16

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

func (BasicInt8) OnlySupportedErr added in v1.2.16

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

func (BasicInt8) OnlySupportedMsgErr added in v1.2.16

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 added in v1.2.14

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

func (*BasicInt8) RangesIntegerStringMap added in v1.2.15

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 added in v1.2.14

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 added in v0.4.2

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 added in v1.3.1

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

func (BasicInt8) ToNumberString added in v0.4.6

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

func (BasicInt8) TypeName added in v0.8.0

func (it BasicInt8) TypeName() string

func (BasicInt8) UnmarshallToValue added in v0.6.9

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 added in v1.1.9

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

type BasicString

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

func (BasicString) AllNameValues added in v1.2.16

func (it BasicString) AllNameValues() []string

func (BasicString) AppendPrependJoinNamer added in v0.8.3

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

func (BasicString) AppendPrependJoinValue added in v0.8.3

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

func (BasicString) Count added in v1.2.15

func (it BasicString) Count() int

func (*BasicString) DynamicMap added in v1.2.15

func (it *BasicString) DynamicMap() DynamicMap

func (BasicString) EnumType added in v1.1.9

func (it BasicString) EnumType() enumtype.Variant

func (BasicString) Format added in v1.1.9

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 added in v1.3.3

func (it BasicString) GetIndexByName(name string) int

GetIndexByName

constants.InvalidValue refers to the invalid index

func (BasicString) GetNameByIndex added in v1.3.3

func (it BasicString) GetNameByIndex(index int) string

func (BasicString) GetValueByName added in v1.1.2

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

func (BasicString) HasAnyItem added in v1.3.3

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 added in v1.2.16

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

func (BasicString) IsAnyNamesOf added in v1.2.2

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

func (BasicString) IsAnyOf added in v0.4.6

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

func (BasicString) IsValidRange

func (it BasicString) IsValidRange(value string) bool

func (BasicString) JsonString added in v0.9.5

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

func (*BasicString) KeyAnyValues added in v1.2.15

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

func (BasicString) KeyValIntegers added in v1.2.15

func (it BasicString) KeyValIntegers() []KeyValInteger

func (BasicString) Length added in v1.2.15

func (it BasicString) Length() int

func (BasicString) Loop added in v1.2.15

func (it BasicString) Loop(looperFunc LooperFunc)

func (BasicString) LoopInteger added in v1.2.15

func (it BasicString) LoopInteger(looperFunc LooperIntegerFunc)

func (BasicString) Max

func (it BasicString) Max() string

func (BasicString) MaxIndex added in v1.3.3

func (it BasicString) MaxIndex() int

func (BasicString) MaxInt added in v1.2.14

func (it BasicString) MaxInt() int

func (*BasicString) MaxValueString added in v1.2.14

func (it *BasicString) MaxValueString() string

func (BasicString) Min

func (it BasicString) Min() string

func (BasicString) MinInt added in v1.2.14

func (it BasicString) MinInt() int

func (BasicString) MinMaxAny added in v1.3.15

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

func (*BasicString) MinValueString added in v1.2.14

func (it *BasicString) MinValueString() string

func (BasicString) NameWithIndexMap added in v1.3.3

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

func (BasicString) NameWithValue added in v0.9.5

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 added in v0.9.5

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 added in v1.2.16

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

func (BasicString) OnlySupportedErr added in v1.2.16

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

func (BasicString) OnlySupportedMsgErr added in v1.2.16

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 added in v1.2.14

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

func (*BasicString) RangesIntegerStringMap added in v1.2.15

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

func (BasicString) RangesIntegers added in v1.3.3

func (it BasicString) RangesIntegers() []int

func (*BasicString) RangesInvalidErr

func (it *BasicString) RangesInvalidErr() error

func (*BasicString) RangesInvalidMessage

func (it *BasicString) RangesInvalidMessage() string

func (BasicString) RangesMap added in v1.2.14

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 added in v0.4.2

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 added in v1.3.1

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

func (BasicString) TypeName added in v0.8.0

func (it BasicString) TypeName() string

func (BasicString) UnmarshallToValue added in v0.6.9

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 added in v1.1.9

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

type BasicUInt16 added in v1.1.9

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

func (BasicUInt16) AllNameValues added in v1.2.16

func (it BasicUInt16) AllNameValues() []string

func (BasicUInt16) AppendPrependJoinNamer added in v1.1.9

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

func (BasicUInt16) AppendPrependJoinValue added in v1.1.9

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

func (BasicUInt16) Count added in v1.2.15

func (it BasicUInt16) Count() int

func (*BasicUInt16) DynamicMap added in v1.2.15

func (it *BasicUInt16) DynamicMap() DynamicMap

func (BasicUInt16) EnumType added in v1.1.9

func (it BasicUInt16) EnumType() enumtype.Variant

func (BasicUInt16) ExpectingEnumValueError added in v1.3.22

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

func (BasicUInt16) Format added in v1.1.9

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 added in v1.1.9

func (it BasicUInt16) GetStringValue(input uint16) string

func (BasicUInt16) GetValueByName added in v1.1.9

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

func (BasicUInt16) GetValueByString added in v1.1.9

func (it BasicUInt16) GetValueByString(valueString string) uint16

func (BasicUInt16) Hashmap added in v1.1.9

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

func (BasicUInt16) HashmapPtr added in v1.1.9

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

func (*BasicUInt16) IntegerEnumRanges added in v1.2.16

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

func (BasicUInt16) IsAnyNamesOf added in v1.2.2

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

func (BasicUInt16) IsAnyOf added in v1.1.9

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

func (BasicUInt16) IsValidRange added in v1.1.9

func (it BasicUInt16) IsValidRange(value uint16) bool

func (BasicUInt16) JsonString added in v1.1.9

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

func (*BasicUInt16) KeyAnyValues added in v1.2.15

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

func (BasicUInt16) KeyValIntegers added in v1.2.15

func (it BasicUInt16) KeyValIntegers() []KeyValInteger

func (BasicUInt16) Length added in v1.2.15

func (it BasicUInt16) Length() int

func (BasicUInt16) Loop added in v1.2.15

func (it BasicUInt16) Loop(looperFunc LooperFunc)

func (BasicUInt16) LoopInteger added in v1.2.15

func (it BasicUInt16) LoopInteger(looperFunc LooperIntegerFunc)

func (BasicUInt16) Max added in v1.1.9

func (it BasicUInt16) Max() uint16

func (BasicUInt16) MaxInt added in v1.2.14

func (it BasicUInt16) MaxInt() int

func (*BasicUInt16) MaxValueString added in v1.2.14

func (it *BasicUInt16) MaxValueString() string

func (BasicUInt16) Min added in v1.1.9

func (it BasicUInt16) Min() uint16

func (BasicUInt16) MinInt added in v1.2.14

func (it BasicUInt16) MinInt() int

func (BasicUInt16) MinMaxAny added in v1.3.15

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

func (*BasicUInt16) MinValueString added in v1.2.14

func (it *BasicUInt16) MinValueString() string

func (BasicUInt16) NameWithValue added in v1.1.9

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 added in v1.1.9

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 added in v1.2.16

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

func (BasicUInt16) OnlySupportedErr added in v1.2.16

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

func (BasicUInt16) OnlySupportedMsgErr added in v1.2.16

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

func (*BasicUInt16) RangeNamesCsv added in v1.1.9

func (it *BasicUInt16) RangeNamesCsv() string

func (BasicUInt16) Ranges added in v1.1.9

func (it BasicUInt16) Ranges() []uint16

func (*BasicUInt16) RangesDynamicMap added in v1.2.14

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

func (*BasicUInt16) RangesIntegerStringMap added in v1.2.15

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

func (*BasicUInt16) RangesInvalidErr added in v1.1.9

func (it *BasicUInt16) RangesInvalidErr() error

func (*BasicUInt16) RangesInvalidMessage added in v1.1.9

func (it *BasicUInt16) RangesInvalidMessage() string

func (BasicUInt16) RangesMap added in v1.2.14

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

func (BasicUInt16) StringRanges added in v1.1.9

func (it BasicUInt16) StringRanges() []string

func (BasicUInt16) StringRangesPtr added in v1.1.9

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

func (BasicUInt16) ToEnumJsonBytes added in v1.1.9

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

ToEnumJsonBytes used for MarshalJSON from map

func (BasicUInt16) ToEnumString added in v1.1.9

func (it BasicUInt16) ToEnumString(value uint16) string

func (BasicUInt16) ToName added in v1.3.1

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

func (BasicUInt16) ToNumberString added in v1.1.9

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

func (BasicUInt16) TypeName added in v1.1.9

func (it BasicUInt16) TypeName() string

func (BasicUInt16) UnmarshallToValue added in v1.1.9

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 added in v1.1.9

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

type DynamicMap added in v1.2.9

type DynamicMap map[string]interface{}

func (*DynamicMap) Add added in v1.2.9

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

func (*DynamicMap) AddNewOnly added in v1.3.16

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

AddNewOnly

Don't update existing

func (DynamicMap) AddOrUpdate added in v1.3.16

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

func (DynamicMap) AllKeys added in v1.2.9

func (it DynamicMap) AllKeys() []string

func (DynamicMap) AllKeysSorted added in v1.2.9

func (it DynamicMap) AllKeysSorted() []string

func (DynamicMap) AllValuesIntegers added in v1.2.15

func (it DynamicMap) AllValuesIntegers() []int

func (DynamicMap) AllValuesStrings added in v1.2.15

func (it DynamicMap) AllValuesStrings() []string

func (DynamicMap) AllValuesStringsSorted added in v1.2.15

func (it DynamicMap) AllValuesStringsSorted() []string

func (DynamicMap) BasicByte added in v1.2.9

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

func (DynamicMap) BasicByteUsingAliasMap added in v1.2.9

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

func (DynamicMap) BasicInt16 added in v1.2.9

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

func (DynamicMap) BasicInt16UsingAliasMap added in v1.2.9

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

func (DynamicMap) BasicInt32 added in v1.2.9

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

func (DynamicMap) BasicInt32UsingAliasMap added in v1.2.9

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

func (DynamicMap) BasicInt8 added in v1.2.9

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

func (DynamicMap) BasicInt8UsingAliasMap added in v1.2.9

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

func (DynamicMap) BasicString added in v1.2.9

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

func (DynamicMap) BasicStringUsingAliasMap added in v1.2.9

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

func (DynamicMap) BasicUInt16 added in v1.2.9

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

func (DynamicMap) BasicUInt16UsingAliasMap added in v1.2.9

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

func (DynamicMap) ConcatNew added in v1.3.16

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

func (DynamicMap) ConvMapByteString added in v1.2.9

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

ConvMapByteString

Conv value to key and key to value.

func (DynamicMap) ConvMapInt16String added in v1.2.9

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

ConvMapInt16String

Conv value to key and key to value.

func (DynamicMap) ConvMapInt32String added in v1.2.9

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

ConvMapInt32String

Conv value to key and key to value.

func (DynamicMap) ConvMapInt64String added in v1.2.9

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

ConvMapInt64String

Conv value to key and key to value.

func (DynamicMap) ConvMapInt8String added in v1.2.9

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

ConvMapInt8String

Conv value to key and key to value.

func (DynamicMap) ConvMapIntegerString added in v1.2.9

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

ConvMapIntegerString

Conv value to key and key to value.

func (DynamicMap) ConvMapStringInteger added in v1.2.9

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

ConvMapStringInteger

Conv value to key and key to value.

func (DynamicMap) ConvMapStringString added in v1.2.9

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

ConvMapStringString

Conv value to key and key to value.

func (DynamicMap) ConvMapUInt16String added in v1.2.9

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

ConvMapUInt16String

Conv value to key and key to value.

func (DynamicMap) Count added in v1.2.9

func (it DynamicMap) Count() int

func (*DynamicMap) DiffJsonMessage added in v1.3.5

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

func (*DynamicMap) DiffRaw added in v1.3.5

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

func (*DynamicMap) ExpectingMessage added in v1.3.5

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

func (DynamicMap) First added in v1.2.18

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

func (DynamicMap) HasAllKeys added in v1.2.9

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

func (DynamicMap) HasAnyItem added in v1.2.9

func (it DynamicMap) HasAnyItem() bool

func (DynamicMap) HasAnyKeys added in v1.2.9

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

func (DynamicMap) HasIndex added in v1.2.9

func (it DynamicMap) HasIndex(index int) bool

func (DynamicMap) HasKey added in v1.2.9

func (it DynamicMap) HasKey(key string) bool

func (DynamicMap) IsEmpty added in v1.2.9

func (it DynamicMap) IsEmpty() bool

func (*DynamicMap) IsEqual added in v1.3.0

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

func (*DynamicMap) IsKeysEqualOnly added in v1.3.0

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

func (*DynamicMap) IsMismatch added in v1.3.0

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

func (DynamicMap) IsMissingKey added in v1.2.9

func (it DynamicMap) IsMissingKey(key string) bool

func (*DynamicMap) IsRawEqual added in v1.3.0

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

func (*DynamicMap) IsRawMismatch added in v1.3.0

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

func (DynamicMap) IsStringEqual added in v1.3.0

func (it DynamicMap) IsStringEqual(anotherMapString string) bool

func (DynamicMap) IsValueString added in v1.2.18

func (it DynamicMap) IsValueString() bool

func (DynamicMap) IsValueTypeOf added in v1.2.18

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

func (DynamicMap) KeyValue added in v1.2.9

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

func (DynamicMap) KeyValueByte added in v1.2.10

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

func (DynamicMap) KeyValueInt added in v1.2.9

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

func (DynamicMap) KeyValueIntDefault added in v1.2.9

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

func (DynamicMap) KeyValueString added in v1.2.9

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

func (DynamicMap) LastIndex added in v1.2.9

func (it DynamicMap) LastIndex() int

func (*DynamicMap) Length added in v1.2.9

func (it *DynamicMap) Length() int

func (*DynamicMap) LogExpectingMessage added in v1.3.5

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

func (*DynamicMap) LogShouldDiffMessage added in v1.3.8

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

func (DynamicMap) MapIntegerString added in v1.2.15

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

func (DynamicMap) Raw added in v1.3.24

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

func (DynamicMap) Serialize added in v1.3.0

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

func (*DynamicMap) Set added in v1.3.16

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

func (*DynamicMap) ShouldDiffMessage added in v1.3.5

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

func (DynamicMap) SortedKeyAnyValues added in v1.2.15

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

func (DynamicMap) SortedKeyValues added in v1.2.15

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

func (DynamicMap) String added in v1.2.9

func (it DynamicMap) String() string

func (DynamicMap) Strings added in v1.2.9

func (it DynamicMap) Strings() []string

func (DynamicMap) StringsUsingFmt added in v1.3.0

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

type KeyAnyVal added in v1.2.15

type KeyAnyVal struct {
	Key      string
	AnyValue interface{}
}

func KeyAnyValues added in v1.2.15

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

func (KeyAnyVal) AnyVal added in v1.2.16

func (it KeyAnyVal) AnyVal() interface{}

func (KeyAnyVal) AnyValString added in v1.2.16

func (it KeyAnyVal) AnyValString() string

func (KeyAnyVal) IsString added in v1.2.15

func (it KeyAnyVal) IsString() bool

func (KeyAnyVal) KeyString added in v1.2.16

func (it KeyAnyVal) KeyString() string

func (KeyAnyVal) KeyValInteger added in v1.2.15

func (it KeyAnyVal) KeyValInteger() KeyValInteger

func (KeyAnyVal) String added in v1.2.15

func (it KeyAnyVal) String() string

func (KeyAnyVal) ValInt added in v1.2.15

func (it KeyAnyVal) ValInt() int

func (KeyAnyVal) WrapKey added in v1.2.15

func (it KeyAnyVal) WrapKey() string

func (KeyAnyVal) WrapValue added in v1.2.15

func (it KeyAnyVal) WrapValue() string

type KeyValInteger added in v1.2.15

type KeyValInteger struct {
	Key          string
	ValueInteger int
}

func (KeyValInteger) IsString added in v1.2.15

func (it KeyValInteger) IsString() bool

func (KeyValInteger) KeyAnyVal added in v1.2.15

func (it KeyValInteger) KeyAnyVal() KeyAnyVal

func (KeyValInteger) String added in v1.2.15

func (it KeyValInteger) String() string

func (KeyValInteger) WrapKey added in v1.2.15

func (it KeyValInteger) WrapKey() string

func (KeyValInteger) WrapValue added in v1.2.15

func (it KeyValInteger) WrapValue() string

type LooperFunc added in v1.2.15

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

type LooperIntegerFunc added in v1.2.15

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