Documentation
¶
Index ¶
- func CheckBookStatus(db *pgx.Conn, bookID string) (bool, error)
- func CheckDate(db *pgx.Conn, borrowID string) (int, error)
- func CheckDebit(db *pgx.Conn, studentID string) (bool, error)
- func CheckEmployeeMailExist(db *pgx.Conn, mail string) (bool, error)
- func CheckExtend(db *pgx.Conn, borrowID string) (bool, error)
- func CheckIdValue(db *pgx.Conn, tableName, columnName, idValue string) (bool, error)
- func CheckLimit(db *pgx.Conn, studentID string) (bool, error)
- func CheckMailValid(email string) bool
- func CheckStudentBanStatus(db *pgx.Conn, email string) (bool, error)
- func CheckStudentMailExist(db *pgx.Conn, mail string) (bool, error)
- func DecryptPassword(hashedPassword, password string) error
- func EncryptPassword(password string) (string, error)
- func GenerateEmployeeJWT(employeeID string) (string, error)
- func GeneratePasswordResetToken(studentID string) (string, error)
- func GenerateStudentJWT(studentID string) (string, error)
- func GenerateUniqueID() string
- func SendPasswordResetEmail(email, token string) error
- func UpdateDebit(db *pgx.Conn, studentID string, additionalDebit int) error
- func UpdateExtend(db *pgx.Conn, borrowID string) (bool, error)
- func UpdateLimit(db *pgx.Conn, studentID string, updateType string) error
- func ValidatePasswordResetToken(tokenString string) (string, error)
- type EmployeeClaims
- type ResetPasswordClaims
- type StudentClaims
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckBookStatus ¶
func CheckDebit ¶
func CheckEmployeeMailExist ¶
func CheckExtend ¶
func CheckIdValue ¶
func CheckLimit ¶
func CheckMailValid ¶
func CheckStudentBanStatus ¶
func CheckStudentMailExist ¶
func DecryptPassword ¶
func EncryptPassword ¶
func GenerateEmployeeJWT ¶
func GenerateStudentJWT ¶
func GenerateUniqueID ¶
func GenerateUniqueID() string
func SendPasswordResetEmail ¶
func UpdateDebit ¶
func UpdateExtend ¶
func UpdateLimit ¶
Types ¶
type EmployeeClaims ¶
type EmployeeClaims struct { EmployeeID string `json:"employee_id"` jwt.StandardClaims }
func ValidateEmployeeJWT ¶
func ValidateEmployeeJWT(tokenString string) (*EmployeeClaims, error)
type ResetPasswordClaims ¶
type ResetPasswordClaims struct { StudentID string `json:"student_id"` jwt.StandardClaims }
type StudentClaims ¶
type StudentClaims struct { StudentID string `json:"student_id"` jwt.StandardClaims }
func ValidateStudentJWT ¶
func ValidateStudentJWT(tokenString string) (*StudentClaims, error)
Source Files
¶
- checkBookStatus.go
- checkDate.go
- checkDebit.go
- checkEmployeeMailExist.go
- checkExtend.go
- checkIdValue.go
- checkLimit.go
- checkMailValid.go
- checkStudentBanStatus.go
- checkStudentMailExist.go
- decryptPassword.go
- encryptPassword.go
- generateUniqueID.go
- jwtUtils.go
- resetPassword.go
- updateDebit.go
- updateExtend.go
- updateLimit.go
Click to show internal directories.
Click to hide internal directories.