Documentation
¶
Overview ¶
Package workspace manages the cf workspace
Index ¶
- Constants
- type Workspace
- func (w *Workspace) Exists() bool
- func (w *Workspace) GetSchemaVersion() (schema.Version, error)
- func (w *Workspace) Init(name, handle string) error
- func (w *Workspace) ListProblems() ([]*v1.Problem, error)
- func (w *Workspace) Load() error
- func (w *Workspace) LoadManifest() (*v1.Workspace, error)
- func (w *Workspace) LoadProblem(platform string, contestID int, index string) (*v1.Problem, error)
- func (w *Workspace) LoadStatement(platform string, contestID int, index string) (string, error)
- func (w *Workspace) Manifest() *v1.Workspace
- func (w *Workspace) ManifestPath() string
- func (w *Workspace) ProblemExists(platform string, contestID int, index string) bool
- func (w *Workspace) ProblemPath(platform string, contestID int, index string) string
- func (w *Workspace) ProblemsPath() string
- func (w *Workspace) Root() string
- func (w *Workspace) SaveManifest() error
- func (w *Workspace) SaveNotes(platform string, contestID int, index string, notes *v1.UserNotes) error
- func (w *Workspace) SaveProblem(problem *v1.Problem) error
- func (w *Workspace) SaveStatement(problem *v1.Problem, statement string) error
- func (w *Workspace) StatsPath() string
- func (w *Workspace) SubmissionsPath() string
- func (w *Workspace) TemplatesPath() string
- func (w *Workspace) UpdatePractice(platform string, contestID int, index string, practice *v1.PracticeData) error
- func (w *Workspace) Validate() error
Constants ¶
const ( ManifestFile = "workspace.yaml" ProblemsDir = "problems" TemplatesDir = "templates" SubmissionsDir = "submissions" StatsDir = "stats" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Workspace ¶
type Workspace struct {
// contains filtered or unexported fields
}
Workspace manages a cf workspace
func (*Workspace) GetSchemaVersion ¶
GetSchemaVersion returns the schema version from manifest
func (*Workspace) ListProblems ¶
ListProblems lists all problems in the workspace
func (*Workspace) LoadManifest ¶
LoadManifest loads the workspace manifest
func (*Workspace) LoadProblem ¶
LoadProblem loads a problem from the workspace
func (*Workspace) LoadStatement ¶
LoadStatement loads the problem statement
func (*Workspace) ManifestPath ¶
ManifestPath returns the path to workspace.yaml
func (*Workspace) ProblemExists ¶
ProblemExists checks if a problem exists in the workspace
func (*Workspace) ProblemPath ¶
ProblemPath returns the path for a specific problem
func (*Workspace) ProblemsPath ¶
ProblemsPath returns the problems directory path
func (*Workspace) SaveManifest ¶
SaveManifest saves the workspace manifest
func (*Workspace) SaveNotes ¶
func (w *Workspace) SaveNotes(platform string, contestID int, index string, notes *v1.UserNotes) error
SaveNotes saves user notes for a problem
func (*Workspace) SaveProblem ¶
SaveProblem saves a problem to the workspace
func (*Workspace) SaveStatement ¶
SaveStatement saves the problem statement as markdown
func (*Workspace) SubmissionsPath ¶
SubmissionsPath returns the submissions directory path
func (*Workspace) TemplatesPath ¶
TemplatesPath returns the templates directory path
func (*Workspace) UpdatePractice ¶
func (w *Workspace) UpdatePractice(platform string, contestID int, index string, practice *v1.PracticeData) error
UpdatePractice updates practice data for a problem