probo/client/client.go

107 lines
1.7 KiB
Go
Raw Normal View History

2022-06-23 11:25:35 +02:00
package client
2022-06-24 18:56:06 +02:00
import "git.andreafazzi.eu/andrea/probo/models"
2022-06-23 11:25:35 +02:00
2022-06-28 13:49:35 +02:00
type Question struct {
Text string `json:"text"`
}
type Answer struct {
2023-07-12 09:27:50 +02:00
Text string `json:"text"`
Correct bool `json:"correct"`
2022-06-28 13:49:35 +02:00
}
type Quiz struct {
Question *Question `json:"question"`
Answers []*Answer `json:"answers"`
}
2023-10-07 11:43:12 +02:00
type Collection struct {
Name string `json:"name"`
Query string `json:"query"`
}
2023-10-28 20:50:06 +02:00
type Participant struct {
Firstname string `json:"firstname"`
Lastname string `json:"lastname"`
Class string `json:"class"`
Token uint `json:"token"`
}
type Exam struct {
Name string `json:"name"`
Description string `json:"description"`
ParticipantID string `json:"participant_id"`
CollectionID string `json:"collection_id"`
}
2022-06-29 16:08:55 +02:00
type BaseResponse struct {
Status string `json:"status"`
Message string `json:"message"`
}
2022-06-24 18:56:06 +02:00
type ReadAllQuizResponse struct {
2022-06-29 16:08:55 +02:00
BaseResponse
2022-06-23 11:25:35 +02:00
Content []*models.Quiz `json:"content"`
}
2022-06-24 18:56:06 +02:00
type CreateQuizResponse struct {
2022-06-29 16:08:55 +02:00
BaseResponse
2022-06-24 18:56:06 +02:00
Content *models.Quiz `json:"content"`
}
2022-06-28 13:49:35 +02:00
type UpdateQuizResponse struct {
2022-06-29 16:08:55 +02:00
BaseResponse
2022-06-28 13:49:35 +02:00
Content *models.Quiz `json:"content"`
}
2022-06-23 11:25:35 +02:00
type CreateQuestionRequest struct {
2022-06-28 13:49:35 +02:00
*Question
2022-06-23 11:25:35 +02:00
}
type CreateAnswerRequest struct {
2022-06-28 13:49:35 +02:00
*Answer
2022-06-23 11:25:35 +02:00
}
2022-06-29 16:08:55 +02:00
type CreateUpdateQuizRequest struct {
2022-06-28 13:49:35 +02:00
*Quiz
2023-09-22 10:29:10 +02:00
*models.Meta
2022-06-23 11:25:35 +02:00
}
2023-09-01 11:48:09 +02:00
type DeleteQuizRequest struct {
ID string
}
2023-10-07 11:43:12 +02:00
type CreateUpdateCollectionRequest struct {
*Collection
}
type DeleteCollectionRequest struct {
ID string
}
2023-10-28 20:50:06 +02:00
type CreateUpdateExamRequest struct {
*Exam
}
type DeleteExamRequest struct {
ID string
}
type ReadExamByIDRequest struct {
ID string
}
type CreateUpdateParticipantRequest struct {
*Participant
}
type DeleteParticipantRequest struct {
ID string
}
type ReadParticipantByIDRequest struct {
ID string
}