aboutsummaryrefslogtreecommitdiffhomepage
path: root/worker/models.go
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-08-08 21:17:06 +0900
committernsfisis <nsfisis@gmail.com>2024-08-08 21:17:06 +0900
commit3b13a61123becc63823ab0c0941aaff2048b020e (patch)
treee2e48d8d92e2601d65e3ce7d794d8727026c14e0 /worker/models.go
parentd94c9eb68e65d53f09bf3dd26ec4d61d245882ad (diff)
downloadphperkaigi-2025-albatross-3b13a61123becc63823ab0c0941aaff2048b020e.tar.gz
phperkaigi-2025-albatross-3b13a61123becc63823ab0c0941aaff2048b020e.tar.zst
phperkaigi-2025-albatross-3b13a61123becc63823ab0c0941aaff2048b020e.zip
feat(backend/worker): calculate code hash in api-server
Diffstat (limited to 'worker/models.go')
-rw-r--r--worker/models.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/worker/models.go b/worker/models.go
index c60002c..9f60eb0 100644
--- a/worker/models.go
+++ b/worker/models.go
@@ -19,6 +19,7 @@ var (
type swiftCompileRequestData struct {
MaxDurationMilliseconds int `json:"max_duration_ms"`
Code string `json:"code"`
+ CodeHash string `json:"code_hash"`
}
func (req *swiftCompileRequestData) maxDuration() time.Duration {
@@ -40,7 +41,7 @@ type swiftCompileResponseData struct {
type wasmCompileRequestData struct {
MaxDurationMilliseconds int `json:"max_duration_ms"`
- Code string `json:"code"`
+ CodeHash string `json:"code_hash"`
}
type wasmCompileResponseData struct {
@@ -62,7 +63,7 @@ func (req *wasmCompileRequestData) validate() error {
type testRunRequestData struct {
MaxDurationMilliseconds int `json:"max_duration_ms"`
- Code string `json:"code"`
+ CodeHash string `json:"code_hash"`
Stdin string `json:"stdin"`
}