Documentation
¶
Index ¶
- Variables
- func HandleDeleteAnswer(w http.ResponseWriter, r *http.Request)
- func HandleDeleteExpectations(w http.ResponseWriter, r *http.Request)
- func HandleDeleteRecommendations(w http.ResponseWriter, r *http.Request)
- func HandleDeleteStudent(w http.ResponseWriter, r *http.Request)
- func HandleGetAdminProfile(w http.ResponseWriter, r *http.Request)
- func HandleGetAlternatives(w http.ResponseWriter, r *http.Request)
- func HandleGetExpectations(w http.ResponseWriter, r *http.Request)
- func HandleGetExpectationsStatus(w http.ResponseWriter, r *http.Request)
- func HandleGetIncompleteQuestionnareSettings(w http.ResponseWriter, r *http.Request)
- func HandleGetQuesionnareStatus(w http.ResponseWriter, r *http.Request)
- func HandleGetQuestionnareSettings(w http.ResponseWriter, r *http.Request)
- func HandleGetQuestions(w http.ResponseWriter, r *http.Request)
- func HandleGetRecommendationStudent(w http.ResponseWriter, r *http.Request)
- func HandleGetRecommendations(w http.ResponseWriter, r *http.Request)
- func HandleGetRecommendationsStudent(w http.ResponseWriter, r *http.Request)
- func HandleGetSchool(w http.ResponseWriter, r *http.Request)
- func HandleGetSchools(w http.ResponseWriter, r *http.Request)
- func HandleGetStatistics(w http.ResponseWriter, r *http.Request)
- func HandleGetStudent(w http.ResponseWriter, r *http.Request)
- func HandleGetStudentProfile(w http.ResponseWriter, r *http.Request)
- func HandleGetStudents(w http.ResponseWriter, r *http.Request)
- func HandleGetWeights(w http.ResponseWriter, r *http.Request)
- func HandlePatchAdminChangePassword(w http.ResponseWriter, r *http.Request)
- func HandlePatchAdminProfile(w http.ResponseWriter, r *http.Request)
- func HandlePatchExpectations(w http.ResponseWriter, r *http.Request)
- func HandlePatchStudent(w http.ResponseWriter, r *http.Request)
- func HandlePatchStudentChangePassword(w http.ResponseWriter, r *http.Request)
- func HandlePatchStudentProfile(w http.ResponseWriter, r *http.Request)
- func HandlePostAnswers(w http.ResponseWriter, r *http.Request)
- func HandlePostExpectations(w http.ResponseWriter, r *http.Request)
- func HandlePostLogin(w http.ResponseWriter, r *http.Request)
- func HandlePostQuestionnareSettings(w http.ResponseWriter, r *http.Request)
- func HandlePostRegisterStudent(w http.ResponseWriter, r *http.Request)
- func HandlePostStudent(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
var CodeToText = map[string]string{
"JLP": "Jumlah lapangan pekerjaan lebih penting",
"GAJ": "Gaji lebih penting",
"PEW": "Peluang wirausaha lebih penting",
"MIN": "Minat lebih penting",
"FAS": "Fasilitas pendukung lebih penting",
}
Functions ¶
func HandleDeleteAnswer ¶
func HandleDeleteAnswer(w http.ResponseWriter, r *http.Request)
HandleDeleteAnswer godoc
@Summary Delete student questionnare answer @Description Delete student questionnare answer @Tags Questionnare @Tags Student @Accept json @Produce json @Param Authorization header string true "Insert your access token" default(Bearer <Add access token here>) @Success 201 {object} httpx.MessageJsonResponse @Failure 400 {object} httpx.ErrorJsonResponse @Failure 500 {object} httpx.ErrorJsonResponse @Router /questionnare/answers [delete]
func HandleDeleteExpectations ¶ added in v1.1.0
func HandleDeleteExpectations(w http.ResponseWriter, r *http.Request)
func HandleDeleteRecommendations ¶
func HandleDeleteRecommendations(w http.ResponseWriter, r *http.Request)
HandleDeleteRecommendations godoc
@Summary Delete recommendation for a student @Description Delete recommendation for a student @Tags Recommendations @Tags Admin @Accept json @Produce json @Param Authorization header string true "Insert your access token" default(Bearer <Add access token here>) @Param body body schemas.DeleteRecommendationRequest true "Delete student recommendation request body" @Success 201 {object} httpx.MessageJsonResponse @Failure 400 {object} httpx.ErrorJsonResponse @Failure 500 {object} httpx.ErrorJsonResponse @Router /recommendations [delete]
func HandleDeleteStudent ¶
func HandleDeleteStudent(w http.ResponseWriter, r *http.Request)
HandleDeleteStudent godoc
@Summary Delete a student @Description Delete a student from a school @Tags Students @Tags Admin @Accept json @Produce json @Param Authorization header string true "Insert your access token" default(Bearer <Add access token here>) @Param body body schemas.DeleteStudentRequest true "Delete student request body" @Success 201 {object} httpx.MessageJsonResponse @Failure 400 {object} httpx.ErrorJsonResponse @Failure 500 {object} httpx.ErrorJsonResponse @Router /students [delete]
func HandleGetAdminProfile ¶ added in v1.1.0
func HandleGetAdminProfile(w http.ResponseWriter, r *http.Request)
HandleGetAdminProfile godoc
@Summary Get admin profile @Description Get admin profile @Tags Admin @Accept json @Produce json @Param Authorization header string true "Insert your access token" default(Bearer <Add access token here>) @Success 200 {object} httpx.DataJsonResponse{data=schemas.Admin} @Failure 400 {object} httpx.ErrorJsonResponse @Failure 404 {object} httpx.ErrorJsonResponse @Failure 500 {object} httpx.ErrorJsonResponse @Router /admin/profile [get]
func HandleGetAlternatives ¶
func HandleGetAlternatives(w http.ResponseWriter, r *http.Request)
HandleGetAlternatives godoc
@Summary Get alternatives @Description Get all alternatives @Tags Common @Accept json @Produce json @Success 200 {object} httpx.DataJsonResponse{data=[]schemas.Alternative} @Failure 500 {object} httpx.ErrorJsonResponse @Router /alternatives [get]
func HandleGetExpectations ¶ added in v1.1.0
func HandleGetExpectations(w http.ResponseWriter, r *http.Request)
func HandleGetExpectationsStatus ¶ added in v1.1.0
func HandleGetExpectationsStatus(w http.ResponseWriter, r *http.Request)
func HandleGetIncompleteQuestionnareSettings ¶
func HandleGetIncompleteQuestionnareSettings(w http.ResponseWriter, r *http.Request)
HandleGetIncompleteQuestionnareSettings godoc
@Summary Get incomplete questionnare settings @Description Get incomplete questionnare settings @Tags Questionnare @Tags Admin @Accept json @Produce json @Param Authorization header string true "Insert your access token" default(Bearer <Add access token here>) @Success 200 {object} httpx.DataJsonResponse{data=[]schemas.QuestionnareSettingAlternative} @Failure 400 {object} httpx.ErrorJsonResponse @Failure 500 {object} httpx.ErrorJsonResponse @Router /questionnare/settings/incomplete [get]
func HandleGetQuesionnareStatus ¶
func HandleGetQuesionnareStatus(w http.ResponseWriter, r *http.Request)
HandleGetQuesionnareStatus godoc
@Summary Get questionnare status @Description Get questionnare status @Tags Questionnare @Tags Student @Accept json @Produce json @Param Authorization header string true "Insert your access token" default(Bearer <Add access token here>) @Success 200 {object} httpx.DataJsonResponse{data=schemas.QuestionnareStatusResponse} @Failure 400 {object} httpx.ErrorJsonResponse @Failure 500 {object} httpx.ErrorJsonResponse @Router /questionnare/status [get]
func HandleGetQuestionnareSettings ¶
func HandleGetQuestionnareSettings(w http.ResponseWriter, r *http.Request)
HandleGetQuestionnareSettings godoc
@Summary Get questionnare settings @Description Get questionnare settings @Tags Questionnare @Tags Admin @Accept json @Produce json @Param Authorization header string true "Insert your access token" default(Bearer <Add access token here>) @Success 200 {object} httpx.DataJsonResponse{data=[]schemas.QuestionnareSettingAlternative} @Failure 400 {object} httpx.ErrorJsonResponse @Failure 500 {object} httpx.ErrorJsonResponse @Router /questionnare/settings [get]
func HandleGetQuestions ¶
func HandleGetQuestions(w http.ResponseWriter, r *http.Request)
HandleGetQuestions godoc
@Summary Get Questions @Description Get all available questions @Tags Questionnare @Tags Student @Accept json @Produce json @Param Authorization header string true "Insert your access token" default(Bearer <Add access token here>) @Success 200 {object} httpx.DataJsonResponse{data=[]schemas.QuestionResponse} @Failure 400 {object} httpx.ErrorJsonResponse @Failure 500 {object} httpx.ErrorJsonResponse @Router /questionnare/questions [get]
func HandleGetRecommendationStudent ¶
func HandleGetRecommendationStudent(w http.ResponseWriter, r *http.Request)
HandleGetRecommendationStudent godoc
@Summary Get student recommendations details @Description Get student recommendations details @Tags Recommendations @Tags Admin @Accept json @Produce json @Param Authorization header string true "Insert your access token" default(Bearer <Add access token here>) @Param studentId path string true "Id student" @Success 200 {object} httpx.DataJsonResponse{data=schemas.Recommendation} @Failure 400 {object} httpx.ErrorJsonResponse @Failure 404 {object} httpx.ErrorJsonResponse @Failure 500 {object} httpx.ErrorJsonResponse @Router /recommendations/student/{studentId} [get]
func HandleGetRecommendations ¶
func HandleGetRecommendations(w http.ResponseWriter, r *http.Request)
HandleGetRecommendations godoc
@Summary Get all students recommendations @Description Get all students recommendations @Tags Recommendations @Tags Admin @Accept json @Produce json @Param Authorization header string true "Insert your access token" default(Bearer <Add access token here>) @Success 200 {object} httpx.DataJsonResponse{data=[]schemas.StudentRecommendation} @Failure 400 {object} httpx.ErrorJsonResponse @Failure 500 {object} httpx.ErrorJsonResponse @Router /recommendations [get]
func HandleGetRecommendationsStudent ¶
func HandleGetRecommendationsStudent(w http.ResponseWriter, r *http.Request)
HandleGetRecommendationsStudent godoc
@Summary Get recommendations for a student @Description Get recommendations for a student @Tags Recommendations @Tags Student @Accept json @Produce json @Param Authorization header string true "Insert your access token" default(Bearer <Add access token here>) @Success 200 {object} httpx.DataJsonResponse{data=schemas.Recommendation} @Failure 400 {object} httpx.ErrorJsonResponse @Failure 404 {object} httpx.ErrorJsonResponse @Failure 500 {object} httpx.ErrorJsonResponse @Router /recommendations/student [get]
func HandleGetSchool ¶
func HandleGetSchool(w http.ResponseWriter, r *http.Request)
HandleGetSchool godoc
@Summary Get school @Description Get current authenticated user shcool @Tags Common @Tags Student @Tags Admin @Accept json @Produce json @Param Authorization header string true "Insert your access token" default(Bearer <Add access token here>) @Success 200 {object} httpx.DataJsonResponse{data=schemas.School} @Failure 404 {object} httpx.ErrorJsonResponse @Failure 500 {object} httpx.ErrorJsonResponse @Router /school [get]
func HandleGetSchools ¶ added in v1.1.0
func HandleGetSchools(w http.ResponseWriter, r *http.Request)
HandleGetSchools godoc
@Summary Get all schools @Description Get all registered schools @Tags Common @Accept json @Produce json @Success 200 {object} httpx.DataJsonResponse{data=[]schemas.School} @Failure 404 {object} httpx.ErrorJsonResponse @Failure 500 {object} httpx.ErrorJsonResponse @Router /schools [get]
func HandleGetStatistics ¶
func HandleGetStatistics(w http.ResponseWriter, r *http.Request)
HandleGetStatistics godoc
@Summary Get statistic @Description Get statistics @Tags Common @Tags Admin @Accept json @Produce json @Param Authorization header string true "Insert your access token" default(Bearer <Add access token here>) @Success 200 {object} httpx.DataJsonResponse{data=schemas.Statistic} @Failure 500 {object} httpx.ErrorJsonResponse @Router /statistics [get]
func HandleGetStudent ¶
func HandleGetStudent(w http.ResponseWriter, r *http.Request)
HandleGetStudent godoc
@Summary Get a student @Description Get a student from a school @Tags Students @Tags Admin @Accept json @Produce json @Param Authorization header string true "Insert your access token" default(Bearer <Add access token here>) @Param studentId path string true "Id student" @Success 200 {object} httpx.DataJsonResponse{data=schemas.Student} @Failure 400 {object} httpx.ErrorJsonResponse @Failure 404 {object} httpx.ErrorJsonResponse @Failure 500 {object} httpx.ErrorJsonResponse @Router /students/{studentId} [get]
func HandleGetStudentProfile ¶
func HandleGetStudentProfile(w http.ResponseWriter, r *http.Request)
HandleGetStudentProfile godoc
@Summary Get a student profile @Description Get a student profile @Tags Students @Tags Student @Accept json @Produce json @Param Authorization header string true "Insert your access token" default(Bearer <Add access token here>) @Success 200 {object} httpx.DataJsonResponse{data=schemas.StudentProfile} @Failure 400 {object} httpx.ErrorJsonResponse @Failure 500 {object} httpx.ErrorJsonResponse @Router /students/profile [get]
func HandleGetStudents ¶
func HandleGetStudents(w http.ResponseWriter, r *http.Request)
HandleStudents godoc
@Summary Get students @Description Get all students from a school @Tags Students @Tags Admin @Accept json @Produce json @Param Authorization header string true "Insert your access token" default(Bearer <Add access token here>) @Success 200 {object} httpx.DataJsonResponse{data=[]schemas.Student} @Failure 400 {object} httpx.ErrorJsonResponse @Failure 500 {object} httpx.ErrorJsonResponse @Router /students [get]
func HandleGetWeights ¶ added in v1.1.0
func HandleGetWeights(w http.ResponseWriter, r *http.Request)
func HandlePatchAdminChangePassword ¶ added in v1.1.0
func HandlePatchAdminChangePassword(w http.ResponseWriter, r *http.Request)
HandlePatchAdminChangePassword godoc
@Summary Change admin password @Description Change admin password @Tags Admin @Tags Auth @Accept json @Produce json @Param Authorization header string true "Insert your access token" default(Bearer <Add access token here>) @Param body body models.ChangePasswordRequest true "Change admin password request body" @Success 201 {object} httpx.MessageJsonResponse @Failure 400 {object} httpx.ErrorJsonResponse @Failure 500 {object} httpx.ErrorJsonResponse @Router /admin/change-password [patch]
func HandlePatchAdminProfile ¶
func HandlePatchAdminProfile(w http.ResponseWriter, r *http.Request)
HandlePatchAdminProfile godoc
@Summary Update admin profile @Description Update admin profile @Tags Admin @Accept json @Produce json @Param Authorization header string true "Insert your access token" default(Bearer <Add access token here>) @Param body body schemas.UpdateAdminRequest true "Update admin profile request body" @Success 201 {object} httpx.MessageJsonResponse @Failure 400 {object} httpx.ErrorJsonResponse @Failure 500 {object} httpx.ErrorJsonResponse @Router /admin/profile [patch]
func HandlePatchExpectations ¶ added in v1.1.0
func HandlePatchExpectations(w http.ResponseWriter, r *http.Request)
func HandlePatchStudent ¶
func HandlePatchStudent(w http.ResponseWriter, r *http.Request)
HandlePatchStudent godoc
@Summary Update a student @Description Update a student from a school @Tags Students @Tags Admin @Accept json @Produce json @Param Authorization header string true "Insert your access token" default(Bearer <Add access token here>) @Param studentId path string true "Update student id" @Param body body schemas.UpdateStudentRequest true "Update student request body" @Success 201 {object} httpx.MessageJsonResponse @Failure 400 {object} httpx.ErrorJsonResponse @Failure 500 {object} httpx.ErrorJsonResponse @Router /students/{studentId} [patch]
func HandlePatchStudentChangePassword ¶ added in v1.1.0
func HandlePatchStudentChangePassword(w http.ResponseWriter, r *http.Request)
HandlePatchStudentChangePassword godoc
@Summary Change student password @Description Change student password @Tags Student @Tags Auth @Accept json @Produce json @Param Authorization header string true "Insert your access token" default(Bearer <Add access token here>) @Param body body models.ChangePasswordRequest true "Change student password request body" @Success 201 {object} httpx.MessageJsonResponse @Failure 400 {object} httpx.ErrorJsonResponse @Failure 500 {object} httpx.ErrorJsonResponse @Router /students/change-password [patch]
func HandlePatchStudentProfile ¶
func HandlePatchStudentProfile(w http.ResponseWriter, r *http.Request)
HandlePatchStudentProfile godoc
@Summary Update a student profile @Description Update a student profile @Tags Students @Tags Student @Accept json @Produce json @Param Authorization header string true "Insert your access token" default(Bearer <Add access token here>) @Param body body schemas.UpdateStudentRequest true "Update student profile body request" @Success 201 {object} httpx.MessageJsonResponse @Failure 400 {object} httpx.ErrorJsonResponse @Failure 500 {object} httpx.ErrorJsonResponse @Router /students/profile [patch]
func HandlePostAnswers ¶
func HandlePostAnswers(w http.ResponseWriter, r *http.Request)
HandlePostAnswers godoc
@Summary Submit answer @Description Submit questionnare answers @Tags Questionnare @Tags Student @Accept json @Produce json @Param Authorization header string true "Insert your access token" default(Bearer <Add access token here>) @Param body body []schemas.SubmitAnswerRequest true "Submit answer request body" @Success 201 {object} httpx.MessageJsonResponse @Failure 400 {object} httpx.ErrorJsonResponse @Failure 500 {object} httpx.ErrorJsonResponse @Router /questionnare/answers [post]
func HandlePostExpectations ¶ added in v1.1.0
func HandlePostExpectations(w http.ResponseWriter, r *http.Request)
func HandlePostLogin ¶
func HandlePostLogin(w http.ResponseWriter, r *http.Request)
HandlePostLogin godoc
@Summary Login authentication @Description Login authentication for student and admin @Tags Auth @Accept json @Produce json @Param body body schemas.LoginRequest true "Login request body" @Success 200 {object} httpx.DataJsonResponse{data=schemas.LoginResponse} @Failure 400 {object} httpx.ErrorJsonResponse @Failure 500 {object} httpx.ErrorJsonResponse @Router /auth/login [post]
func HandlePostQuestionnareSettings ¶
func HandlePostQuestionnareSettings(w http.ResponseWriter, r *http.Request)
HandlePostQuestionnareSettings godoc
@Summary Add questionnare setting @Description Add a questionnare setting @Tags Questionnare @Tags Admin @Accept json @Produce json @Param Authorization header string true "Insert your access token" default(Bearer <Add access token here>) @Param body body schemas.QuestionnareSettingRequest true "Add questionnare setting request body" @Success 201 {object} httpx.MessageJsonResponse @Failure 400 {object} httpx.ErrorJsonResponse @Failure 500 {object} httpx.ErrorJsonResponse @Router /questionnare/settings [post]
func HandlePostRegisterStudent ¶ added in v1.1.0
func HandlePostRegisterStudent(w http.ResponseWriter, r *http.Request)
HandlePostRegisterStudent godoc
@Summary Register student @Description Register student @Tags Student @Accept json @Produce json @Param body body models.StudentRegisterRequest true "Register student request body" @Success 201 {object} httpx.MessageJsonResponse @Failure 400 {object} httpx.ErrorJsonResponse @Failure 500 {object} httpx.ErrorJsonResponse @Router /register/student [post]
func HandlePostStudent ¶
func HandlePostStudent(w http.ResponseWriter, r *http.Request)
HandlePostStudent godoc
@Summary Add a student @Description Add a student from a school @Tags Students @Tags Admin @Accept json @Produce json @Param Authorization header string true "Insert your access token" default(Bearer <Add access token here>) @Param body body schemas.AddStudentRequest true "Add student request body" @Success 201 {object} httpx.MessageJsonResponse @Failure 400 {object} httpx.ErrorJsonResponse @Failure 500 {object} httpx.ErrorJsonResponse @Router /students [post]
Types ¶
This section is empty.