global

package
v0.0.0-...-c665954 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArrayItem

type ArrayItem int

func (ArrayItem) String

func (a ArrayItem) String() string

type DataContext

type DataContext interface {
	Package() PackageContext
	Root() RootContext
	Location() Location
	New(location Location) DataContext
}

type FieldItem

type FieldItem string

func (FieldItem) String

func (f FieldItem) String() string

type Loader

type Loader interface {
	Load(pkg Package, filename string) interface{}
}

type Location

type Location interface {
	String() string
	Child(item stackItem) Location
}

type MapItem

type MapItem string

func (MapItem) String

func (m MapItem) String() string

type Packable

type Packable interface {
	Unpack(context DataContext, in interface{}) (null bool, err error)
	Repack(context DataContext) (value interface{}, dict bool, null bool, err error)
}

type Package

type Package interface {
	Path() string
	Unpack(context DataContext, in interface{}, name string) (value interface{}, null bool, err error)
	Repack(context DataContext, in interface{}, name string) (value interface{}, dict bool, null bool, err error)
	GetType(name string) string
	GetData(name string) string
	GetImportedPackages(packages map[string]Package)
}

type PackageContext

type PackageContext interface {
	Path() string
	Register(packages ...Package)
	Get(path string) Package
}

PackageContext describes the package, the package path, all the packages that are directly imported, and the flattened package import tree

type RootContext

type RootContext interface {
	Package() PackageContext
	RegisterImport(path string) string
	ParseImports(v interface{}) error
	Imports() map[string]string
}

RootContext describes a single json file that includes a "_import" field which maps the aliases to package paths.

type RootItem

type RootItem string

func (RootItem) String

func (r RootItem) String() string

type Stack

type Stack []stackItem

func NewStack

func NewStack(name string) Stack

func (Stack) Child

func (s Stack) Child(item stackItem) Location

func (Stack) String

func (s Stack) String() string

func (Stack) Wrap

func (s Stack) Wrap(err error) error

type ValidationContext

type ValidationContext interface {
	Package() PackageContext
	Location() Location
}

Jump to

Keyboard shortcuts

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