v1compat

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2018 License: BSD-3-Clause Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// InputVersion represents a global version. Bump if a fundamentally breaking
	// change is introduced.
	InputVersion = 2
)

Variables

This section is empty.

Functions

func CreateArchiveFromGit

func CreateArchiveFromGit(
	problemName string,
	archivePath string,
	repositoryPath string,
	inputHash string,
	loader *SettingsLoader,
) (*common.ProblemSettings, int64, error)

CreateArchiveFromGit creates an archive that can be sent to a Runner as an Input from a git repository.

func NewInputFactory added in v1.1.0

func NewInputFactory(
	problemName string,
	config *common.Config,
	loader *SettingsLoader,
) common.InputFactory

NewInputFactory returns a new InputFactory.

func VersionedHash added in v1.1.0

func VersionedHash(
	libinteractiveVersion string,
	problemInfo *ProblemInformation,
	settings *common.ProblemSettings,
) string

VersionedHash returns the hash for a specified problem. It takes into account the global InputVersion, the libinteractive version (for interactive problems), and the hash of the tree in git.

Types

type ProblemInformation added in v1.1.0

type ProblemInformation struct {
	TreeID        string
	IsInteractive bool
}

A ProblemInformation represents information from the problem.

func GetProblemInformation added in v1.1.0

func GetProblemInformation(repositoryPath string) (*ProblemInformation, error)

GetProblemInformation returns the ProblemInformation obtained from the git repository located at the provided repository path.

type SettingsLoader

type SettingsLoader struct {
	Settings *common.ProblemSettings
	GitTree  string
}

A SettingsLoader allows to load ProblemSettings from a particular git tree hash.

Jump to

Keyboard shortcuts

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