grades

package
v0.0.0-...-055c53e Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GradeQuiz = GradeType("Quiz")
	GradeTest = GradeType("Test")
	GradeExam = GradeType("Exam")
)

Variables

This section is empty.

Functions

func CustomGenerator

func CustomGenerator()

func RegisterHandlers

func RegisterHandlers()

Types

type Grade

type Grade struct {
	Title string    `faker:"title"`
	Type  GradeType `faker:"gradetype"`
	Score float32   `faker:"boundary_start=0.00, boundary_end=100.00"`
}

type GradeType

type GradeType string

type Student

type Student struct {
	ID        int    `faker:"boundary_start=100, boundary_end=1000"`
	FirstName string `faker:"first_name"`
	LastName  string `faker:"last_name"`
	Grades    []Grade
}

func GetFaker

func GetFaker(num int) []Student

func (Student) Average

func (s Student) Average() float32

type Students

type Students []Student

func (Students) GetByID

func (ss Students) GetByID(id int) (*Student, error)

Jump to

Keyboard shortcuts

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