You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
687 B
Go
19 lines
687 B
Go
package http
|
|
|
|
// StartSessionRequest is the POST /sessions/start payload.
|
|
type StartSessionRequest struct {
|
|
PreferredTheme string `json:"preferred_theme" validate:"omitempty,min=2,max=100"`
|
|
Difficulty string `json:"difficulty" validate:"omitempty,oneof=easy medium hard"`
|
|
}
|
|
|
|
// EndSessionRequest is the POST /sessions/end payload.
|
|
type EndSessionRequest struct {
|
|
SessionID string `json:"session_id" validate:"required,min=1,max=64"`
|
|
Reason string `json:"reason" validate:"omitempty,oneof=abandoned manual"`
|
|
}
|
|
|
|
// SubmitAnswerRequest is the POST /sessions/:id/answer payload.
|
|
type SubmitAnswerRequest struct {
|
|
Answer string `json:"answer" validate:"required,min=1,max=500"`
|
|
}
|