Documentation
¶
Index ¶
- func DeleteSlots(name string) error
- func DeleteUser(name string) error
- func GetUserType(name string) (string, error)
- func InsertSlot(slot Slot) error
- func InsertUser(user User) error
- func IsValidDay(day string) error
- func IsValidPeriod(start, end uint) error
- func ParseSchedule(c *gin.Context) ([]string, error)
- func ScheduleRetrieval(c *gin.Context)
- func ScheduleRetrieve(router *gin.RouterGroup)
- func SetupRoutes() *gin.Engine
- func SlotCreate(router *gin.RouterGroup)
- func SlotCreation(c *gin.Context)
- func SlotDelete(router *gin.RouterGroup)
- func SlotDeletion(c *gin.Context)
- func SlotRetrieval(c *gin.Context)
- func SlotRetrievalAll(c *gin.Context)
- func SlotRetrieve(router *gin.RouterGroup)
- func SlotRetrieveAll(router *gin.RouterGroup)
- func StartDataBase() *gorm.DB
- func UpdateUser(new User) error
- func UserDelete(router *gin.RouterGroup)
- func UserDeletion(c *gin.Context)
- func UserModification(c *gin.Context)
- func UserRegister(router *gin.RouterGroup)
- func UserRegistration(c *gin.Context)
- func UserRetrieval(c *gin.Context)
- func UserRetrieve(router *gin.RouterGroup)
- func UserUpdate(router *gin.RouterGroup)
- type ScheduleInput
- type Slot
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteSlots ¶
func DeleteUser ¶
func GetUserType ¶
func InsertSlot ¶
func InsertUser ¶
func IsValidDay ¶
func IsValidPeriod ¶
func ScheduleRetrieve ¶
func ScheduleRetrieve(router *gin.RouterGroup)
func SetupRoutes ¶
func SlotCreate ¶
func SlotCreate(router *gin.RouterGroup)
func SlotDelete ¶
func SlotDelete(router *gin.RouterGroup)
func SlotDeletion ¶
/slots/:name DELETE Deletes all slots of a user, could be improved
func SlotRetrieve ¶
func SlotRetrieve(router *gin.RouterGroup)
func SlotRetrieveAll ¶
func SlotRetrieveAll(router *gin.RouterGroup)
func StartDataBase ¶
func UpdateUser ¶
func UserDelete ¶
func UserDelete(router *gin.RouterGroup)
func UserRegister ¶
func UserRegister(router *gin.RouterGroup)
func UserRetrieve ¶
func UserRetrieve(router *gin.RouterGroup)
func UserUpdate ¶
func UserUpdate(router *gin.RouterGroup)
Types ¶
type ScheduleInput ¶
type ScheduleInput struct { Candidate string `json:"candidate" binding:"required"` Interviewers string `json:"interviewers" binding:"required"` }
Main feature Model, scheduling a candidate with one or more interviewers (split by ",")
type Slot ¶
type Slot struct { ID uint `json:"id" gorm:"primary_key"` Name string `json:"name" binding:"required"` WeekNumber uint `json:"week" binding:"required"` Day string `json:"day" binding:"required"` HourStart uint `json:"hour_start" binding:"required"` HourEnd uint `json:"hour_end" binding:"required"` }
Slot model. WeekNumber as the name implies is the number of the week in a year (1 to 53), leaving the better representation to the front-end.
func GetAllSlots ¶
func GetSchedule ¶
Lists all possible slots between a candidate and one or more interviewers.
func GetSlotUser ¶
type User ¶
type User struct { ID uint `json:"id" gorm:"primary_key"` Name string `json:"name" binding:"required"` Mail string `json:"mail" binding:"required"` Type string `json:"type" binding:"required"` }
Simple user model, type is either "candidate" or "interviewer".
Click to show internal directories.
Click to hide internal directories.