level

package
v0.0.0-...-e46c3b8 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2021 License: GPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//OrdNotSelected is the order number for not selected level.
	OrdNotSelected ord = iota
	//OrdBeginner is the order number for the beginner level.
	OrdBeginner
	//OrdIntermediate is the order number for the intermediate level.
	OrdIntermediate
	//OrdAdvanced is the order number for the advanced level.
	OrdAdvanced
	//OrdMaster is the order number for the master level.
	OrdMaster
)
View Source
const MaxNum = uint8(MaxOrd)

MaxNum is the maximal number value for order number.

View Source
const MaxOrd = OrdMaster

MaxOrd is the maximal order number.

Variables

This section is empty.

Functions

This section is empty.

Types

type Level

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

Level represents level enum.

func FromNum

func FromNum(val uint8) Level

FromNum returns Level for the given number.

func FromOrd

func FromOrd(ordNum ord) Level

FromOrd returns the level for the given order number.

func (Level) MarshalJSON

func (level Level) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (Level) Ord

func (level Level) Ord() uint8

Ord returns the order number.

func (*Level) UnmarshalJSON

func (level *Level) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

Jump to

Keyboard shortcuts

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