utils

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Enum added in v1.9.0

type Enum interface {
	IsEnum()
}

Enum is a marker interface implemented by all EnumField instantiations.

type EnumField

type EnumField[T ~int | ~uint8 | ~uint16 | ~uint64 | ~int64] struct {
	Type    string `json:"type"` // always "enum"
	Value   T      `json:"value"`
	Label   string `json:"label"`
	Unknown bool   `json:"unknown"`
}

func MakeEnum

func MakeEnum[T ~int | ~uint8 | ~uint16 | ~uint64 | ~int64](v T, label string, unknown bool) EnumField[T]

func (EnumField[T]) IsEnum added in v1.9.0

func (EnumField[T]) IsEnum()

Jump to

Keyboard shortcuts

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