nquest/api/types.go

181 lines
5.7 KiB
Go

// Package api provides primitives to interact with the openapi HTTP API.
//
// Code generated by github.com/deepmap/oapi-codegen/v2 version v2.1.0 DO NOT EDIT.
package api
import (
openapi_types "github.com/oapi-codegen/runtime/types"
)
const (
CookieAuthScopes = "cookieAuth.Scopes"
)
// Defines values for GameType.
const (
City GameType = "city"
Virtual GameType = "virtual"
)
// Defines values for TaskViewMessage.
const (
GameComplete TaskViewMessage = "game_complete"
InvalidCode TaskViewMessage = "invalid_code"
NextLevel TaskViewMessage = "next_level"
OkCode TaskViewMessage = "ok_code"
OldCode TaskViewMessage = "old_code"
)
// Defines values for UserViewRole.
const (
Admin UserViewRole = "admin"
Creator UserViewRole = "creator"
User UserViewRole = "user"
)
// CodeEdit defines model for codeEdit.
type CodeEdit struct {
Code string `json:"code"`
Description *string `json:"description,omitempty"`
Id *openapi_types.UUID `json:"id,omitempty"`
}
// CodeView defines model for codeView.
type CodeView struct {
Code *string `json:"code,omitempty"`
Description *string `json:"description,omitempty"`
}
// FileItem defines model for fileItem.
type FileItem struct {
Id openapi_types.UUID `json:"id"`
OriginalName string `json:"originalName"`
Size int `json:"size"`
}
// GameEdit defines model for gameEdit.
type GameEdit struct {
Description string `json:"description"`
Icon *openapi_types.UUID `json:"icon,omitempty"`
Id *openapi_types.UUID `json:"id,omitempty"`
Points int `json:"points"`
Tasks []TaskEdit `json:"tasks"`
Title string `json:"title"`
Type GameType `json:"type"`
Visible bool `json:"visible"`
}
// GameType defines model for gameType.
type GameType string
// GameView defines model for gameView.
type GameView struct {
Authors []UserView `json:"authors"`
CreatedAt string `json:"createdAt"`
Description string `json:"description"`
Icon *openapi_types.UUID `json:"icon,omitempty"`
Id openapi_types.UUID `json:"id"`
Points int `json:"points"`
TaskCount int `json:"taskCount"`
Title string `json:"title"`
Type GameType `json:"type"`
Visible *bool `json:"visible,omitempty"`
}
// TaskEdit defines model for taskEdit.
type TaskEdit struct {
Codes []CodeEdit `json:"codes"`
Id *openapi_types.UUID `json:"id,omitempty"`
Text string `json:"text"`
Title string `json:"title"`
}
// TaskView defines model for taskView.
type TaskView struct {
Codes []CodeView `json:"codes"`
Message *TaskViewMessage `json:"message,omitempty"`
Text string `json:"text"`
Title string `json:"title"`
}
// TaskViewMessage defines model for TaskView.Message.
type TaskViewMessage string
// UserView defines model for userView.
type UserView struct {
Email string `json:"email"`
ExpToCurrentLevel int `json:"expToCurrentLevel"`
ExpToNextLevel int `json:"expToNextLevel"`
Experience int `json:"experience"`
Games []GameView `json:"games"`
Id openapi_types.UUID `json:"id"`
Level int `json:"level"`
Role UserViewRole `json:"role"`
Username string `json:"username"`
}
// UserViewRole defines model for UserView.Role.
type UserViewRole string
// ErrorResponse defines model for errorResponse.
type ErrorResponse struct {
Code int `json:"code"`
Message string `json:"message"`
}
// FilesListResponse defines model for filesListResponse.
type FilesListResponse = []FileItem
// GameAdminResponse defines model for gameAdminResponse.
type GameAdminResponse = GameEdit
// GameListResponse defines model for gameListResponse.
type GameListResponse = []GameView
// TaskResponse defines model for taskResponse.
type TaskResponse = TaskView
// UploadResponse defines model for uploadResponse.
type UploadResponse struct {
Uuid openapi_types.UUID `json:"uuid"`
}
// UserResponse defines model for userResponse.
type UserResponse = UserView
// AdminUploadFileMultipartBody defines parameters for AdminUploadFile.
type AdminUploadFileMultipartBody interface{}
// EnterCodeJSONBody defines parameters for EnterCode.
type EnterCodeJSONBody struct {
Code string `json:"code"`
}
// PostUserLoginJSONBody defines parameters for PostUserLogin.
type PostUserLoginJSONBody struct {
Email string `json:"email"`
Password string `json:"password"`
}
// PostUserRegisterJSONBody defines parameters for PostUserRegister.
type PostUserRegisterJSONBody struct {
Email string `json:"email"`
Password string `json:"password"`
Password2 string `json:"password2"`
Username string `json:"username"`
}
// AdminUploadFileMultipartRequestBody defines body for AdminUploadFile for multipart/form-data ContentType.
type AdminUploadFileMultipartRequestBody AdminUploadFileMultipartBody
// AdminEditGameJSONRequestBody defines body for AdminEditGame for application/json ContentType.
type AdminEditGameJSONRequestBody = GameEdit
// EnterCodeJSONRequestBody defines body for EnterCode for application/json ContentType.
type EnterCodeJSONRequestBody EnterCodeJSONBody
// PostUserLoginJSONRequestBody defines body for PostUserLogin for application/json ContentType.
type PostUserLoginJSONRequestBody PostUserLoginJSONBody
// PostUserRegisterJSONRequestBody defines body for PostUserRegister for application/json ContentType.
type PostUserRegisterJSONRequestBody PostUserRegisterJSONBody