result

package
v2.2.5 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 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

PersistentJudgeResult 持久化评测记录

func ReadJudgeResult

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

ReadJudgeResult 读取判题结果

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 (内部成员,不输出)
}

JudgeResultPackage 评测结果包-数据结构 ------------------------ |MAG|VER|CMP|RSZ|BSZ|CSZ| Certificate |SSZ| Signature | Result | Body ------------------------ | 2 | 1 | 1 | 4 | 4 | 2 | ... | 2 | ... ------------------------

Jump to

Keyboard shortcuts

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