aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/api/generated.go
diff options
context:
space:
mode:
Diffstat (limited to 'backend/api/generated.go')
-rw-r--r--backend/api/generated.go162
1 files changed, 129 insertions, 33 deletions
diff --git a/backend/api/generated.go b/backend/api/generated.go
index b33747a..f7fd7e4 100644
--- a/backend/api/generated.go
+++ b/backend/api/generated.go
@@ -51,7 +51,22 @@ const (
// Defines values for GameWatcherMessageS2CExecResultPayloadStatus.
const (
- GameWatcherMessageS2CExecResultPayloadStatusSuccess GameWatcherMessageS2CExecResultPayloadStatus = "success"
+ GameWatcherMessageS2CExecResultPayloadStatusCompileError GameWatcherMessageS2CExecResultPayloadStatus = "compile_error"
+ GameWatcherMessageS2CExecResultPayloadStatusInternalError GameWatcherMessageS2CExecResultPayloadStatus = "internal_error"
+ GameWatcherMessageS2CExecResultPayloadStatusRuntimeError GameWatcherMessageS2CExecResultPayloadStatus = "runtime_error"
+ GameWatcherMessageS2CExecResultPayloadStatusSuccess GameWatcherMessageS2CExecResultPayloadStatus = "success"
+ GameWatcherMessageS2CExecResultPayloadStatusTimeout GameWatcherMessageS2CExecResultPayloadStatus = "timeout"
+ GameWatcherMessageS2CExecResultPayloadStatusWrongAnswer GameWatcherMessageS2CExecResultPayloadStatus = "wrong_answer"
+)
+
+// Defines values for GameWatcherMessageS2CSubmitResultPayloadStatus.
+const (
+ CompileError GameWatcherMessageS2CSubmitResultPayloadStatus = "compile_error"
+ InternalError GameWatcherMessageS2CSubmitResultPayloadStatus = "internal_error"
+ RuntimeError GameWatcherMessageS2CSubmitResultPayloadStatus = "runtime_error"
+ Success GameWatcherMessageS2CSubmitResultPayloadStatus = "success"
+ Timeout GameWatcherMessageS2CSubmitResultPayloadStatus = "timeout"
+ WrongAnswer GameWatcherMessageS2CSubmitResultPayloadStatus = "wrong_answer"
)
// Error defines model for Error.
@@ -192,11 +207,11 @@ type GameWatcherMessageS2CExecResult struct {
// GameWatcherMessageS2CExecResultPayload defines model for GameWatcherMessageS2CExecResultPayload.
type GameWatcherMessageS2CExecResultPayload struct {
- PlayerID int `json:"player_id"`
- Score nullable.Nullable[int] `json:"score"`
- Status GameWatcherMessageS2CExecResultPayloadStatus `json:"status"`
- Stderr string `json:"stderr"`
- Stdout string `json:"stdout"`
+ PlayerID int `json:"player_id"`
+ Status GameWatcherMessageS2CExecResultPayloadStatus `json:"status"`
+ Stderr string `json:"stderr"`
+ Stdout string `json:"stdout"`
+ TestcaseID nullable.Nullable[int] `json:"testcase_id"`
}
// GameWatcherMessageS2CExecResultPayloadStatus defines model for GameWatcherMessageS2CExecResultPayload.Status.
@@ -213,6 +228,33 @@ type GameWatcherMessageS2CStartPayload struct {
StartAt int `json:"start_at"`
}
+// GameWatcherMessageS2CSubmit defines model for GameWatcherMessageS2CSubmit.
+type GameWatcherMessageS2CSubmit struct {
+ Data GameWatcherMessageS2CSubmitPayload `json:"data"`
+ Type string `json:"type"`
+}
+
+// GameWatcherMessageS2CSubmitPayload defines model for GameWatcherMessageS2CSubmitPayload.
+type GameWatcherMessageS2CSubmitPayload struct {
+ PlayerID int `json:"player_id"`
+ PreliminaryScore int `json:"preliminary_score"`
+}
+
+// GameWatcherMessageS2CSubmitResult defines model for GameWatcherMessageS2CSubmitResult.
+type GameWatcherMessageS2CSubmitResult struct {
+ Data GameWatcherMessageS2CSubmitResultPayload `json:"data"`
+ Type string `json:"type"`
+}
+
+// GameWatcherMessageS2CSubmitResultPayload defines model for GameWatcherMessageS2CSubmitResultPayload.
+type GameWatcherMessageS2CSubmitResultPayload struct {
+ PlayerID int `json:"player_id"`
+ Status GameWatcherMessageS2CSubmitResultPayloadStatus `json:"status"`
+}
+
+// GameWatcherMessageS2CSubmitResultPayloadStatus defines model for GameWatcherMessageS2CSubmitResultPayload.Status.
+type GameWatcherMessageS2CSubmitResultPayloadStatus string
+
// Problem defines model for Problem.
type Problem struct {
Description string `json:"description"`
@@ -630,6 +672,32 @@ func (t *GameWatcherMessageS2C) MergeGameWatcherMessageS2CCode(v GameWatcherMess
return err
}
+// AsGameWatcherMessageS2CSubmit returns the union data inside the GameWatcherMessageS2C as a GameWatcherMessageS2CSubmit
+func (t GameWatcherMessageS2C) AsGameWatcherMessageS2CSubmit() (GameWatcherMessageS2CSubmit, error) {
+ var body GameWatcherMessageS2CSubmit
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromGameWatcherMessageS2CSubmit overwrites any union data inside the GameWatcherMessageS2C as the provided GameWatcherMessageS2CSubmit
+func (t *GameWatcherMessageS2C) FromGameWatcherMessageS2CSubmit(v GameWatcherMessageS2CSubmit) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeGameWatcherMessageS2CSubmit performs a merge with any union data inside the GameWatcherMessageS2C, using the provided GameWatcherMessageS2CSubmit
+func (t *GameWatcherMessageS2C) MergeGameWatcherMessageS2CSubmit(v GameWatcherMessageS2CSubmit) error {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return err
+ }
+
+ merged, err := runtime.JSONMerge(t.union, b)
+ t.union = merged
+ return err
+}
+
// AsGameWatcherMessageS2CExecResult returns the union data inside the GameWatcherMessageS2C as a GameWatcherMessageS2CExecResult
func (t GameWatcherMessageS2C) AsGameWatcherMessageS2CExecResult() (GameWatcherMessageS2CExecResult, error) {
var body GameWatcherMessageS2CExecResult
@@ -656,6 +724,32 @@ func (t *GameWatcherMessageS2C) MergeGameWatcherMessageS2CExecResult(v GameWatch
return err
}
+// AsGameWatcherMessageS2CSubmitResult returns the union data inside the GameWatcherMessageS2C as a GameWatcherMessageS2CSubmitResult
+func (t GameWatcherMessageS2C) AsGameWatcherMessageS2CSubmitResult() (GameWatcherMessageS2CSubmitResult, error) {
+ var body GameWatcherMessageS2CSubmitResult
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromGameWatcherMessageS2CSubmitResult overwrites any union data inside the GameWatcherMessageS2C as the provided GameWatcherMessageS2CSubmitResult
+func (t *GameWatcherMessageS2C) FromGameWatcherMessageS2CSubmitResult(v GameWatcherMessageS2CSubmitResult) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeGameWatcherMessageS2CSubmitResult performs a merge with any union data inside the GameWatcherMessageS2C, using the provided GameWatcherMessageS2CSubmitResult
+func (t *GameWatcherMessageS2C) MergeGameWatcherMessageS2CSubmitResult(v GameWatcherMessageS2CSubmitResult) error {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return err
+ }
+
+ merged, err := runtime.JSONMerge(t.union, b)
+ t.union = merged
+ return err
+}
+
func (t GameWatcherMessageS2C) MarshalJSON() ([]byte, error) {
b, err := t.union.MarshalJSON()
return b, err
@@ -1115,33 +1209,35 @@ func (sh *strictHandler) GetToken(ctx echo.Context, params GetTokenParams) error
// Base64 encoded, gzipped, json marshaled Swagger object
var swaggerSpec = []string{
- "H4sIAAAAAAAC/9xaUW/bNhD+Kxo3oBugxY4TFJ3f0qzNOnSdUbfbQxEYtHS2mVGkSlJxvED/fSApS6ZE",
- "W7KrFMX6UNgW7+67u493JzKPKOJJyhkwJdH4EaVY4AQUCPNtBTgGMcOZWnFB/sWKcKZ/JwyNi4coRAwn",
- "gMboylkVIgGfMyIgRmMlMgiRjFaQYC2uNqkWkEoQtkR5HqIUq9VsiROYkbg0oH+s1G+fdlBMmIIlCJRr",
- "1QJkypkE49BLHL+HzxlIpb9FnClg5iNOU0oiA31wJ62Xld4fBCzQGH0/qII1sE/l4JUQvDAVg4wESW2U",
- "tK1AFMbyEL3mYk7iGNjTW65M5SF6x9VrnrH46c2+4ypYGFN5iD6yLWvgK5h2rOnHhYRWaIU0twVPQShi",
- "qZCAlHgJ+iM84CSlmjlv2D2mpMpb6OFqRb9PpZLbciGf30FkEn5jeFs3GxOZUryZseJpZVuvD86bJkMU",
- "Z8JEayYh4iyWjtzF82HYIH6IdjZTufR870L78yMCliXar/N7DSTJqCIaLQjtYQXVPm7gtEsNPKIgkW3p",
- "/CgthEIRFgJvjB7B5xSSNvFJsUynW2GhIJ5h5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B+rbON33cMOC9AXpurzw1NJeHQhV68CHJREBEQEONrcdX2tiHnUKoSQyqfVAFpVvfOO/cdlaoTW5wyyf",
+ "03pQcsAo6Xe2pMGvDHyekojRqR6tOiIDkuIFiMEtW9KT22zhFRVTHKfEje8cJ6KskDPGEsB68JgLDyVH",
+ "Z76IqqVNLxSU1nhurFSUNMYYW9y+2DYmKI04J3gGSY1TIGSgqrx/YNdfZ+F2EwZJ0wslReic6Z9xDTvR",
+ "RTLDkjMhgs1uDVYwCy6u35jZjTCT0+HJ6clQYWYZUJwRNEZnJ8OTITJDeR2AwQKnJhQL0Aeuio4O2JsY",
+ "jdEVyCu9IHReH9hxzSyXDLyvFxQ3tZn9aDg8aIDsJm8LvdM4Tc9su4zQxI4suGPpt0TIgM0DI1GE6Hx4",
+ "ugvC1ueBO8xWQmftQpWZvzrl8zTFfL2BYO0XoU3l4MGOAYu2pPaU07BVznkD5Ak40C3znkx3SvSFDvEX",
+ "y7CSOG+X2L764VLiCmSALWBFiYQtzJmeMeFhwjUT8q1eYoIDQr5kZoB0ZD4yLMSK8bj2O4L99nR05jtT",
+ "OSyIkHYeLdk/UCvz97V/Ph2PrDN0syEsfD8z3NeTil6ZvMvvk8r/7X2oVtKF1hPTu83zJFkHirJApYK6",
+ "Ye3BVHd4qLqawJBP83Dr3K4D6YNe8DVWmW8qL+Z8EEvG5c8JuYM4wNpcYAAWRVH8FwAA//9jcKI8NygA",
+ "AA==",
}
// GetSwagger returns the content of the embedded swagger specification file