28 lines
554 B
Go
28 lines
554 B
Go
|
package client
|
||
|
|
||
|
import "git.andreafazzi.eu/andrea/testhub/models"
|
||
|
|
||
|
type Response struct {
|
||
|
Status string `json:"status"`
|
||
|
Content interface{} `json:"content"`
|
||
|
}
|
||
|
|
||
|
type QuizReadAllResponse struct {
|
||
|
Status string `json:"status"`
|
||
|
Content []*models.Quiz `json:"content"`
|
||
|
}
|
||
|
|
||
|
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"`
|
||
|
}
|