enumimpl

package
v0.8.6 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2021 License: MIT Imports: 12 Imported by: 90

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JoinPrependUsingDot added in v0.8.3

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

func PrependJoin added in v0.8.3

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

Types

type BasicByte

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

func NewBasicByte

func NewBasicByte(
	typeName string,
	actualValueRanges []byte,
	stringRanges []string,
	min, max byte,
) *BasicByte

func NewBasicByteUsingIndexedSlice

func NewBasicByteUsingIndexedSlice(
	typeName string,
	indexedSliceWithValues []string,
) *BasicByte

func (*BasicByte) AppendPrependJoinNamer added in v0.8.3

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

func (*BasicByte) AppendPrependJoinValue added in v0.8.3

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

func (*BasicByte) GetStringValue

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

func (*BasicByte) GetValueByString

func (it *BasicByte) GetValueByString(valueString string) byte

func (*BasicByte) Hashmap

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

func (*BasicByte) HashmapPtr

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

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) Max

func (it *BasicByte) Max() byte

func (*BasicByte) Min

func (it *BasicByte) Min() byte

func (BasicByte) RangeNamesCsv

func (it BasicByte) RangeNamesCsv() string

func (*BasicByte) Ranges

func (it *BasicByte) Ranges() []byte

func (BasicByte) RangesInvalidErr

func (it BasicByte) RangesInvalidErr() error

func (BasicByte) RangesInvalidMessage

func (it BasicByte) RangesInvalidMessage() string

func (BasicByte) StringJson

func (it BasicByte) StringJson(input interface{}) (jsonString string, err error)

func (BasicByte) StringJsonMust

func (it BasicByte) StringJsonMust(input interface{}) 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

ToEnumJsonBytes used for MarshalJSON from map

func (*BasicByte) ToEnumString

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

func (*BasicByte) ToNumberString added in v0.4.6

func (it *BasicByte) ToNumberString(valueInRawFormat 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

type BasicInt16

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

func NewBasicInt16

func NewBasicInt16(
	typeName string,
	actualValueRanges []int16,
	stringRanges []string,
	min, max int16,
) *BasicInt16

func NewBasicInt16UsingIndexedSlice added in v0.6.1

func NewBasicInt16UsingIndexedSlice(
	typeName string,
	indexedSliceWithValues []string,
) *BasicInt16

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) GetStringValue

func (it *BasicInt16) GetStringValue(input int16) string

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) 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) Max

func (it *BasicInt16) Max() int16

func (*BasicInt16) Min

func (it *BasicInt16) Min() int16

func (BasicInt16) RangeNamesCsv

func (it BasicInt16) RangeNamesCsv() string

func (*BasicInt16) Ranges

func (it *BasicInt16) Ranges() []int16

func (BasicInt16) RangesInvalidErr

func (it BasicInt16) RangesInvalidErr() error

func (BasicInt16) RangesInvalidMessage

func (it BasicInt16) RangesInvalidMessage() string

func (BasicInt16) StringJson

func (it BasicInt16) StringJson(input interface{}) (jsonString string, err error)

func (BasicInt16) StringJsonMust

func (it BasicInt16) StringJsonMust(input interface{}) 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

ToEnumJsonBytes used for MarshalJSON from map

func (*BasicInt16) ToEnumString

func (it *BasicInt16) ToEnumString(value int16) 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

type BasicInt32

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

func NewBasicInt32

func NewBasicInt32(
	typeName string,
	actualValueRanges []int32,
	stringRanges []string,
	min, max int32,
) *BasicInt32

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) GetStringValue

func (it *BasicInt32) GetStringValue(input int32) string

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) 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) Max

func (it *BasicInt32) Max() int32

func (*BasicInt32) Min

func (it *BasicInt32) Min() int32

func (BasicInt32) RangeNamesCsv

func (it BasicInt32) RangeNamesCsv() string

func (*BasicInt32) Ranges

func (it *BasicInt32) Ranges() []int32

func (BasicInt32) RangesInvalidErr

func (it BasicInt32) RangesInvalidErr() error

func (BasicInt32) RangesInvalidMessage

func (it BasicInt32) RangesInvalidMessage() string

func (BasicInt32) StringJson

func (it BasicInt32) StringJson(input interface{}) (jsonString string, err error)

func (BasicInt32) StringJsonMust

func (it BasicInt32) StringJsonMust(input interface{}) 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

ToEnumJsonBytes used for MarshalJSON from map

func (*BasicInt32) ToEnumString

func (it *BasicInt32) ToEnumString(value int32) 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

type BasicInt8

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

func NewBasicInt8

func NewBasicInt8(
	typeName string,
	actualValueRanges []int8,
	stringRanges []string,
	min, max int8,
) *BasicInt8

func NewBasicInt8UsingIndexedSlice added in v0.6.1

func NewBasicInt8UsingIndexedSlice(
	typeName string,
	indexedSliceWithValues []string,
) *BasicInt8

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) GetStringValue

func (it *BasicInt8) GetStringValue(input int8) string

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) 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) Max

func (it *BasicInt8) Max() int8

func (*BasicInt8) Min

func (it *BasicInt8) Min() int8

func (BasicInt8) RangeNamesCsv

func (it BasicInt8) RangeNamesCsv() string

func (*BasicInt8) Ranges

func (it *BasicInt8) Ranges() []int8

func (BasicInt8) RangesInvalidErr

func (it BasicInt8) RangesInvalidErr() error

func (BasicInt8) RangesInvalidMessage

func (it BasicInt8) RangesInvalidMessage() string

func (BasicInt8) StringJson

func (it BasicInt8) StringJson(input interface{}) (jsonString string, err error)

func (BasicInt8) StringJsonMust

func (it BasicInt8) StringJsonMust(input interface{}) 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

ToEnumJsonBytes used for MarshalJSON from map

func (*BasicInt8) ToEnumString

func (it *BasicInt8) ToEnumString(value int8) 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

type BasicString

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

func NewBasicString

func NewBasicString(
	typeName string,
	stringRanges []string,
	min, max string,
) *BasicString

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) Hashset

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

func (*BasicString) HashsetPtr

func (it *BasicString) HashsetPtr() *map[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) Max

func (it *BasicString) Max() string

func (*BasicString) Min

func (it *BasicString) Min() string

func (BasicString) RangeNamesCsv

func (it BasicString) RangeNamesCsv() string

func (*BasicString) Ranges

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

func (BasicString) RangesInvalidErr

func (it BasicString) RangesInvalidErr() error

func (BasicString) RangesInvalidMessage

func (it BasicString) RangesInvalidMessage() string

func (BasicString) StringJson

func (it BasicString) StringJson(input interface{}) (jsonString string, err error)

func (BasicString) StringJsonMust

func (it BasicString) StringJsonMust(input interface{}) 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

ToEnumJsonBytes used for MarshalJSON from map

func (BasicString) ToEnumString

func (it BasicString) ToEnumString(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

Jump to

Keyboard shortcuts

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