Documentation
¶
Index ¶
- Variables
- func CreateSchool(school school.School)
- func CreateStudent(student student.DBStudentUser) int
- func GetNextID() int
- func GetSchoolByID(id int) (school.School, error)
- func GetStudentByID(id int) student.DBStudentUser
- func GetStudentJWTForLogin(student student.DBStudentUser) *string
- func GetStudents() []student.DBStudentUser
- func InitDB()
- func UpdateSchool(school school.School)
- func UpdateStudent(student student.DBStudentUser)
- type Claims
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *mongo.Database
View Source
var Schools *mongo.Collection
View Source
var Students *mongo.Collection
Functions ¶
func CreateSchool ¶
func CreateStudent ¶
func CreateStudent(student student.DBStudentUser) int
func GetStudentByID ¶
func GetStudentByID(id int) student.DBStudentUser
func GetStudentJWTForLogin ¶
func GetStudentJWTForLogin(student student.DBStudentUser) *string
func GetStudents ¶
func GetStudents() []student.DBStudentUser
func UpdateSchool ¶
func UpdateStudent ¶
func UpdateStudent(student student.DBStudentUser)
Types ¶
type Claims ¶
type Claims struct { StudentID int `json:"student_id"` jwt.StandardClaims }
Click to show internal directories.
Click to hide internal directories.