enum

package
v0.0.0-...-5495d05 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(enums interface{}, begin int, prefix string, strKey string)

func BuildErrorEnum

func BuildErrorEnum(enum interface{}, startCode int64)

func SimpleBuild

func SimpleBuild(enums interface{})

func SimpleBuildWithNameKey

func SimpleBuildWithNameKey(enums interface{}, strKey string)

Types

type AddressableEnum

type AddressableEnum struct {
	// contains filtered or unexported fields
}

func (*AddressableEnum) Get

func (a *AddressableEnum) Get(elName string) *Element

func (*AddressableEnum) GetByVal

func (a *AddressableEnum) GetByVal(val int) *Element

type Element

type Element struct {
	// contains filtered or unexported fields
}

func (*Element) Description

func (t *Element) Description() string

func (*Element) Int

func (t *Element) Int() int

func (*Element) IntStr

func (t *Element) IntStr() string

func (*Element) Name

func (t *Element) Name() string

func (*Element) String

func (t *Element) String() string

type ErrorElement

type ErrorElement struct {
	// contains filtered or unexported fields
}

func (ErrorElement) Code

func (e ErrorElement) Code() int64

func (ErrorElement) Data

func (e ErrorElement) Data() interface{}

func (ErrorElement) Error

func (e ErrorElement) Error() string

func (ErrorElement) Name

func (e ErrorElement) Name() string

func (ErrorElement) NewErrorWithData

func (e ErrorElement) NewErrorWithData(msg string, data interface{}) *ErrorElement

func (ErrorElement) NewErrorWithNewMessage

func (e ErrorElement) NewErrorWithNewMessage(msg string) ErrorElement

type IElement

type IElement interface {
	Int() int
	IntStr() string
	Name() string
	String() string
	Description() string
}

Jump to

Keyboard shortcuts

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