package
0.0.0-20240828102510-ec9cd4c787a9
Repository: https://github.com/expgo/enum.git
Documentation: pkg.go.dev

# Functions

Enum32bitValues returns a list of the values of Enum32bit.
Enum64bitValues returns a list of the values of Enum64bit.
IntShopNames returns a list of the names of IntShop.
MakeNames returns a list of the names of Make.
MakeValues returns a list of the values of Make.
MustParseColor converts a string to a Color, and panics if is not valid.
NoZerosNames returns a list of the names of NoZeros.
NoZerosValues returns a list of the values of NoZeros.
ParseAllNegative converts a string to an AllNegative.
ParseAnimal converts a string to an Animal.
ParseColor converts a string to a Color.
ParseCommented converts a string to a Commented.
ParseComplexCommented converts a string to a ComplexCommented.
ParseDataType converts a string to a DataType.
ParseDevice converts a string to a Device.
ParseDiffBase converts a string to a DiffBase.
ParseEnum32bit converts a string to an Enum32bit.
ParseEnum64bit converts a string to an Enum64bit.
ParseForceLowerType converts a string to a ForceLowerType.
ParseForceUpperType converts a string to a ForceUpperType.
ParseIntShop converts a string to an IntShop.
ParseMake converts a string to a Make.
ParseNoZeros converts a string to a NoZeros.
ParseProduct converts a string to a Product.
ParseProjectStatus converts a string to a ProjectStatus.
ParseProjectStrStatus converts a string to a ProjectStrStatus.
ParseProjectStrStatusIntCode converts a string to a ProjectStrStatusIntCode.
ParseShop converts a string to a Shop.
ParseStatus converts a string to a Status.
ParseSuffix converts a string to a Suffix.
ShopNames returns a list of the names of Shop.

# Constants

AcmeInc_LocationUnknown is a Shop of type LocationUnknown.
AcmeInc_SOME_PLACE_AWESOME is a Shop of type SOME_PLACE_AWESOME.
AcmeInc_SomewhereElse is a Shop of type SomewhereElse.
AcmeIncProductAnvil is a Product of type Anvil.
AcmeIncProductDynamite is a Product of type Dynamite.
AcmeIncProductGlue is a Product of type Glue.
AcmeInt_LocationUnknown is an IntShop of type LocationUnknown.
AcmeInt_SOME_PLACE_AWESOME is an IntShop of type SOME_PLACE_AWESOME.
AcmeInt_SomewhereElse is an IntShop of type SomewhereElse.
AllNegativeBad is an AllNegative of type Bad.
AllNegativeGood is an AllNegative of type Good.
AllNegativeUgly is an AllNegative of type Ugly.
AllNegativeUnknown is an AllNegative of type Unknown.
AnimalCat is an Animal of type Cat.
AnimalDog is an Animal of type Dog.
AnimalFish is an Animal of type Fish.
AnimalFishPlusPlus is an Animal of type Fish++.
AnimalFishSharp is an Animal of type Fish#.
ColorBlack is a Color of type Black.
ColorBlue is a Color of type Blue.
ColorBlueGreen is a Color of type blue-green.
Green starts with 33.
ColorGrey is a Color of type grey.
ColorRed is a Color of type Red.
ColorRedOrange is a Color of type red-orange.
ColorRedOrangeBlue is a Color of type red-orange-blue.
ColorWhite is a Color of type White.
ColorYellow is a Color of type yellow.
ColorYellowGreen is a Color of type yellow_green.
Commented value 1.
CommentedValue2 is a Commented of type value2.
Commented value 3.
Commented value 1.
ComplexCommentedValue2 is a ComplexCommented of type value2.
Commented value 3.
表示模拟量.
表示数字量.
特殊寄存器, word, 10.
特殊继电器, bit, 10.
DiffBaseB10 is a DiffBase of type b10.
DiffBaseB11 is a DiffBase of type b11.
DiffBaseB3 is a DiffBase of type b3.
DiffBaseB4 is a DiffBase of type b4.
DiffBaseB5 is a DiffBase of type b5.
DiffBaseB6 is a DiffBase of type b6.
DiffBaseB7 is a DiffBase of type b7.
DiffBaseB8 is a DiffBase of type b8.
DiffBaseB9 is a DiffBase of type b9.
Enum32bitE2P15 is an Enum32bit of type E2P15.
Enum32bitE2P16 is an Enum32bit of type E2P16.
Enum32bitE2P17 is an Enum32bit of type E2P17.
Enum32bitE2P18 is an Enum32bit of type E2P18.
Enum32bitE2P19 is an Enum32bit of type E2P19.
Enum32bitE2P20 is an Enum32bit of type E2P20.
Enum32bitE2P21 is an Enum32bit of type E2P21.
Enum32bitE2P22 is an Enum32bit of type E2P22.
Enum32bitE2P23 is an Enum32bit of type E2P23.
Enum32bitE2P28 is an Enum32bit of type E2P28.
Enum32bitE2P30 is an Enum32bit of type E2P30.
Enum32bitUnkno is an Enum32bit of type Unkno.
Enum64bitE2P15 is an Enum64bit of type E2P15.
Enum64bitE2P16 is an Enum64bit of type E2P16.
Enum64bitE2P17 is an Enum64bit of type E2P17.
Enum64bitE2P18 is an Enum64bit of type E2P18.
Enum64bitE2P19 is an Enum64bit of type E2P19.
Enum64bitE2P20 is an Enum64bit of type E2P20.
Enum64bitE2P21 is an Enum64bit of type E2P21.
Enum64bitE2P22 is an Enum64bit of type E2P22.
Enum64bitE2P23 is an Enum64bit of type E2P23.
Enum64bitE2P28 is an Enum64bit of type E2P28.
Enum64bitE2P30 is an Enum64bit of type E2P30.
Enum64bitE2P31 is an Enum64bit of type E2P31.
Enum64bitE2P32 is an Enum64bit of type E2P32.
Enum64bitE2P33 is an Enum64bit of type E2P33.
Enum64bitE2P63 is an Enum64bit of type E2P63.
Enum64bitUnkno is an Enum64bit of type Unkno.
ForceLowerTypeBootNode is a ForceLowerType of type bootnode.
ForceLowerTypeDataSwap is a ForceLowerType of type dataswap.
ForceUpperTypeBootNode is a ForceUpperType of type BOOTNODE.
ForceUpperTypeDataSwap is a ForceUpperType of type DATASWAP.
MakeAudi is a Make of type Audi.
MakeBmw is a Make of type BMW.
MakeChevy is a Make of type Chevy.
MakeFord is a Make of type Ford.
MakeHyundai is a Make of type Hyundai.
MakeJaguar is a Make of type Jaguar.
MakeMercedesBenz is a Make of type Mercedes_Benz.
MakeNissan is a Make of type Nissan.
MakeTesla is a Make of type Tesla.
MakeToyota is a Make of type Toyota.
MakeVolkswagon is a Make of type Volkswagon.
NoZerosEnd is a NoZeros of type end.
NoZerosMiddle is a NoZeros of type middle.
NoZerosPpps is a NoZeros of type ppps.
NoZerosPps is a NoZeros of type pps.
NoZerosPs is a NoZeros of type ps.
NoZerosStart is a NoZeros of type start.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
StatusBad is a Status of type Bad.
StatusGood is a Status of type Good.
StatusUnknown is a Status of type Unknown.
SuffixGen is a Suffix of type gen.

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

X is doc'ed.

# Type aliases

@ENUM{ Unknown = -5, Good, Bad, Ugly }.
Animal x @ENUM(Name string){ Cat(_), Dog(Dog), Fish("Fish") FishPlusPlus("Fish++") FishSharp("Fish#") }.
Color is an enumeration of colors that are allowed.
Commented is an enumeration of commented values @ENUM{ value1 // Commented value 1 value2 value3 // Commented value 3 } */.
ComplexCommented has some extra complicated parsing rules.
DataType 数据类型 @EnumConfig(NoCamel) @Enum { AI = 0x0A // 表示模拟量 DI = 0x0D // 表示数字量 } */.
Device : protocol deveice @Enum(code int, isBit bool, str string, a int16) { SM(0x91, true, "123", 1) // 特殊继电器, bit, 10 SD(0xA9, false, "456", 2) // 特殊寄存器, word, 10 } */.
@EnumConfig(forcelower) @ENUM{ B3 = 03 B4 = 04 B5 = 5 B6 = 0b110 B7 = 0b111 B8 = 0x08 B9 = 0x09 B10 = 0x0B B11 = 0x2B } */.
@EnumConfig(values) @ENUM{ Unkno = 0 E2P15 = 32768 E2P16 = 65536 E2P17 = 131072 E2P18 = 262144 E2P19 = 524288 E2P20 = 1048576 E2P21 = 2097152 E2P22 = 33554432 E2P23 = 67108864 E2P28 = 536870912 E2P30 = 1073741824 } */.
@EnumConfig(values) @ENUM{ Unkno = 0 E2P15 = 32768 E2P16 = 65536 E2P17 = 131072 E2P18 = 262144 E2P19 = 524288 E2P20 = 1048576 E2P21 = 2097152 E2P22 = 33554432 E2P23 = 67108864 E2P28 = 536870912 E2P30 = 1073741824 E2P31 = 2147483648 E2P32 = 4294967296 E2P33 = 8454967296 E2P63 = 18446744073709551615 } */.
@EnumConfig(forcelower) @ENUM{ DataSwap, BootNode, }.
@EnumConfig(forceupper) @ENUM{ DataSwap, BootNode, }.
@EnumConfig(marshal, prefix="AcmeInt_", noprefix, nocamel, names) Shops @ENUM{ SOME_PLACE_AWESOME, SomewhereElse, LocationUnknown }.
Make x @ENUM{Toyota,_,Chevy,_,Ford,_,Tesla,_,Hyundai,_,Nissan,_,Jaguar,_,Audi,_,BMW,_,Mercedes_Benz,_,Volkswagon}.
Make x @ENUM{start=20,middle,end,ps,pps,ppps}.
@EnumConfig(prefix="AcmeInc") Products of AcmeInc @ENUM{ Anvil, Dynamite, Glue }.
@EnumConfig(sql, ptr, marshal, nocomments) @ENUM{pending, inWork, completed, rejected}.
@EnumConfig(sql, ptr, marshal, nocomments) @ENUM{pending, inWork, completed, rejected}.
@EnumConfig(sql, ptr, marshal, nocomments, sqlName=dbCode) @ENUM(dbCode int) { pending(0) inWork(10) completed(20) rejected(30) }.
@EnumConfig(marshal, prefix="AcmeInc_", noprefix, nocamel, names) Shops @ENUM{ SOME_PLACE_AWESOME, SomewhereElse, LocationUnknown }.
@ENUM{ Unknown = -1, Good, Bad }.
Suffix @ENUM{gen}.