Documentation
¶
Index ¶
- func IsProblemPackage(filePath string) (bool, error)
- func PackProblems(configuration *commonStructs.JudgeConfiguration, ...) error
- func ReadProblemGPGInfo(problemFile string) (string, error)
- func ReadProblemInfo(problemFile string, unpackBody, validate bool, workDir string) (*commonStructs.JudgeConfiguration, string, error)
- type ProblemPackage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PackProblems ¶
func PackProblems( configuration *commonStructs.JudgeConfiguration, options *persistence.ProblemPackageOptions, ) error
func ReadProblemInfo ¶
func ReadProblemInfo(problemFile string, unpackBody, validate bool, workDir string) (*commonStructs.JudgeConfiguration, string, error)
读取题目信息
Types ¶
type ProblemPackage ¶
type ProblemPackage struct {
Version uint16 // (VER) Package Version
CommitVersion uint32 // (CMT) Commit Version
ConfigSize uint32 // (CSZ) Config JSON Text Size
BodySize uint32 // (BSZ) Result Body Size
CertSize uint16 // (PCSZ) Public Certificate Size
SignSize uint16 // (SSZ) Signature Size
Certificate []byte // Public Certificate
Signature []byte // Signature: SHA256(Result + Body)
Configs []byte // Configs JSON
BodyPackageFile string // Body package file
}
******** ------------------------ |MAG|VER|CMT|CSZ|BSZ|PCSZ| Certificate |SSZ| Signature | Result | Body ------------------------ | 2 | 2 | 4 | 4 | 4 | 2 | ... | 2 | ... ------------------------ *********
Click to show internal directories.
Click to hide internal directories.