study

package
v5.24.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2024 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Levels holds all possible values.

View Source
var Types = []Type{
	Self,
	Job,
	Teacher,
	Intensive,
}

Types holds all possible values.

Functions

This section is empty.

Types

type Level

type Level byte

Level holds the number of study hours required per point.

const (
	Standard Level = iota
	Level1
	Level2
	Level3
	Level4
)

Possible values.

const LastLevel Level = Level4

LastLevel is the last valid value.

func ExtractLevel

func ExtractLevel(str string) Level

ExtractLevel extracts the value from a string.

func (Level) EnsureValid

func (enum Level) EnsureValid() Level

EnsureValid ensures this is of a known value.

func (Level) Key

func (enum Level) Key() string

Key returns the key used in serialization.

func (Level) MarshalText

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

MarshalText implements the encoding.TextMarshaler interface.

func (Level) String

func (enum Level) String() string

String implements fmt.Stringer.

func (*Level) UnmarshalText

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

UnmarshalText implements the encoding.TextUnmarshaler interface.

type Type

type Type byte

Type holds the type of study.

const (
	Self Type = iota
	Job
	Teacher
	Intensive
)

Possible values.

const LastType Type = Intensive

LastType is the last valid value.

func ExtractType

func ExtractType(str string) Type

ExtractType extracts the value from a string.

func (Type) EnsureValid

func (enum Type) EnsureValid() Type

EnsureValid ensures this is of a known value.

func (Type) Key

func (enum Type) Key() string

Key returns the key used in serialization.

func (Type) Limitations

func (enum Type) Limitations() []string

Limitations returns a list of strings describing the limitations when doing this type of study.

func (Type) MarshalText

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

MarshalText implements the encoding.TextMarshaler interface.

func (Type) Multiplier

func (enum Type) Multiplier() fxp.Int

Multiplier returns the amount to multiply hours spent by for effective study hours.

func (Type) String

func (enum Type) String() string

String implements fmt.Stringer.

func (*Type) UnmarshalText

func (enum *Type) 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