service

package
v0.0.0-...-57762c0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

func NewService

func NewService(dataStore db.DataStore) *Service

func (*Service) AddAccount

func (s *Service) AddAccount(account *models.Account) (int, error)

func (*Service) AddClass

func (s *Service) AddClass(class *models.Class) (int, error)

func (*Service) AddOrRemoveStudent

func (s *Service) AddOrRemoveStudent(id int, body map[string]interface{}) (int, error)

func (*Service) AddStudent

func (s *Service) AddStudent(student *models.Student) (int, error)

func (*Service) AddSubject

func (s *Service) AddSubject(subject *models.Subject) (int, error)

func (*Service) AddTeacher

func (s *Service) AddTeacher(teacher *models.Teacher) (int, error)

func (*Service) AssignClass

func (s *Service) AssignClass(id int, body map[string]int) (int, error)

func (*Service) AssignSubjectToStudent

func (s *Service) AssignSubjectToStudent(id int, body map[string]interface{}) (int, error)

func (*Service) AssignSubjectToTeacher

func (s *Service) AssignSubjectToTeacher(id int, body map[string]int) (int, error)

func (*Service) DeleteAccount

func (s *Service) DeleteAccount(id int) (string, error)

func (*Service) DeleteClass

func (s *Service) DeleteClass(id int) (string, error)

func (*Service) DeleteStudent

func (s *Service) DeleteStudent(id int) (string, error)

func (*Service) DeleteSubject

func (s *Service) DeleteSubject(id int) (string, error)

func (*Service) DeleteTeacher

func (s *Service) DeleteTeacher(id int) (string, error)

func (*Service) GetAccountByID

func (s *Service) GetAccountByID(id int) (*models.Account, error)

func (*Service) GetAccounts

func (s *Service) GetAccounts() ([]*models.Account, error)

func (*Service) GetClassByID

func (s *Service) GetClassByID(id int) (*models.Class, error)

func (*Service) GetClassOfTeacher

func (s *Service) GetClassOfTeacher(id int) (*models.Class, error)

func (*Service) GetClasses

func (s *Service) GetClasses() ([]*models.Class, error)

func (*Service) GetClassesOfStudent

func (s *Service) GetClassesOfStudent(id int) ([]*models.Class, error)

func (*Service) GetDefaultedStudentAccounts

func (s *Service) GetDefaultedStudentAccounts() ([]*models.Account, error)

func (*Service) GetStudentAccounts

func (s *Service) GetStudentAccounts() ([]*models.Account, error)

func (*Service) GetStudentByID

func (s *Service) GetStudentByID(id int) (*models.Student, error)

func (*Service) GetStudents

func (s *Service) GetStudents() ([]*models.Student, error)

func (*Service) GetStudentsOfClass

func (s *Service) GetStudentsOfClass(id int) ([]*models.Student, error)

func (*Service) GetStudentsOfSubject

func (s *Service) GetStudentsOfSubject(id int) ([]*models.Student, error)

func (*Service) GetStudentsOfTeacher

func (s *Service) GetStudentsOfTeacher(id int) ([]*models.Student, error)

func (*Service) GetSubjectByID

func (s *Service) GetSubjectByID(id int) (*models.Subject, error)

func (*Service) GetSubjects

func (s *Service) GetSubjects() ([]*models.Subject, error)

func (*Service) GetSubjectsOfClass

func (s *Service) GetSubjectsOfClass(id int) ([]*models.Subject, error)

func (*Service) GetSubjectsOfStudent

func (s *Service) GetSubjectsOfStudent(id int) ([]*models.Subject, error)

func (*Service) GetTeacherAccounts

func (s *Service) GetTeacherAccounts() ([]*models.Account, error)

func (*Service) GetTeacherByID

func (s *Service) GetTeacherByID(id int) (*models.Teacher, error)

func (*Service) GetTeacherOfSubject

func (s *Service) GetTeacherOfSubject(id int) (*models.Teacher, error)

func (*Service) GetTeachers

func (s *Service) GetTeachers() ([]*models.Teacher, error)

func (*Service) GetTeachersOfClass

func (s *Service) GetTeachersOfClass(id int) ([]*models.Teacher, error)

func (*Service) UpdateAccount

func (s *Service) UpdateAccount(account *models.Account) (int, error)

func (*Service) UpdateClassName

func (s *Service) UpdateClassName(id int, body map[string]string) (int, error)

func (*Service) UpdateGPA

func (s *Service) UpdateGPA(id int, body map[string]float64) (int, error)

func (*Service) UpdateStudentName

func (s *Service) UpdateStudentName(id int, body map[string]string) (int, error)

func (*Service) UpdateSubjectName

func (s *Service) UpdateSubjectName(id int, body map[string]string) (int, error)

func (*Service) UpdateTeacherName

func (s *Service) UpdateTeacherName(id int, body map[string]string) (int, error)

Jump to

Keyboard shortcuts

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