Documentation ¶
Index ¶
- Constants
- Variables
- func Admin(c *fiber.Ctx) error
- func AdminLogin(c *fiber.Ctx) error
- func AuthenticateUser(c *fiber.Ctx, userType int) (bool, string)
- func CreateAdmin(c *fiber.Ctx) error
- func CreateContact(c *fiber.Ctx) error
- func CreateDefaultAdmin() models.Admin
- func DeleteContact(c *fiber.Ctx) error
- func Enroll(c *fiber.Ctx) error
- func GenerateID(length int) string
- func Logout(c *fiber.Ctx) error
- func NewSystem()
- func RegisterTeacher(c *fiber.Ctx) error
- func RemoveAdmin(c *fiber.Ctx) error
- func RemoveStudent(c *fiber.Ctx) error
- func RemoveTeacher(c *fiber.Ctx) error
- func Student(c *fiber.Ctx) error
- func StudentLogin(c *fiber.Ctx) error
- func Teacher(c *fiber.Ctx) error
- func TeacherLogin(c *fiber.Ctx) error
- func ValidateID(id string, userType int) bool
- func ValidatePEN(pen string) bool
- type Config
- type Request
Constants ¶
View Source
const (
MIME = "MIME-version: 1.0;\nContent-Type: text/html; charset=\"UTF-8\";\n\n"
)
Variables ¶
View Source
var AdminCollection *mongo.Collection = database.OpenCollection(database.Client, "admins")
View Source
var ContactCollection *mongo.Collection = database.OpenCollection(database.Client, "contacts")
View Source
var IdCollection *mongo.Collection = database.OpenCollection(database.Client, "cids")
View Source
var ImageCollection *mongo.Collection = database.OpenCollection(database.Client, "images")
View Source
var LockerCollection *mongo.Collection = database.OpenCollection(database.Client, "lockers")
View Source
var SecretKey = os.Getenv("secret")
View Source
var StudentCollection *mongo.Collection = database.OpenCollection(database.Client, "students")
View Source
var TeacherCollection *mongo.Collection = database.OpenCollection(database.Client, "teachers")
Functions ¶
func AdminLogin ¶
func AdminLogin(c *fiber.Ctx) error
func AuthenticateUser ¶
func CreateAdmin ¶
func CreateAdmin(c *fiber.Ctx) error
func CreateContact ¶
func CreateContact(c *fiber.Ctx) error
func CreateDefaultAdmin ¶
func DeleteContact ¶
func DeleteContact(c *fiber.Ctx) error
func GenerateID ¶
func RegisterTeacher ¶
func RegisterTeacher(c *fiber.Ctx) error
func RemoveAdmin ¶
func RemoveAdmin(c *fiber.Ctx) error
func RemoveStudent ¶
func RemoveStudent(c *fiber.Ctx) error
func RemoveTeacher ¶
func RemoveTeacher(c *fiber.Ctx) error
func StudentLogin ¶
func StudentLogin(c *fiber.Ctx) error
func TeacherLogin ¶
func TeacherLogin(c *fiber.Ctx) error
func ValidateID ¶
func ValidatePEN ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.