client.go 554 B

123456789101112131415161718192021222324252627
  1. package client
  2. import "git.andreafazzi.eu/andrea/testhub/models"
  3. type Response struct {
  4. Status string `json:"status"`
  5. Content interface{} `json:"content"`
  6. }
  7. type QuizReadAllResponse struct {
  8. Status string `json:"status"`
  9. Content []*models.Quiz `json:"content"`
  10. }
  11. type CreateQuestionRequest struct {
  12. Text string `json:"text"`
  13. }
  14. type CreateAnswerRequest struct {
  15. Text string
  16. Correct bool
  17. }
  18. type CreateQuizRequest struct {
  19. Question *CreateQuestionRequest `json:"question"`
  20. Answers []*CreateAnswerRequest `json:"answers"`
  21. }