enum

package
v0.2.78 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New[R IEnumCode[TCode], TCode int | int64 | string](code TCode, description string) R

Types

type IEnumCode added in v0.2.48

type IEnumCode[TCode int | int64 | string] interface {
	Code() TCode
	// Description returns the brief description for current code.
	Description() string
}

type IEnumCodeInt added in v0.2.48

type IEnumCodeInt interface {
	Code() int
	// Description returns the brief description for current code.
	Description() string
}

type IEnumCodeStr added in v0.2.48

type IEnumCodeStr interface {
	Code() string
	// Description returns the brief description for current code.
	Description() string
}

type IEnumCodeWithData added in v0.2.48

type IEnumCodeWithData[TCode int | int64 | string, TData any] interface {
	Code() TCode
	Data() TData
	Description() string
}

func NewWithData added in v0.2.48

func NewWithData[TCode int | int64 | string, TData any](code TCode, data TData, description string) *IEnumCodeWithData[TCode, TData]

Jump to

Keyboard shortcuts

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