Documentation ¶
Index ¶
- func AddCourse(w http.ResponseWriter, r *http.Request)
- func AddStudent(w http.ResponseWriter, r *http.Request)
- func AddTeacher(w http.ResponseWriter, r *http.Request)
- func CourseIdExists(id int64) bool
- func CreateDB()
- func DBAddCourse(c Course) bool
- func DBDeleteCourse(cid int64) bool
- func DBUpdateCourse(cid int64, c Course) error
- func DeleteCourse(w http.ResponseWriter, r *http.Request)
- func DeleteStudent(w http.ResponseWriter, r *http.Request)
- func DeleteTeacher(w http.ResponseWriter, r *http.Request)
- func FindStudentByStatus(w http.ResponseWriter, r *http.Request)
- func FindTeacherByStatus(w http.ResponseWriter, r *http.Request)
- func GetCourseById(w http.ResponseWriter, r *http.Request)
- func GetOverview(w http.ResponseWriter, r *http.Request)
- func GetStudentById(w http.ResponseWriter, r *http.Request)
- func GetTeacherById(w http.ResponseWriter, r *http.Request)
- func Index(w http.ResponseWriter, r *http.Request)
- func IndexFromId(id int64) int
- func Logger(inner http.Handler, name string) http.Handler
- func NewRouter() *mux.Router
- func UpdateCourse(w http.ResponseWriter, r *http.Request)
- func UpdateStudent(w http.ResponseWriter, r *http.Request)
- func UpdateTeacher(w http.ResponseWriter, r *http.Request)
- func UploadStudentPhoto(w http.ResponseWriter, r *http.Request)
- func UploadTeacherPhoto(w http.ResponseWriter, r *http.Request)
- type Course
- type Database
- type Route
- type Routes
- type Student
- type Teacher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddStudent ¶
func AddStudent(w http.ResponseWriter, r *http.Request)
func AddTeacher ¶
func AddTeacher(w http.ResponseWriter, r *http.Request)
func CourseIdExists ¶
func DBAddCourse ¶
func DBDeleteCourse ¶
func DBUpdateCourse ¶
func DeleteCourse ¶
func DeleteCourse(w http.ResponseWriter, r *http.Request)
func DeleteStudent ¶
func DeleteStudent(w http.ResponseWriter, r *http.Request)
func DeleteTeacher ¶
func DeleteTeacher(w http.ResponseWriter, r *http.Request)
func FindStudentByStatus ¶
func FindStudentByStatus(w http.ResponseWriter, r *http.Request)
func FindTeacherByStatus ¶
func FindTeacherByStatus(w http.ResponseWriter, r *http.Request)
func GetCourseById ¶
func GetCourseById(w http.ResponseWriter, r *http.Request)
func GetOverview ¶
func GetOverview(w http.ResponseWriter, r *http.Request)
func GetStudentById ¶
func GetStudentById(w http.ResponseWriter, r *http.Request)
func GetTeacherById ¶
func GetTeacherById(w http.ResponseWriter, r *http.Request)
func IndexFromId ¶
func UpdateCourse ¶
func UpdateCourse(w http.ResponseWriter, r *http.Request)
func UpdateStudent ¶
func UpdateStudent(w http.ResponseWriter, r *http.Request)
func UpdateTeacher ¶
func UpdateTeacher(w http.ResponseWriter, r *http.Request)
func UploadStudentPhoto ¶
func UploadStudentPhoto(w http.ResponseWriter, r *http.Request)
func UploadTeacherPhoto ¶
func UploadTeacherPhoto(w http.ResponseWriter, r *http.Request)
Types ¶
type Route ¶
type Route struct { Name string Method string Pattern string HandlerFunc http.HandlerFunc }
type Student ¶
type Student struct { Id int64 `json:"id,omitempty"` Username string `json:"username,omitempty"` FirstName string `json:"firstName,omitempty"` LastName string `json:"lastName,omitempty"` Email string `json:"email,omitempty"` Password string `json:"password,omitempty"` Phone string `json:"phone,omitempty"` Course *Course `json:"course,omitempty"` PhotoUrls []string `json:"photoUrls,omitempty"` // student status Status string `json:"status,omitempty"` }
type Teacher ¶
type Teacher struct { Id int64 `json:"id,omitempty"` Username string `json:"username,omitempty"` FirstName string `json:"firstName,omitempty"` LastName string `json:"lastName,omitempty"` Email string `json:"email,omitempty"` Password string `json:"password,omitempty"` Phone string `json:"phone,omitempty"` Courses []Course `json:"courses,omitempty"` PhotoUrls []string `json:"photoUrls,omitempty"` // teacher status Status string `json:"status,omitempty"` }
Click to show internal directories.
Click to hide internal directories.