Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Annotated ¶
type Annotated interface {
LookupAttribute(fidl.Identifier) (fidl.Attribute, bool)
}
TODO(pascallouis): rethink how we depend on the fidlgen package.
type Bits ¶
type Bits struct { fidl.Bits Name string Members []BitsMember TypeSymbol string TypeExpr string Mask uint64 Documented }
Bits represents a bits declaration.
type BitsMember ¶
type BitsMember struct { Name string Value string Documented }
BitsMember represents a member of a bits declaration.
type Const ¶
type Const struct { Type Type Name string Value string Documented }
Const represents a constant declaration.
type Documented ¶
type Documented struct {
Doc []string
}
Documented is embedded in structs for declarations that may hold documentation.
type Enum ¶
type Enum struct { fidl.Enum Name string Members []EnumMember TypeSymbol string TypeExpr string Documented }
Enum represents an enum declaration.
type EnumMember ¶
type EnumMember struct { fidl.EnumMember Name string Value string Documented }
EnumMember represents a member of an enum declaration.
type FidlGenerator ¶
type FidlGenerator struct {
// contains filtered or unexported fields
}
func NewFidlGenerator ¶
func NewFidlGenerator() *FidlGenerator
func (FidlGenerator) GenerateAsyncFile ¶
func (gen FidlGenerator) GenerateAsyncFile(tree Root, path string, dartfmt string) error
func (FidlGenerator) GenerateTestFile ¶
func (gen FidlGenerator) GenerateTestFile(tree Root, path string, dartfmt string) error
type Interface ¶
type Interface struct { Name string ServiceName string ServiceData string ProxyName string BindingName string EventsName string Methods []Method HasEvents bool Documented }
Interface represents an interface declaration.
type Method ¶
type Method struct { Ordinal uint64 OrdinalName string Name string HasRequest bool Request []StructMember HasResponse bool Response MethodResponse // AsyncResponseClass is a named tuple that wraps the MethodParameters of // a response, and is only generated when there is more than one parameter AsyncResponseClass string AsyncResponseType string CallbackType string TypeSymbol string TypeExpr string Transitional bool Documented }
Method represents a method declaration within an interface declaration.
type MethodResponse ¶
type MethodResponse struct { // WireParameters represent the parameters of the top level response struct // that is sent on the wire WireParameters []StructMember // MethodParameters represent the parameters that the user interacts with // when using generated methods. When HasError is false, this is the same as // WireParameters. When HasError is true, MethodParameters corresponds to the // fields of a successful response. MethodParameters []StructMember HasError bool ResultType Union ValueType Type ErrorType Type }
type Root ¶
type Root struct { LibraryName string Imports []Import Consts []Const Enums []Enum Bits []Bits Interfaces []Interface Structs []Struct Tables []Table Unions []Union }
Root holds all of the declarations for a FIDL library.
type Struct ¶
type Struct struct { Name string Members []StructMember TypeSymbol string TypeExpr string HasNullableField bool Documented }
Struct represents a struct declaration.
type StructMember ¶
type StructMember struct { Type Type TypeSymbol string Name string DefaultValue string OffsetV1 int Documented // contains filtered or unexported fields }
StructMember represents a member of a struct declaration.
type Table ¶
type Table struct { fidl.Table Name string Members []TableMember TypeSymbol string TypeExpr string Documented }
Table represents a table declaration.
type TableMember ¶
type TableMember struct { Ordinal int Index int Type Type Name string DefaultValue string Documented // contains filtered or unexported fields }
TableMember represents a member of a table declaration.
type Type ¶
type Type struct { Decl string // type in traditional bindings SyncDecl string // type in async bindings when referring to traditional bindings AsyncDecl string // type in async bindings when referring to async bindings OptionalDecl string // type when the value is optional Nullable bool // contains filtered or unexported fields }
Type represents a FIDL datatype.
type Union ¶
type Union struct { fidl.Union Name string TagName string Members []UnionMember TypeSymbol string TypeExpr string OptTypeSymbol string OptTypeExpr string Documented }
Union represents a union declaration.
type UnionMember ¶
type UnionMember struct { Ordinal uint64 Type Type Name string CtorName string Tag string Documented }
UnionMember represents a member of a Union declaration.