enum

package
v1.0.42 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnumSliceToJSON

func EnumSliceToJSON(e []Enum) json.RawMessage

func EnumToJSON

func EnumToJSON(e Enum) json.RawMessage

func StatusSliceToJSON

func StatusSliceToJSON(in []Status) json.RawMessage

Types

type Enum

type Enum struct {
	UUID          uuid.UUID              `json:"uuid"`
	Version       int64                  `json:"version"`
	Identifier    string                 `json:"identifier"`
	StaticValues  []enum_value.EnumValue `json:"static_values"`
	RemoteValues  bool                   `json:"remote_values"`
	Status        Status                 `json:"status"`
	CreatedAt     time.Time              `json:"created_at"`
	UpdatedAt     time.Time              `json:"updated_at"`
	CreatedByUUID uuid.UUID              `json:"created_by_uuid"`
	UpdatedByUUID uuid.UUID              `json:"updated_by_uuid"`
}

func EnumFromJSON

func EnumFromJSON(data json.RawMessage) Enum

func EnumSliceFromJSON

func EnumSliceFromJSON(data json.RawMessage) []Enum

func NewEnumSliceWithRandomValues

func NewEnumSliceWithRandomValues(n int) []Enum

func NewEnumWithRandomValues

func NewEnumWithRandomValues() Enum

func (Enum) ArrayFieldIdentifierToType

func (e Enum) ArrayFieldIdentifierToType() map[string]types.FieldType

func (Enum) EntityIdentifier

func (e Enum) EntityIdentifier() string

func (Enum) FieldIdentfierToTypeMap

func (e Enum) FieldIdentfierToTypeMap() map[string]types.FieldType

func (Enum) IsDependant

func (e Enum) IsDependant() bool

func (Enum) OrderedFieldIdentifiers added in v1.0.35

func (e Enum) OrderedFieldIdentifiers() []string

func (Enum) String

func (e Enum) String() string

func (Enum) ToJSON

func (e Enum) ToJSON() json.RawMessage

type Status

type Status int64
const (
	STATUS_INVALID Status = iota
	STATUS_ACTIVE
	STATUS_DISABLED
)

func JSONToStatusSlice

func JSONToStatusSlice(in json.RawMessage) []Status

func StatusFromPointerString

func StatusFromPointerString(in *string) Status

func StatusFromString

func StatusFromString(in string) Status

func (Status) String

func (e Status) String() string

func (Status) StringPtr

func (e Status) StringPtr() *string

func (Status) ToInt64

func (e Status) ToInt64() int64

Jump to

Keyboard shortcuts

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