rating

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 (
	Ord0 ord = iota
	Ord1
	Ord2
	Ord3
	Ord4
	Ord5
	Ord6
	Ord7
	Ord8
	Ord9
	Ord10
	Ord11
	Ord12
	Ord13
	Ord14
	Ord15
)

Ords are the availible order numbers.

View Source
const MaxNum = uint8(MaxOrd)

MaxNum is the maximal number value for order number.

View Source
const MaxOrd = Ord15

MaxOrd is the maximal order number.

Variables

This section is empty.

Functions

This section is empty.

Types

type Rating

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

Rating represents rating enum.

func FromNum

func FromNum(val uint8) Rating

FromNum returns Rating for the given number.

func FromOrd

func FromOrd(ordNum ord) Rating

FromOrd returns Rating for the given order number.

func (Rating) MarshalJSON

func (rating Rating) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (Rating) Ord

func (rating Rating) Ord() uint8

Ord returns the order number.

func (*Rating) UnmarshalJSON

func (rating *Rating) 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