schema

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attribute

type Attribute struct {
	Poses []token.Pos
	Vals  []interface{}
}

type Module

type Module struct {
	*Source
	Id           string
	ModuleSource string
	Templates    []*Template
	EvalConfig   hil.EvalConfig
}

func (*Module) Load

func (m *Module) Load() error

type Resource

type Resource struct {
	*Source
	Type string
	Id   string
}

type Source

type Source struct {
	File  string
	Pos   token.Pos
	Attrs map[string]*Attribute
}

func (*Source) GetAllMapTokens

func (s *Source) GetAllMapTokens(name string) ([]map[string]token.Token, bool)

func (*Source) GetListToken

func (s *Source) GetListToken(name string) ([]token.Token, bool)

func (*Source) GetMapToken

func (s *Source) GetMapToken(name string) (map[string]token.Token, bool)

func (*Source) GetToken

func (s *Source) GetToken(name string) (token.Token, bool)

type Template

type Template struct {
	File      string
	Resources []*Resource
	Modules   []*Module
}

func Make

func Make(files map[string][]byte) ([]*Template, error)

func (*Template) FindModules

func (t *Template) FindModules(id string) []*Module

func (*Template) FindResources

func (t *Template) FindResources(query ...string) []*Resource

Jump to

Keyboard shortcuts

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