Documentation
¶
Index ¶
- Variables
- func AddCourse(newCourse *Course) error
- func AddRecord(newRecord *Record) error
- func AddStudent(newStudent *Student) error
- func AddStudentCourse(newGrade *StudentCourse) error
- func CheckFiles()
- func CourseIndexByID(id uint) int
- func CourseIndexByName(name string) int
- func CourseIndexbyName(name string) int
- func CoursesNames() []string
- func CreateDatabase() error
- func Delete(i Deleter) error
- func EditCourse(id uint, newGrade Course) error
- func EditGradeByStruct(g *Course, newGrade Course) error
- func EditStudent(id uint, newStudent Student) error
- func EditStudentByStruct(s *Student, newStudent Student) error
- func EditStudentCourse(id uint, newStudentGrade StudentCourse) error
- func LoadCourses() error
- func LoadEverything()
- func LoadFiles()
- func LoadRecords() error
- func LoadStudentCourses() error
- func LoadStudents() error
- func OpenDB() *gorm.DB
- func RecordIndexByID(id uint) int
- func RecordIndexByName(name string) int
- func StudentCourseIndexByID(id uint) int
- func StudentDNIs() []string
- func StudentIDs() []uint
- func StudentIndexByDNI(dni string) int
- func StudentIndexByID(id uint) int
- func StudentIndexByName(name string) int
- type Course
- type Deleter
- type Record
- type Student
- func (s Student) AddCourse(newGrade *StudentCourse) error
- func (s Student) AddRecord(newRecord *Record) error
- func (s Student) CourseIndexByName(name string) int
- func (s Student) CourseNames() []string
- func (s *Student) Courses()
- func (s Student) Delete() error
- func (s *Student) DeleteRecord(id uint) error
- func (s *Student) Edit(newStudent *Student) error
- func (s *Student) Records()
- type StudentCourse
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ConfDir = conf.GetConfDir()
)
View Source
var Courses []Course
View Source
var DB *gorm.DB
View Source
var Records []Record
View Source
var StudentCourses []StudentCourse
View Source
var Students []Student
Functions ¶
func AddStudent ¶
func AddStudentCourse ¶
func AddStudentCourse(newGrade *StudentCourse) error
func CheckFiles ¶
func CheckFiles()
func CourseIndexByID ¶
func CourseIndexByName ¶
func CourseIndexbyName ¶
func CoursesNames ¶
func CoursesNames() []string
func CreateDatabase ¶
func CreateDatabase() error
func EditCourse ¶
func EditGradeByStruct ¶
func EditStudent ¶
func EditStudentByStruct ¶
func EditStudentCourse ¶
func EditStudentCourse(id uint, newStudentGrade StudentCourse) error
func LoadCourses ¶
func LoadCourses() error
func LoadEverything ¶
func LoadEverything()
func LoadRecords ¶
func LoadRecords() error
func LoadStudentCourses ¶
func LoadStudentCourses() error
func LoadStudents ¶
func LoadStudents() error
func RecordIndexByID ¶
func RecordIndexByName ¶
func StudentCourseIndexByID ¶
func StudentDNIs ¶
func StudentDNIs() []string
func StudentIDs ¶
func StudentIDs() []uint
func StudentIndexByDNI ¶
func StudentIndexByID ¶
func StudentIndexByName ¶
Types ¶
type Course ¶
func CourseByName ¶
type Student ¶
type Student struct { gorm.Model Name string Age uint DNI string PhoneNumber string ImageFilePath string StudentCourses []StudentCourse `gorm:"-"` StudentRecords []Record `gorm:"-"` }
func (Student) AddCourse ¶
func (s Student) AddCourse(newGrade *StudentCourse) error
func (Student) CourseIndexByName ¶
Note: This is extremely slow.
func (Student) CourseNames ¶
func (*Student) DeleteRecord ¶
type StudentCourse ¶
func (StudentCourse) Delete ¶
func (s StudentCourse) Delete() error
func (*StudentCourse) Edit ¶
func (s *StudentCourse) Edit(nSG *StudentCourse) error
Click to show internal directories.
Click to hide internal directories.