Documentation ¶
Index ¶
- Variables
- type ComparisonType
- func (enum ComparisonType) EnsureValid() ComparisonType
- func (enum ComparisonType) Key() string
- func (enum ComparisonType) MarshalText() (text []byte, err error)
- func (enum ComparisonType) String() string
- func (enum *ComparisonType) UnmarshalText(text []byte) error
- func (enum ComparisonType) UsesStringCriteria() bool
- type MatchType
Constants ¶
This section is empty.
Variables ¶
var ( // AllComparisonType holds all possible values. AllComparisonType = []ComparisonType{ Name, Tag, College, CollegeCount, Any, } )
var ( // AllMatchType holds all possible values. AllMatchType = []MatchType{ AllColleges, CollegeName, PowerSource, Spell, } )
Functions ¶
This section is empty.
Types ¶
type ComparisonType ¶
type ComparisonType byte
ComparisonType holds the type of a comparison.
const ( Name ComparisonType = iota Tag College CollegeCount Any LastComparisonType = Any )
Possible values.
func ExtractComparisonType ¶
func ExtractComparisonType(str string) ComparisonType
ExtractComparisonType extracts the value from a string.
func (ComparisonType) EnsureValid ¶
func (enum ComparisonType) EnsureValid() ComparisonType
EnsureValid ensures this is of a known value.
func (ComparisonType) Key ¶
func (enum ComparisonType) Key() string
Key returns the key used in serialization.
func (ComparisonType) MarshalText ¶
func (enum ComparisonType) MarshalText() (text []byte, err error)
MarshalText implements the encoding.TextMarshaler interface.
func (ComparisonType) String ¶
func (enum ComparisonType) String() string
String implements fmt.Stringer.
func (*ComparisonType) UnmarshalText ¶
func (enum *ComparisonType) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface.
func (ComparisonType) UsesStringCriteria ¶
func (enum ComparisonType) UsesStringCriteria() bool
UsesStringCriteria returns true if the comparison uses a string value.
type MatchType ¶
type MatchType byte
MatchType holds the type of a match.
Possible values.
func ExtractMatchType ¶
ExtractMatchType extracts the value from a string.
func (MatchType) EnsureValid ¶
EnsureValid ensures this is of a known value.
func (MatchType) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface.
func (*MatchType) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface.