Version: v0.0.0-...-841437a Latest Latest

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

Go to latest
Published: Aug 11, 2019 License: Apache-2.0 Imports: 14 Imported by: 2




View Source
const Key = "Compiler"
View Source
const SchemaPackerKey = "SchemaPacker"


This section is empty.


func ToSchemaName

func ToSchemaName(fp string) string

Converts the Schema's filepath into its corresponding name.


type CompileAllOptions

type CompileAllOptions struct {
	Force bool

type CompileOptions

type CompileOptions struct {
	// The directory that the file will be output to. If the directory does not exist, it will be created.
	OutputDirectory string `validate:"required_without=DryRun"`
	DryRun          bool
	Type            string `validate:"omitempty,oneof=json toml yaml yml"`

type Compiler

type Compiler interface {
	Compile(filepath string, options CompileOptions) (*domain.CompiledSchema, error)
	CompileAll(path string, options CompileAllOptions) (SchemaPack, error)
	ValidateSemantics(manifest *domain.ParsedSchema) error
	Parse(fp string, options ParseOptions) (*domain.ParsedSchema, error)
	Load(root, fp string) (*domain.Schema, error)

type Package

type Package struct {

func (*Package) Bindings

func (*Package) Bindings() []axon.Binding

type ParseOptions

type ParseOptions struct {
	// The root directory of the file to parse which determines the name of the file. The file that is being
	// parsed must lie within this directory.
	Root string `validate:"required,file"`

type SchemaPack

type SchemaPack interface {
	Schemas() map[string]domain.CompiledSchema
	Path() string

func NewSchemaPack

func NewSchemaPack(path string) SchemaPack

type SchemaPackError

type SchemaPackError struct {
	// contains filtered or unexported fields

func NewSchemaPackError

func NewSchemaPackError(errs ...error) *SchemaPackError

func (*SchemaPackError) AddError

func (p *SchemaPackError) AddError(e error)

func (*SchemaPackError) Error

func (p *SchemaPackError) Error() string

func (*SchemaPackError) Errors

func (p *SchemaPackError) Errors() []error

type SchemaPacker

type SchemaPacker interface {
	AddSchema(pack SchemaPack, schema *domain.CompiledSchema) error

Jump to

Keyboard shortcuts

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