Documentation ¶
Index ¶
- func RadixSliceContains(enums []Radix, sunEnums ...Radix) bool
- func RadixSliceContainsAny(enums []Radix, sunEnums ...Radix) bool
- type Radix
- func (i Radix) MarshalBinary() (data []byte, err error)
- func (i Radix) MarshalJSON() ([]byte, error)
- func (i Radix) MarshalText() ([]byte, error)
- func (i Radix) MarshalYAML() (any, error)
- func (i Radix) Registered() bool
- func (i *Radix) Scan(value any) error
- func (i Radix) String() string
- func (i *Radix) UnmarshalBinary(data []byte) error
- func (i *Radix) UnmarshalJSON(data []byte) error
- func (i *Radix) UnmarshalText(text []byte) error
- func (i *Radix) UnmarshalYAML(unmarshal func(any) error) error
- func (i Radix) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RadixSliceContains ¶
RadixSliceContains reports whether sunEnums is within enums.
func RadixSliceContainsAny ¶
RadixSliceContainsAny reports whether any sunEnum is within enums.
Types ¶
type Radix ¶
type Radix int // 进制
func ParseRadixString ¶
ParseRadixString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func (Radix) MarshalBinary ¶
MarshalBinary implements the encoding.BinaryMarshaler interface for Radix
func (Radix) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface for Radix
func (Radix) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for Radix
func (Radix) MarshalYAML ¶
MarshalYAML implements a YAML Marshaler for Radix
func (Radix) Registered ¶
IsARadix returns "true" if the value is listed in the enum definition. "false" otherwise
func (*Radix) UnmarshalBinary ¶
UnmarshalBinary implements the encoding.BinaryUnmarshaler interface for Radix
func (*Radix) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface for Radix
func (*Radix) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for Radix
func (*Radix) UnmarshalYAML ¶
UnmarshalYAML implements a YAML Unmarshaler for Radix