Documentation
¶
Index ¶
- Constants
- func Auth() gin.HandlerFunc
- func Connect(connectionString string) (*gorm.DB, error)
- func GenerateJWT(email string, username string) (tokenString string, err error)
- func Migrate(instance *gorm.DB) error
- type Calificativ
- type Clasa
- type Exam
- type Exercitiu
- type JWTClaim
- type Materie
- type Profesor
- type Student
- type User
- type Varianta
Constants ¶
View Source
const ( UsernameKey = "username" EmailKey = "email" )
View Source
const ( Matematica Materie = "Matematica" Biologie = "Biologie" Fizica = "Fizica" )
View Source
const ( A Varianta = "A" B = "B" C = "C" D = "D" )
Variables ¶
This section is empty.
Functions ¶
func Auth ¶
func Auth() gin.HandlerFunc
Types ¶
type Calificativ ¶
type Clasa ¶
type Clasa struct { Nume string `gorm:"primarykey" json:"nume"` ProfMate string `gorm:"foreignkey" json:"prof_mate"` ProfFizica string `gorm:"foreignkey" json:"prof_fizica"` ProfBio string `gorm:"foreignkey" json:"prof_bio"` ProfRomana string `gorm:"foreignkey" json:"prof_romana"` ProfEngleza string `gorm:"foreignkey" json:"prof_engleza"` }
type JWTClaim ¶
type JWTClaim struct { Username string `json:"username"` Email string `json:"email"` jwt.StandardClaims }
func ValidateToken ¶
type Student ¶
type Student struct { User Absent bool `json:"absent"` Clasa string `gorm:"foreignkey" json:"clasa"` ExamStiinta string `gorm:"foreignkey" json:"exam_stiinta"` ExamLimba string `gorm:"foreignkey" json:"exam_limba"` }
func NewStudent ¶
Click to show internal directories.
Click to hide internal directories.