spell

package
v5.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// AllComparisonType holds all possible values.
	AllComparisonType = []ComparisonType{
		Name,
		Tag,
		College,
		CollegeCount,
		Any,
	}
)
View Source
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.

const (
	AllColleges MatchType = iota
	CollegeName
	PowerSource
	Spell
	LastMatchType = Spell
)

Possible values.

func ExtractMatchType

func ExtractMatchType(str string) MatchType

ExtractMatchType extracts the value from a string.

func (MatchType) EnsureValid

func (enum MatchType) EnsureValid() MatchType

EnsureValid ensures this is of a known value.

func (MatchType) Key

func (enum MatchType) Key() string

Key returns the key used in serialization.

func (MatchType) MarshalText

func (enum MatchType) MarshalText() (text []byte, err error)

MarshalText implements the encoding.TextMarshaler interface.

func (MatchType) String

func (enum MatchType) String() string

String implements fmt.Stringer.

func (*MatchType) UnmarshalText

func (enum *MatchType) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface.

Jump to

Keyboard shortcuts

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