enum

package
v3.3.5 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: ISC Imports: 1 Imported by: 1

Documentation

Index

Constants

View Source
const Null = -1

Null is the value used to represent JSON null. It should never be used as a value, as it won't get serialized as such.

Variables

This section is empty.

Functions

func ToJSON

func ToJSON(i Enum) []byte

Int8ToJSON converts the passed Enum to a byte slice with it's JSON representation.

Types

type Enum

type Enum int32

Enum is a nullable version of a uint32. Enum values should only consist of positive values, as negative values are reserved for internal constants, such as Null. This also means that only 31 of the 32 bits will be available for storage.

func FromJSON

func FromJSON(b []byte) (Enum, error)

Int8FromJSON decodes the Enum stored as JSON src the passed byte slice.

Jump to

Keyboard shortcuts

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