Documentation
¶
Overview ¶
Package schema provides versioned data structures for cf
Index ¶
Constants ¶
View Source
const ( TypeWorkspace = "workspace" TypeProblem = "problem" TypeSubmission = "submission" TypeProgress = "progress" TypeConfig = "config" )
Schema types
Variables ¶
View Source
var ( // CurrentVersion is the latest schema version CurrentVersion = Version{Major: 1, Minor: 0, Patch: 0} // MinSupportedVersion is the oldest version we can migrate from MinSupportedVersion = Version{Major: 1, Minor: 0, Patch: 0} )
Functions ¶
This section is empty.
Types ¶
type SchemaHeader ¶
type SchemaHeader struct {
Version string `yaml:"version" json:"version"`
Type string `yaml:"type" json:"type"`
}
SchemaHeader is embedded in all versioned YAML files
func NewSchemaHeader ¶
func NewSchemaHeader(schemaType string) SchemaHeader
NewSchemaHeader creates a new schema header with current version
type Version ¶
Version represents a semantic version
func ParseVersion ¶
ParseVersion parses a version string (e.g., "1.0.0")
func (Version) IsCompatible ¶
IsCompatible checks if two versions are compatible (same major version)
func (Version) NeedsMigration ¶
NeedsMigration checks if migration is needed between versions
Click to show internal directories.
Click to hide internal directories.