probo/client/client.go

33 lines
665 B
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
type Response struct {
Status string `json:"status"`
Content interface{} `json:"content"`
}
2022-06-24 18:56:06 +02:00
type ReadAllQuizResponse struct {
2022-06-23 11:25:35 +02:00
Status string `json:"status"`
Content []*models.Quiz `json:"content"`
}
2022-06-24 18:56:06 +02:00
type CreateQuizResponse struct {
Status string `json:"status"`
Content *models.Quiz `json:"content"`
}
2022-06-23 11:25:35 +02:00
type CreateQuestionRequest struct {
Text string `json:"text"`
}
type CreateAnswerRequest struct {
Text string
Correct bool
}
type CreateQuizRequest struct {
Question *CreateQuestionRequest `json:"question"`
Answers []*CreateAnswerRequest `json:"answers"`
}