Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions connector/file/connector.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package file

import (
"github.com/cranemont/judge-manager/router"
"github.com/cranemont/judge-manager/service/file"
"github.com/cranemont/judge-manager/service/logger"
)
Comment on lines +3 to +7
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test commnet


type connector struct {
file file.FileManager
router router.Router
logger logger.Logger
}

func NewConnector(f file.FileManager, r router.Router, l logger.Logger) *connector {
return &connector{f, r, l}
}

func (c *connector) Connect() {
// validate file source
}

func (c *connector) Disconnect() {
// relaese resources
}

func (c *connector) Handle() {

}
5 changes: 5 additions & 0 deletions connector/file/data/script.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"mode": "judge",
"policy": "temporal",
"dir": "./data"
}
7 changes: 7 additions & 0 deletions connector/file/data/submission_1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"problemId": 1,
"code": "#include<stdio.h>\n\n int main () {\n int a;\n scanf(\"%d\\n\", &a);\n printf(\"%d\\n\", a);\n}\n",
"language": "C",
"timeLimit": 1000,
"memoryLimit": 268435456
Comment on lines +3 to +6
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test comment with mention @nmemn

}
27 changes: 27 additions & 0 deletions connector/file/data/testcase_1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[
{
"id": 1,
"input": 1,
"output": 1
},
{
"id": 1,
"input": 22,
"output": 22
},
{
"id": 1,
"input": 333,
"output": 333
},
{
"id": 1,
"input": 4444,
"output": 4444
},
{
"id": 1,
"input": 55555,
"output": 55555
}
]