170 lines
4.9 KiB
Go
170 lines
4.9 KiB
Go
// 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"
|
|
)
|
|
|
|
// Defines values for UserTeamRole.
|
|
const (
|
|
Captain UserTeamRole = "captain"
|
|
Member UserTeamRole = "member"
|
|
)
|
|
|
|
// GameAdminListItem defines model for gameAdminListItem.
|
|
type GameAdminListItem struct {
|
|
CreatedAt string `json:"createdAt"`
|
|
Id int `json:"id"`
|
|
Title string `json:"title"`
|
|
}
|
|
|
|
// 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"`
|
|
}
|
|
|
|
// 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
|
|
|
|
// 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"`
|
|
}
|
|
|
|
// GameAdminList defines model for gameAdminList.
|
|
type GameAdminList = []GameAdminListItem
|
|
|
|
// GameListResponse defines model for gameListResponse.
|
|
type GameListResponse = []GameView
|
|
|
|
// 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
|
|
|
|
// UserResponse defines model for userResponse.
|
|
type UserResponse struct {
|
|
Email string `json:"email"`
|
|
Id int `json:"id"`
|
|
Role UserRole `json:"role"`
|
|
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"`
|
|
}
|
|
|
|
// 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"`
|
|
}
|
|
|
|
// 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"`
|
|
}
|
|
|
|
// 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
|
|
|
|
// PostUserLoginJSONRequestBody defines body for PostUserLogin for application/json ContentType.
|
|
type PostUserLoginJSONRequestBody PostUserLoginJSONBody
|
|
|
|
// PostUserRegisterJSONRequestBody defines body for PostUserRegister for application/json ContentType.
|
|
type PostUserRegisterJSONRequestBody PostUserRegisterJSONBody
|