Documentation ¶
Index ¶
- Variables
- type Builder
- func (scm *Builder) ASTs() []*parser.AST
- func (scm *Builder) MakeFromDirectory(directory string) (*proto.Schema, error)
- func (scm *Builder) MakeFromInputs(inputs *reader.Inputs) (*proto.Schema, error)
- func (scm *Builder) MakeFromString(schemaString string, configString string) (*proto.Schema, error)
- func (scm *Builder) PrepareAst(allInputFiles *reader.Inputs) ([]*parser.AST, errorhandling.ValidationErrors, error)
- func (scm *Builder) SchemaFiles() []*reader.SchemaFile
- func (scm *Builder) ValidateFromInputs(inputs *reader.Inputs, includeWarnings bool) error
Constants ¶
This section is empty.
Variables ¶
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) MakeFromDirectory ¶
MakeFromDirectory constructs a proto.Schema from the .keel files present in the given directory.
func (*Builder) MakeFromInputs ¶
MakeFromFile constructs a proto.Schema from the given inputs
func (*Builder) MakeFromString ¶
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
func (*Builder) ValidateFromInputs ¶ added in v0.386.1
ValidateFromInputs will tyake the given inputs and build the ASTs and run all validators, including/excluding warnings based on the given param. Similar with MakeFromInputs, this function avoide building the protoModels for increased performance when only validation is required