priority

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 (
	//OrdNormal is the order number for the normal priority.
	OrdNormal ord = iota
	//OrdSecondary is the order number for the secondary priority.
	OrdSecondary
	//OrdMain is the order number for the main priority.
	OrdMain
)
View Source
const MaxNum = uint8(MaxOrd)

MaxNum is the maximal number value for order number.

View Source
const MaxOrd = OrdMain

MaxOrd is the maximal order number.

Variables

This section is empty.

Functions

This section is empty.

Types

type Priority

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

Priority represents priority enum.

func FromNum

func FromNum(val uint8) Priority

FromNum returns Priority for the given number.

func FromOrd

func FromOrd(ordNum ord) Priority

FromOrd returns the priority for the given order number.

func (Priority) MarshalJSON

func (priority Priority) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (Priority) Ord

func (priority Priority) Ord() uint8

Ord returns the order number.

func (*Priority) UnmarshalJSON

func (priority *Priority) 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