Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidFamily = errors.New("invalid schema family") ErrInvalidVersion = errors.New("invalid schema version") )
Functions ¶
This section is empty.
Types ¶
type Version ¶
type Version struct {
Major, Minor, Patch int
}
Version is a machine readable version of the string schema identifier that can assist in making indexing easier
func GetFamilyAndVersion ¶
GetFamilyAndVersion takes a schemaURL and separates the family from the identifier.
func NewVersion ¶
NewVersion converts a near semver like string (ie 1.4.0) into a schema identifier that is comparable for a machine. The expected string format can be matched by the following regex: [0-9]+\.[0-9]+\.[0-9]+
func ReadVersionFromPath ¶
ReadVersionFromPath allows for parsing paths that end in a schema version number string
func (*Version) Compare ¶
Compare returns a digit to represent if the v is equal, less than, or greater than o. The values are 0, -1 and 1 respectively.
func (*Version) GreaterThan ¶
Click to show internal directories.
Click to hide internal directories.