eventtype

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Ranges = [...]string{
		Invalid: "Invalid",
		Log:     "Log",
		Success: "Success",
		Error:   "Error",
		Failure: "Failure",
		File:    "File",
		Custom:  "Custom",
	}

	ErrorMap = map[Variant]bool{
		Failure: true,
		Error:   true,
	}

	BasicEnumImpl = enumimpl.New.BasicByte.UsingTypeSlice(
		coredynamic.TypeName(Success),
		Ranges[:])
)

Functions

func Is added in v0.1.3

func Is(
	rawString string,
	expected Variant,
) bool

func RangesInvalidErr added in v0.0.4

func RangesInvalidErr() error

func StringMustBe added in v0.1.3

func StringMustBe(
	rawString string,
	expected Variant,
)

func ValidationError added in v0.1.3

func ValidationError(
	rawString string,
	expectedEnum Variant,
) error

Types

type Variant

type Variant byte

Variant

Log, Success, Error, Failure

const (
	Invalid Variant = iota
	Log
	Success
	Error
	Failure // Dangerous
	File
	Custom
)

func Max added in v0.0.4

func Max() Variant

func Min added in v0.0.4

func Min() Variant

func New

func New(name string) (Variant, error)

func NewMust

func NewMust(name string) Variant

func (Variant) AllNameValues added in v0.0.4

func (it Variant) AllNameValues() []string

func (Variant) AsBasicByteEnumContractsBinder

func (it Variant) AsBasicByteEnumContractsBinder() enuminf.BasicByteEnumContractsBinder

func (Variant) AsBasicEnumContractsBinder

func (it Variant) AsBasicEnumContractsBinder() enuminf.BasicEnumContractsBinder

func (Variant) AsEventTyper added in v0.0.5

func (it Variant) AsEventTyper() enuminf.EventTyper

func (*Variant) AsJsonContractsBinder

func (it *Variant) AsJsonContractsBinder() corejson.JsonContractsBinder

func (*Variant) AsJsonMarshaller

func (it *Variant) AsJsonMarshaller() corejson.JsonMarshaller

func (*Variant) AsJsoner

func (it *Variant) AsJsoner() corejson.Jsoner

func (Variant) AsLoggerTyper added in v0.0.4

func (it Variant) AsLoggerTyper() enuminf.LoggerTyper

func (Variant) EnumType added in v0.0.4

func (it Variant) EnumType() enuminf.EnumTyper

func (Variant) Format added in v0.0.4

func (it Variant) Format(format string) (compiled string)

func (Variant) HasNoLog added in v0.0.4

func (it Variant) HasNoLog() bool

func (Variant) HasPattern added in v0.0.5

func (it Variant) HasPattern(pattern string) bool

func (Variant) IntegerEnumRanges added in v0.0.4

func (it Variant) IntegerEnumRanges() []int

func (Variant) IsAnyNamesOf added in v0.0.4

func (it Variant) IsAnyNamesOf(names ...string) bool

func (Variant) IsAnyOf

func (it Variant) IsAnyOf(anyOfItems ...Variant) bool

func (Variant) IsAnyValuesEqual added in v0.0.4

func (it Variant) IsAnyValuesEqual(anyByteValues ...byte) bool

func (Variant) IsByteValueEqual added in v0.0.4

func (it Variant) IsByteValueEqual(value byte) bool

func (Variant) IsCustom added in v0.0.5

func (it Variant) IsCustom() bool

func (Variant) IsDebug added in v0.0.4

func (it Variant) IsDebug() bool

func (Variant) IsError

func (it Variant) IsError() bool

func (Variant) IsErrorFatalLogical added in v0.0.4

func (it Variant) IsErrorFatalLogical() bool

func (Variant) IsErrorFatalPanicLogical added in v0.0.4

func (it Variant) IsErrorFatalPanicLogical() bool

func (Variant) IsErrorLogical added in v0.0.4

func (it Variant) IsErrorLogical() bool

func (Variant) IsErrorLogically

func (it Variant) IsErrorLogically() bool

func (Variant) IsFailure added in v0.0.5

func (it Variant) IsFailure() bool

func (Variant) IsFatal added in v0.0.4

func (it Variant) IsFatal() bool

func (Variant) IsFile added in v0.0.5

func (it Variant) IsFile() bool

func (Variant) IsInfo added in v0.0.4

func (it Variant) IsInfo() bool

func (Variant) IsInvalid added in v0.0.4

func (it Variant) IsInvalid() bool

func (Variant) IsLog

func (it Variant) IsLog() bool

func (Variant) IsLogLogically

func (it Variant) IsLogLogically() bool

func (Variant) IsLogNameEqual added in v0.0.4

func (it Variant) IsLogNameEqual(name string) bool

func (Variant) IsLogValueEqual added in v0.0.4

func (it Variant) IsLogValueEqual(logVal byte) bool

func (Variant) IsNameEqual added in v0.0.4

func (it Variant) IsNameEqual(name string) bool

func (Variant) IsNameOf added in v0.0.4

func (it Variant) IsNameOf(anyNames ...string) bool

func (Variant) IsPanic added in v0.0.4

func (it Variant) IsPanic() bool

func (Variant) IsSilent added in v0.0.4

func (it Variant) IsSilent() bool

func (Variant) IsSkip added in v0.0.4

func (it Variant) IsSkip() bool

func (Variant) IsSuccess

func (it Variant) IsSuccess() bool

func (Variant) IsTrace added in v0.0.4

func (it Variant) IsTrace() bool

func (Variant) IsValid added in v0.0.4

func (it Variant) IsValid() bool

func (Variant) IsValueEqual added in v0.0.4

func (it Variant) IsValueEqual(value byte) bool

func (Variant) Json

func (it Variant) Json() corejson.Result

func (*Variant) JsonParseSelfInject

func (it *Variant) JsonParseSelfInject(jsonResult *corejson.Result) error

func (Variant) JsonPtr

func (it Variant) JsonPtr() *corejson.Result

func (Variant) MarshalJSON

func (it Variant) MarshalJSON() ([]byte, error)

func (Variant) MaxByte

func (it Variant) MaxByte() byte

func (Variant) MaxInt added in v0.0.4

func (it Variant) MaxInt() int

func (Variant) MaxValueString added in v0.0.4

func (it Variant) MaxValueString() string

func (Variant) MinByte

func (it Variant) MinByte() byte

func (Variant) MinInt added in v0.0.4

func (it Variant) MinInt() int

func (Variant) MinMaxAny added in v0.1.3

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

func (Variant) MinValueString added in v0.0.4

func (it Variant) MinValueString() string

func (Variant) Name

func (it Variant) Name() string

func (Variant) NameValue

func (it Variant) NameValue() string

func (Variant) OnlySupportedErr added in v0.0.4

func (it Variant) OnlySupportedErr(names ...string) error

func (Variant) OnlySupportedMsgErr added in v0.0.4

func (it Variant) OnlySupportedMsgErr(message string, names ...string) error

func (Variant) RangeNamesCsv

func (it Variant) RangeNamesCsv() string

func (Variant) RangesByte

func (it Variant) RangesByte() []byte

func (Variant) RangesDynamicMap added in v0.0.4

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

func (Variant) String

func (it Variant) String() string

func (Variant) ToNumberString

func (it Variant) ToNumberString() string

func (Variant) ToPtr added in v0.0.4

func (it Variant) ToPtr() *Variant

func (Variant) TypeName

func (it Variant) TypeName() string

func (*Variant) UnmarshalJSON

func (it *Variant) UnmarshalJSON(data []byte) error

func (Variant) UnmarshallEnumToValue

func (it Variant) UnmarshallEnumToValue(jsonUnmarshallingValue []byte) (byte, error)

func (Variant) Value added in v0.0.5

func (it Variant) Value() byte

func (Variant) ValueByte

func (it Variant) ValueByte() byte

func (Variant) ValueInt added in v0.0.4

func (it Variant) ValueInt() int

func (Variant) ValueInt16 added in v0.0.4

func (it Variant) ValueInt16() int16

func (Variant) ValueInt32 added in v0.0.4

func (it Variant) ValueInt32() int32

func (Variant) ValueInt8 added in v0.0.4

func (it Variant) ValueInt8() int8

func (Variant) ValueString added in v0.0.4

func (it Variant) ValueString() string

func (Variant) ValueUInt16 added in v0.0.4

func (it Variant) ValueUInt16() uint16

Jump to

Keyboard shortcuts

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