judge_result

package
v0.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2021 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PersistentJudgeResult

func PersistentJudgeResult(
	judgeResult *commonStructs.JudgeResult,
	options *persistence.JudgeResultPersisOptions,
) error

func ReadJudgeResult

func ReadJudgeResult(resultFile string) (*commonStructs.JudgeResult, error)

读取判题结果

Types

type JudgeResultPackage

type JudgeResultPackage struct {
	Version         uint8  // (VER) Package Version
	CompressorType  uint8  // (CMP) Compressor type: 0-disabled; 1-gzip
	ResultSize      uint32 // (RSZ) Result JSON Text Size
	BodySize        uint32 // (BSZ) Result Body Size
	CertSize        uint16 // (CSZ) Public Certificate Size
	SignSize        uint16 // (SSZ) Signature Size
	Certificate     []byte // Public Certificate
	Signature       []byte // Signature: SHA256(Result + Body)
	Result          []byte // Result JSON
	BodyPackageFile string // Body package file (内部成员,不输出)
}

******** ------------------------ |MAG|VER|CMP|RSZ|BSZ|CSZ| Certificate |SSZ| Signature | Result | Body ------------------------ | 2 | 1 | 1 | 4 | 4 | 2 | ... | 2 | ... ------------------------ *********

type JudgeResultPackageBody

type JudgeResultPackageBody struct {
	BodyPackageFile string
	Files           []struct {
		Size     uint32
		FileName string
		Position uint32
	}
}

** 已弃用 ------------------------ Magic | Size | FileName | Content ------------------------

2   |  4  | (Sep: \n) |  ...

------------------------ **

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL