schema

package
v0.0.0-...-d9b9230 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Definitions = map[string][]Definition{}

Definitions is the list of all supported ASDF tags, sorted by `Version`.

Functions

func GabsifyYAML

func GabsifyYAML(container *gabs.Container, root *yaml.Node, key string) error

GabsifyYAML inserts the contents of a YAML node as another property of the JSON object, `key`.

Types

type Definition

type Definition interface {
	// Version returns the version of the schema.
	Version() semver.Version
	// UnmarshalYAML turns a YAML node into an object.
	UnmarshalYAML(value *yaml.Node) (interface{}, error)
}

Definition is an ASDF tag handler.

func FindDefinition

func FindDefinition(tag Tag) Definition

FindDefinition returns the schema definition for the given tag, or nil if no such definition exist.

type Tag

type Tag struct {
	Name    string
	Version semver.Version
}

Tag represents a versioned entity such as an ASDF tag.

func ParseTag

func ParseTag(str string) (Tag, error)

ParseTag parses the ASDF tag from a string.

func (Tag) String

func (tag Tag) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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