diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-07-29 02:38:54 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-07-29 02:39:55 +0900 |
| commit | 4c7238f58dcc463d22d50bfc6cd2aaae70e41958 (patch) | |
| tree | 2cdddb38cdbe0fbb54db91ae75a287ec1e63f32b /backend/api/generated.go | |
| parent | df57e43059a230062d903f55f9af7339828875c3 (diff) | |
| download | iosdc-japan-2024-albatross-4c7238f58dcc463d22d50bfc6cd2aaae70e41958.tar.gz iosdc-japan-2024-albatross-4c7238f58dcc463d22d50bfc6cd2aaae70e41958.tar.zst iosdc-japan-2024-albatross-4c7238f58dcc463d22d50bfc6cd2aaae70e41958.zip | |
feat: define GamePlayerMessageC2SCode and GamePlayerMessageS2CExecResult
Diffstat (limited to 'backend/api/generated.go')
| -rw-r--r-- | backend/api/generated.go | 121 |
1 files changed, 103 insertions, 18 deletions
diff --git a/backend/api/generated.go b/backend/api/generated.go index 86e7567..e39e3ba 100644 --- a/backend/api/generated.go +++ b/backend/api/generated.go @@ -32,6 +32,11 @@ const ( WaitingStart GameState = "waiting_start" ) +// Defines values for GamePlayerMessageS2CExecResultPayloadStatus. +const ( + Success GamePlayerMessageS2CExecResultPayloadStatus = "success" +) + // Game defines model for Game. type Game struct { DisplayName string `json:"display_name"` @@ -55,6 +60,17 @@ type GamePlayerMessageC2S struct { union json.RawMessage } +// GamePlayerMessageC2SCode defines model for GamePlayerMessageC2SCode. +type GamePlayerMessageC2SCode struct { + Data GamePlayerMessageC2SCodePayload `json:"data"` + Type string `json:"type"` +} + +// GamePlayerMessageC2SCodePayload defines model for GamePlayerMessageC2SCodePayload. +type GamePlayerMessageC2SCodePayload struct { + Code string `json:"code"` +} + // GamePlayerMessageC2SEntry defines model for GamePlayerMessageC2SEntry. type GamePlayerMessageC2SEntry struct { Type string `json:"type"` @@ -70,6 +86,21 @@ type GamePlayerMessageS2C struct { union json.RawMessage } +// GamePlayerMessageS2CExecResult defines model for GamePlayerMessageS2CExecResult. +type GamePlayerMessageS2CExecResult struct { + Data GamePlayerMessageS2CExecResultPayload `json:"data"` + Type string `json:"type"` +} + +// GamePlayerMessageS2CExecResultPayload defines model for GamePlayerMessageS2CExecResultPayload. +type GamePlayerMessageS2CExecResultPayload struct { + Score *int `json:"score"` + Status GamePlayerMessageS2CExecResultPayloadStatus `json:"status"` +} + +// GamePlayerMessageS2CExecResultPayloadStatus defines model for GamePlayerMessageS2CExecResultPayload.Status. +type GamePlayerMessageS2CExecResultPayloadStatus string + // GamePlayerMessageS2CPrepare defines model for GamePlayerMessageS2CPrepare. type GamePlayerMessageS2CPrepare struct { Data GamePlayerMessageS2CPreparePayload `json:"data"` @@ -242,6 +273,32 @@ func (t *GamePlayerMessageC2S) MergeGamePlayerMessageC2SReady(v GamePlayerMessag return err } +// AsGamePlayerMessageC2SCode returns the union data inside the GamePlayerMessageC2S as a GamePlayerMessageC2SCode +func (t GamePlayerMessageC2S) AsGamePlayerMessageC2SCode() (GamePlayerMessageC2SCode, error) { + var body GamePlayerMessageC2SCode + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromGamePlayerMessageC2SCode overwrites any union data inside the GamePlayerMessageC2S as the provided GamePlayerMessageC2SCode +func (t *GamePlayerMessageC2S) FromGamePlayerMessageC2SCode(v GamePlayerMessageC2SCode) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeGamePlayerMessageC2SCode performs a merge with any union data inside the GamePlayerMessageC2S, using the provided GamePlayerMessageC2SCode +func (t *GamePlayerMessageC2S) MergeGamePlayerMessageC2SCode(v GamePlayerMessageC2SCode) 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 GamePlayerMessageC2S) MarshalJSON() ([]byte, error) { b, err := t.union.MarshalJSON() return b, err @@ -304,6 +361,32 @@ func (t *GamePlayerMessageS2C) MergeGamePlayerMessageS2CStart(v GamePlayerMessag return err } +// AsGamePlayerMessageS2CExecResult returns the union data inside the GamePlayerMessageS2C as a GamePlayerMessageS2CExecResult +func (t GamePlayerMessageS2C) AsGamePlayerMessageS2CExecResult() (GamePlayerMessageS2CExecResult, error) { + var body GamePlayerMessageS2CExecResult + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromGamePlayerMessageS2CExecResult overwrites any union data inside the GamePlayerMessageS2C as the provided GamePlayerMessageS2CExecResult +func (t *GamePlayerMessageS2C) FromGamePlayerMessageS2CExecResult(v GamePlayerMessageS2CExecResult) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeGamePlayerMessageS2CExecResult performs a merge with any union data inside the GamePlayerMessageS2C, using the provided GamePlayerMessageS2CExecResult +func (t *GamePlayerMessageS2C) MergeGamePlayerMessageS2CExecResult(v GamePlayerMessageS2CExecResult) 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 GamePlayerMessageS2C) MarshalJSON() ([]byte, error) { b, err := t.union.MarshalJSON() return b, err @@ -647,24 +730,26 @@ func (sh *strictHandler) PostLogin(ctx echo.Context) error { // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "H4sIAAAAAAAC/9xWUW/jNgz+K4a2RyNJ06K4+a3rtqKHGxYs29OhCBiLidXZkk6U28sK//dBkmPHsXNJ", - "2zwMdw851yapjx8/inxhqSq0kigtseSFUZphAf7xDgp0/2ujNBor0L/lgnQOm4Wsv+JXKHSOLPH20QWL", - "md1o9zdZI+SaVTHjpQErlFwQpkpy6vhdXk8aFyEtrtE4nzUUuBC8Y3oxZKiNWuZYOMMfDa5Ywn4YtzmN", - "64TGs9qsihlZMBb5Amwn+k9X19cfrj5MBuGQBRvylWXBks8szRUhZzF7BmGFXC9QWuM4at/4c5hDiBoM", - "svpkR4rPLzyshBSUIWcP8Q6ZkFrxhH0yq5gZ/FIKg9yh2LK0BRh36zNA/UMTUi0fMbUuOVe5WQ4bNL8j", - "Eax9okriHyuWfP42r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MWWBNNUzCg0bUMVlnkSw6uO/J6", + "CPUdBg93TtSNzWFJBesdUAa6Nr/KzU5p/rfbnhwy56+rlsuK5Tu7GDMl0ccym0zCuWNAurBolgmeOM/j", + "e/Qqqf01xVRRwg2kOOQgrA87QrWm+86BDE9kt6Fd8pGjidQm8hZFTN5OLl4RS1pPbrVgf1F6zRkDGVXZ", + "7pVu6WhIDJV/5wXzNKW27faxhcCKOGhv/BSm1aJXhfbjlp3QojsmKy3VE3Cviv7NwuwXXpv9K0fxf0w6", + "N2AiGgKz0hFq6++2TGGHYhYKzUe3xEMBND8pP3W9kI2MIj4ozY6G1vB0OrvoulheeVeGK7HaupvAphqL", + "sx6FRv0FRzfqo/0bHXz2d3HOyZDsL/1cscmF2Ec0NzuQxkIF5uU8Pbecb+VXKjiLEg3M7kUFnlXOpf8y", + "m5HSUZXOpsL/RNCRl3VRFMU/AQAA///TQodrghUAAA==", } // GetSwagger returns the content of the embedded swagger specification file |
