enums

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JsonObj

func JsonObj(val int, enum string, des string) ([]byte, error)

func UnmarshalEnum

func UnmarshalEnum(value []byte) int

Types

type BaseValEnum

type BaseValEnum struct {
	Enum string `json:"enum"`
	Val  int    `json:"val"`
	Des  string `json:"des"`
}

func BE

func BE(val any) BaseValEnum

type CharSelectOptions added in v0.3.9

type CharSelectOptions struct {
	Value string `json:"value"`
	Desc  string `json:"desc"`
}

type SelectOptions

type SelectOptions struct {
	Value int    `json:"value"`
	Desc  string `json:"desc"`
}

func ToSelectOptions added in v0.3.9

func ToSelectOptions[T any](enums []T) []SelectOptions

type ViewEnumCache added in v0.3.9

type ViewEnumCache struct {
	Val  int    `json:"val"`
	Des  string `json:"des"`
	Enum string `json:"enum"`
}

Jump to

Keyboard shortcuts

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