nquest/api/types.go

161 lines
4.7 KiB
Go
Raw Normal View History

2023-11-01 23:21:12 +03:00
// Package api provides primitives to interact with the openapi HTTP API.
//
// Code generated by github.com/deepmap/oapi-codegen/v2 version v2.0.0 DO NOT EDIT.
package api
const (
CookieAuthScopes = "cookieAuth.Scopes"
)
// Defines values for UserRole.
const (
Admin UserRole = "admin"
Creator UserRole = "creator"
NotVerified UserRole = "notVerified"
User UserRole = "user"
)
2023-11-01 23:21:12 +03:00
// Defines values for UserTeamRole.
const (
Captain UserTeamRole = "captain"
Member UserTeamRole = "member"
)
// GameView defines model for gameView.
type GameView struct {
Description string `json:"description"`
Id int `json:"id"`
StartAt string `json:"startAt"`
Teams []TeamView `json:"teams"`
Title string `json:"title"`
2023-11-01 23:21:12 +03:00
}
// TeamMember defines model for teamMember.
type TeamMember struct {
CreatedAt string `json:"createdAt"`
Role UserTeamRole `json:"role"`
User UserView `json:"user"`
}
// TeamRequest defines model for teamRequest.
type TeamRequest struct {
CreatedAt string `json:"createdAt"`
User UserView `json:"user"`
}
// TeamView defines model for teamView.
type TeamView struct {
CreatedAt string `json:"createdAt"`
CurrentTeam *bool `json:"currentTeam,omitempty"`
Id int `json:"id"`
Members *int `json:"members,omitempty"`
Name string `json:"name"`
}
// UserRole defines model for userRole.
type UserRole string
2023-11-01 23:21:12 +03:00
// UserTeam defines model for userTeam.
type UserTeam struct {
Id int `json:"id"`
Name string `json:"name"`
Role UserTeamRole `json:"role"`
}
// UserTeamRole defines model for userTeamRole.
type UserTeamRole string
// UserView defines model for userView.
type UserView struct {
Id int `json:"id"`
Username string `json:"username"`
}
// ErrorResponse defines model for errorResponse.
type ErrorResponse struct {
Code int `json:"code"`
Message string `json:"message"`
}
// GameListResponse defines model for gameListResponse.
type GameListResponse = []GameView
2023-11-01 23:21:12 +03:00
// TeamResponse defines model for teamResponse.
type TeamResponse struct {
CreatedAt string `json:"createdAt"`
Id int `json:"id"`
Members []TeamMember `json:"members"`
Name string `json:"name"`
Requests []TeamRequest `json:"requests"`
}
// TeamsListResponse defines model for teamsListResponse.
type TeamsListResponse = []TeamView
2023-11-01 23:21:12 +03:00
// UserResponse defines model for userResponse.
type UserResponse struct {
Email string `json:"email"`
Id int `json:"id"`
Role UserRole `json:"role"`
2023-11-01 23:21:12 +03:00
Team *UserTeam `json:"team,omitempty"`
Username string `json:"username"`
}
// Login defines model for login.
type Login struct {
Email string `json:"email"`
Password string `json:"password"`
}
// Register defines model for register.
type Register struct {
Email string `json:"email"`
Password string `json:"password"`
Password2 string `json:"password2"`
Username string `json:"username"`
}
2023-11-02 23:38:50 +03:00
// PostTeamsJSONBody defines parameters for PostTeams.
type PostTeamsJSONBody struct {
Name string `json:"name"`
}
// PostTeamsTeamIDMembersJSONBody defines parameters for PostTeamsTeamIDMembers.
type PostTeamsTeamIDMembersJSONBody struct {
Members []int `json:"members"`
}
// PostTeamsTeamIDRequestsUserIDJSONBody defines parameters for PostTeamsTeamIDRequestsUserID.
type PostTeamsTeamIDRequestsUserIDJSONBody struct {
Approve bool `json:"approve"`
}
2023-11-01 23:21:12 +03:00
// 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"`
}
2023-11-02 23:38:50 +03:00
// PostTeamsJSONRequestBody defines body for PostTeams for application/json ContentType.
type PostTeamsJSONRequestBody PostTeamsJSONBody
// PostTeamsTeamIDMembersJSONRequestBody defines body for PostTeamsTeamIDMembers for application/json ContentType.
type PostTeamsTeamIDMembersJSONRequestBody PostTeamsTeamIDMembersJSONBody
// PostTeamsTeamIDRequestsUserIDJSONRequestBody defines body for PostTeamsTeamIDRequestsUserID for application/json ContentType.
type PostTeamsTeamIDRequestsUserIDJSONRequestBody PostTeamsTeamIDRequestsUserIDJSONBody
2023-11-01 23:21:12 +03:00
// PostUserLoginJSONRequestBody defines body for PostUserLogin for application/json ContentType.
type PostUserLoginJSONRequestBody PostUserLoginJSONBody
// PostUserRegisterJSONRequestBody defines body for PostUserRegister for application/json ContentType.
type PostUserRegisterJSONRequestBody PostUserRegisterJSONBody