package
Version:
v0.0.0-...-c35fd87
Opens a new window with list of versions in this module.
Published: Jul 3, 2022
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type AnswerSubmit struct {
QuestionId uint `json:"questionId"`
Choices []string `json:"choices"`
}
type AnswerSubmitArray struct {
AnswerSubmit []AnswerSubmit `json:"answerSubmit"`
SubmitAt time.Time `json:"submitAt"`
}
type Data struct {
Data interface{} `json:"data,omitempty"`
}
type Error struct {
Error interface{} `json:"error,omitempty"`
}
type JWTClaims struct {
Sub uint `json:"sub,omitempty"`
ExpiresAt int64 `json:"exp,omitempty"`
IssuedAt int64 `json:"iat,omitempty"`
}
type JWTToken struct {
Access_token string
Refresh_token string
}
type QuestionCreate struct {
Content string `json:"content" binding:"required"`
Choices []string `json:"choices" binding:"required"`
CorrectAnswers []string `json:"correctAnswers" binding:"required"`
}
type QuestionInfo struct {
ID uint `uri:"id" json:"id"`
Content string `json:"content"`
Choices []string `json:"choices"`
}
type QuestionResult struct {
Content string `json:"content"`
CorrectAnswers []string `json:"correctAnswers"`
}
type ScoreBoardInfoByUserId struct {
UserId uint `uri:"userid" json:"userId"`
Score uint `json:"score"`
PlayAt time.Time `json:"playAt"`
}
type Status struct {
Status interface{} `json:"status,omitempty"`
}
type Token struct {
AccessToken interface{} `json:"access_token,omitempty"`
RefreshToken interface{} `json:"refresh_token,omitempty"`
}
type UserInfo struct {
ID uint `uri:"id" json:"id"`
Username string `json:"username"`
Email string `json:"email"`
Bio string `json:"bio"`
CreatedAt time.Time `json:"created_at"`
}
type UserLogin struct {
Username string `json:"username" binding:"required"`
Password string `json:"password" binding:"required"`
}
type UserLogout struct {
RefreshToken string `json:"refreshToken" binding:"required"`
}
type UserSignup struct {
Username string `json:"username" binding:"required"`
Email string `json:"email" binding:"required"`
Password string `json:"password" binding:"required"`
Bio string `json:"bio" binding:"-"`
}
type UserUpdate struct {
Email string `json:"email" binding:"-"`
Bio string `json:"bio" binding:"-"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.