Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AST ¶
type AST struct {
Types []*ASTElement `parser:"{ @@ }"`
}
AST represents the structure of a parsed firemodel schema file.
Read about the magical annotations here: https://github.com/alecthomas/participle/.
type ASTElement ¶
type ASTEnum ¶
type ASTEnum struct { Identifier ASTIdentifier `parser:"@Ident '{'"` Values []*ASTEnumValue `parser:"{ @@ } '}'"` }
type ASTEnumValue ¶
type ASTField ¶
type ASTField struct { Comment string `parser:"{ @Comment }"` Type *ASTFieldType `parser:"@@"` Name string `parser:"@Ident ';'"` }
type ASTFieldType ¶
type ASTFieldType struct { Base ASTType `parser:"@Ident"` Generic *ASTFieldType `parser:"[ '<' @@ '>' ]"` }
func (*ASTFieldType) IsPrimitive ¶
func (ft *ASTFieldType) IsPrimitive() bool
func (*ASTFieldType) String ¶
func (ft *ASTFieldType) String() string
type ASTIdentifier ¶
type ASTIdentifier string
func (ASTIdentifier) IsReserved ¶
func (id ASTIdentifier) IsReserved() bool
type ASTModel ¶
type ASTModel struct { Identifier ASTIdentifier `parser:"@Ident"` Elements []*ASTModelElement `parser:"'{' { @@ } '}'"` }
type ASTModelElement ¶
type ASTOption ¶
type ASTOption struct { Language string `parser:"@Ident '.'"` Key ASTIdentifier `parser:"@Ident '='"` Value string `parser:"@('true' | 'false' | 'null' | String | Int) ';'"` }
type ASTStruct ¶ added in v0.0.5
type ASTStruct struct { Identifier ASTIdentifier `parser:"@Ident"` Elements []*ASTStructElement `parser:"'{' { @@ } '}'"` }
type ASTStructElement ¶ added in v0.0.5
type ASTStructElement struct {
Field *ASTField `parser:"@@"`
}
type ASTType ¶
type ASTType string
const ( Boolean ASTType = "boolean" Integer ASTType = "integer" Double ASTType = "double" Timestamp ASTType = "timestamp" String ASTType = "string" Bytes ASTType = "bytes" Reference ASTType = "reference" GeoPoint ASTType = "geopoint" Array ASTType = "array" Map ASTType = "map" // Fake types. URL ASTType = "URL" File ASTType = "File" )
func (ASTType) IsCollection ¶
Click to show internal directories.
Click to hide internal directories.