Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ValidDirectives = []string{
"reverse",
"index",
"count",
"upsert",
"noconflict",
"lang",
}
View Source
var ValidTypenames = []string{
"default",
"binary",
"int",
"float",
"bool",
"datetime",
"geo",
"uid",
"string",
"password",
}
https://github.com/dgraph-io/dgraph/blob/master/types/scalar_types.go
Functions ¶
This section is empty.
Types ¶
type DirectiveDef ¶
func (*DirectiveDef) Validate ¶ added in v0.2.0
func (dd *DirectiveDef) Validate() error
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser represents a parser.
type PredicateDef ¶
type PredicateDef struct { Name string Typename string IsArray bool Directives []*DirectiveDef // contains filtered or unexported fields }
func (*PredicateDef) Validate ¶ added in v0.2.0
func (pd *PredicateDef) Validate() error
func (*PredicateDef) WriteOn ¶
func (pd *PredicateDef) WriteOn(w io.Writer)
type Schema ¶
type Schema struct { Filename string Predicates []*PredicateDef Types []*TypeDef }
func (*Schema) FindPredicate ¶
func (s *Schema) FindPredicate(name string) *PredicateDef
FindPredicate searches in all predicates and types for a definition. Return nil if not found.
Click to show internal directories.
Click to hide internal directories.