schema

package
v0.369.2 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoSchemaFiles = errors.New("no schema files found")

Functions

This section is empty.

Types

type Builder

type Builder struct {
	Config *config.ProjectConfig
	// contains filtered or unexported fields
}

A Builder knows how to produce a (validated) proto.Schema, from a given Keel Builder. Construct one, then call the Make method.

func (*Builder) ASTs

func (scm *Builder) ASTs() []*parser.AST

func (*Builder) MakeFromDirectory

func (scm *Builder) MakeFromDirectory(directory string) (*proto.Schema, error)

MakeFromDirectory constructs a proto.Schema from the .keel files present in the given directory.

func (*Builder) MakeFromFile

func (scm *Builder) MakeFromFile(filename string) (*proto.Schema, error)

MakeFromFile constructs a proto.Schema from the given .keel file.

func (*Builder) MakeFromInputs

func (scm *Builder) MakeFromInputs(inputs *reader.Inputs) (*proto.Schema, error)

MakeFromFile constructs a proto.Schema from the given inputs

func (*Builder) MakeFromString

func (scm *Builder) MakeFromString(schemaString string) (*proto.Schema, error)

func (*Builder) SchemaFiles

func (scm *Builder) SchemaFiles() []reader.SchemaFile

Jump to

Keyboard shortcuts

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