schema

package
v0.379.2-next.1 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: AGPL-3.0 Imports: 16 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) 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, configString string) (*proto.Schema, error)

func (*Builder) PrepareAst added in v0.370.1

func (scm *Builder) PrepareAst(allInputFiles *reader.Inputs) ([]*parser.AST, errorhandling.ValidationErrors, error)

PrepareAst will parse the ASTs and will add built-in models, fields, and other bits.

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