reflection

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EnumNamesBaseType = map[BaseType]string{
	BaseTypeNone:   "None",
	BaseTypeUType:  "UType",
	BaseTypeBool:   "Bool",
	BaseTypeByte:   "Byte",
	BaseTypeUByte:  "UByte",
	BaseTypeShort:  "Short",
	BaseTypeUShort: "UShort",
	BaseTypeInt:    "Int",
	BaseTypeUInt:   "UInt",
	BaseTypeLong:   "Long",
	BaseTypeULong:  "ULong",
	BaseTypeFloat:  "Float",
	BaseTypeDouble: "Double",
	BaseTypeString: "String",
	BaseTypeVector: "Vector",
	BaseTypeObj:    "Obj",
	BaseTypeUnion:  "Union",
	BaseTypeArray:  "Array",
}
View Source
var EnumValuesBaseType = map[string]BaseType{
	"None":   BaseTypeNone,
	"UType":  BaseTypeUType,
	"Bool":   BaseTypeBool,
	"Byte":   BaseTypeByte,
	"UByte":  BaseTypeUByte,
	"Short":  BaseTypeShort,
	"UShort": BaseTypeUShort,
	"Int":    BaseTypeInt,
	"UInt":   BaseTypeUInt,
	"Long":   BaseTypeLong,
	"ULong":  BaseTypeULong,
	"Float":  BaseTypeFloat,
	"Double": BaseTypeDouble,
	"String": BaseTypeString,
	"Vector": BaseTypeVector,
	"Obj":    BaseTypeObj,
	"Union":  BaseTypeUnion,
	"Array":  BaseTypeArray,
}

Functions

func EnumAddAttributes

func EnumAddAttributes(builder *flatbuffers.Builder, attributes flatbuffers.UOffsetT)

func EnumAddDocumentation

func EnumAddDocumentation(builder *flatbuffers.Builder, documentation flatbuffers.UOffsetT)

func EnumAddIsUnion

func EnumAddIsUnion(builder *flatbuffers.Builder, isUnion bool)

func EnumAddName

func EnumAddName(builder *flatbuffers.Builder, name flatbuffers.UOffsetT)

func EnumAddUnderlyingType

func EnumAddUnderlyingType(builder *flatbuffers.Builder, underlyingType flatbuffers.UOffsetT)

func EnumAddValues

func EnumAddValues(builder *flatbuffers.Builder, values flatbuffers.UOffsetT)

func EnumEnd

func EnumEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT

func EnumStart

func EnumStart(builder *flatbuffers.Builder)

func EnumStartAttributesVector

func EnumStartAttributesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT

func EnumStartDocumentationVector

func EnumStartDocumentationVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT

func EnumStartValuesVector

func EnumStartValuesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT

func EnumValAddDocumentation

func EnumValAddDocumentation(builder *flatbuffers.Builder, documentation flatbuffers.UOffsetT)

func EnumValAddName

func EnumValAddName(builder *flatbuffers.Builder, name flatbuffers.UOffsetT)

func EnumValAddObject

func EnumValAddObject(builder *flatbuffers.Builder, object flatbuffers.UOffsetT)

func EnumValAddUnionType

func EnumValAddUnionType(builder *flatbuffers.Builder, unionType flatbuffers.UOffsetT)

func EnumValAddValue

func EnumValAddValue(builder *flatbuffers.Builder, value int64)

func EnumValEnd

func EnumValEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT

func EnumValStart

func EnumValStart(builder *flatbuffers.Builder)

func EnumValStartDocumentationVector

func EnumValStartDocumentationVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT

func FieldAddAttributes

func FieldAddAttributes(builder *flatbuffers.Builder, attributes flatbuffers.UOffsetT)

func FieldAddDefaultInteger

func FieldAddDefaultInteger(builder *flatbuffers.Builder, defaultInteger int64)

func FieldAddDefaultReal

func FieldAddDefaultReal(builder *flatbuffers.Builder, defaultReal float64)

func FieldAddDeprecated

func FieldAddDeprecated(builder *flatbuffers.Builder, deprecated bool)

func FieldAddDocumentation

func FieldAddDocumentation(builder *flatbuffers.Builder, documentation flatbuffers.UOffsetT)

func FieldAddId

func FieldAddId(builder *flatbuffers.Builder, id uint16)

func FieldAddKey

func FieldAddKey(builder *flatbuffers.Builder, key bool)

func FieldAddName

func FieldAddName(builder *flatbuffers.Builder, name flatbuffers.UOffsetT)

func FieldAddOffset

func FieldAddOffset(builder *flatbuffers.Builder, offset uint16)

func FieldAddRequired

func FieldAddRequired(builder *flatbuffers.Builder, required bool)

func FieldAddType

func FieldAddType(builder *flatbuffers.Builder, type_ flatbuffers.UOffsetT)

func FieldEnd

func FieldEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT

func FieldStart

func FieldStart(builder *flatbuffers.Builder)

func FieldStartAttributesVector

func FieldStartAttributesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT

func FieldStartDocumentationVector

func FieldStartDocumentationVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT

func KeyValueAddKey

func KeyValueAddKey(builder *flatbuffers.Builder, key flatbuffers.UOffsetT)

func KeyValueAddValue

func KeyValueAddValue(builder *flatbuffers.Builder, value flatbuffers.UOffsetT)

func KeyValueEnd

func KeyValueEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT

func KeyValueStart

func KeyValueStart(builder *flatbuffers.Builder)

func ObjectAddAttributes

func ObjectAddAttributes(builder *flatbuffers.Builder, attributes flatbuffers.UOffsetT)

func ObjectAddBytesize

func ObjectAddBytesize(builder *flatbuffers.Builder, bytesize int32)

func ObjectAddDocumentation

func ObjectAddDocumentation(builder *flatbuffers.Builder, documentation flatbuffers.UOffsetT)

func ObjectAddFields

func ObjectAddFields(builder *flatbuffers.Builder, fields flatbuffers.UOffsetT)

func ObjectAddIsStruct

func ObjectAddIsStruct(builder *flatbuffers.Builder, isStruct bool)

func ObjectAddMinalign

func ObjectAddMinalign(builder *flatbuffers.Builder, minalign int32)

func ObjectAddName

func ObjectAddName(builder *flatbuffers.Builder, name flatbuffers.UOffsetT)

func ObjectEnd

func ObjectEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT

func ObjectStart

func ObjectStart(builder *flatbuffers.Builder)

func ObjectStartAttributesVector

func ObjectStartAttributesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT

func ObjectStartDocumentationVector

func ObjectStartDocumentationVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT

func ObjectStartFieldsVector

func ObjectStartFieldsVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT

func RPCCallAddAttributes

func RPCCallAddAttributes(builder *flatbuffers.Builder, attributes flatbuffers.UOffsetT)

func RPCCallAddDocumentation

func RPCCallAddDocumentation(builder *flatbuffers.Builder, documentation flatbuffers.UOffsetT)

func RPCCallAddName

func RPCCallAddName(builder *flatbuffers.Builder, name flatbuffers.UOffsetT)

func RPCCallAddRequest

func RPCCallAddRequest(builder *flatbuffers.Builder, request flatbuffers.UOffsetT)

func RPCCallAddResponse

func RPCCallAddResponse(builder *flatbuffers.Builder, response flatbuffers.UOffsetT)

func RPCCallEnd

func RPCCallEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT

func RPCCallStart

func RPCCallStart(builder *flatbuffers.Builder)

func RPCCallStartAttributesVector

func RPCCallStartAttributesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT

func RPCCallStartDocumentationVector

func RPCCallStartDocumentationVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT

func SchemaAddEnums

func SchemaAddEnums(builder *flatbuffers.Builder, enums flatbuffers.UOffsetT)

func SchemaAddFileExt

func SchemaAddFileExt(builder *flatbuffers.Builder, fileExt flatbuffers.UOffsetT)

func SchemaAddFileIdent

func SchemaAddFileIdent(builder *flatbuffers.Builder, fileIdent flatbuffers.UOffsetT)

func SchemaAddObjects

func SchemaAddObjects(builder *flatbuffers.Builder, objects flatbuffers.UOffsetT)

func SchemaAddRootTable

func SchemaAddRootTable(builder *flatbuffers.Builder, rootTable flatbuffers.UOffsetT)

func SchemaAddServices

func SchemaAddServices(builder *flatbuffers.Builder, services flatbuffers.UOffsetT)

func SchemaEnd

func SchemaEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT

func SchemaStart

func SchemaStart(builder *flatbuffers.Builder)

func SchemaStartEnumsVector

func SchemaStartEnumsVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT

func SchemaStartObjectsVector

func SchemaStartObjectsVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT

func SchemaStartServicesVector

func SchemaStartServicesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT

func ServiceAddAttributes

func ServiceAddAttributes(builder *flatbuffers.Builder, attributes flatbuffers.UOffsetT)

func ServiceAddCalls

func ServiceAddCalls(builder *flatbuffers.Builder, calls flatbuffers.UOffsetT)

func ServiceAddDocumentation

func ServiceAddDocumentation(builder *flatbuffers.Builder, documentation flatbuffers.UOffsetT)

func ServiceAddName

func ServiceAddName(builder *flatbuffers.Builder, name flatbuffers.UOffsetT)

func ServiceEnd

func ServiceEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT

func ServiceStart

func ServiceStart(builder *flatbuffers.Builder)

func ServiceStartAttributesVector

func ServiceStartAttributesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT

func ServiceStartCallsVector

func ServiceStartCallsVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT

func ServiceStartDocumentationVector

func ServiceStartDocumentationVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT

func TypeAddBaseType

func TypeAddBaseType(builder *flatbuffers.Builder, baseType BaseType)

func TypeAddElement

func TypeAddElement(builder *flatbuffers.Builder, element BaseType)

func TypeAddFixedLength

func TypeAddFixedLength(builder *flatbuffers.Builder, fixedLength uint16)

func TypeAddIndex

func TypeAddIndex(builder *flatbuffers.Builder, index int32)

func TypeEnd

func TypeEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT

func TypeStart

func TypeStart(builder *flatbuffers.Builder)

Types

type BaseType

type BaseType int8
const (
	BaseTypeNone   BaseType = 0
	BaseTypeUType  BaseType = 1
	BaseTypeBool   BaseType = 2
	BaseTypeByte   BaseType = 3
	BaseTypeUByte  BaseType = 4
	BaseTypeShort  BaseType = 5
	BaseTypeUShort BaseType = 6
	BaseTypeInt    BaseType = 7
	BaseTypeUInt   BaseType = 8
	BaseTypeLong   BaseType = 9
	BaseTypeULong  BaseType = 10
	BaseTypeFloat  BaseType = 11
	BaseTypeDouble BaseType = 12
	BaseTypeString BaseType = 13
	BaseTypeVector BaseType = 14
	BaseTypeObj    BaseType = 15
	BaseTypeUnion  BaseType = 16
	BaseTypeArray  BaseType = 17
)

func (BaseType) String

func (v BaseType) String() string

type Enum

type Enum struct {
	// contains filtered or unexported fields
}

func GetRootAsEnum

func GetRootAsEnum(buf []byte, offset flatbuffers.UOffsetT) *Enum

func (*Enum) Attributes

func (rcv *Enum) Attributes(obj *KeyValue, j int) bool

func (*Enum) AttributesLength

func (rcv *Enum) AttributesLength() int

func (*Enum) Documentation

func (rcv *Enum) Documentation(j int) []byte

func (*Enum) DocumentationLength

func (rcv *Enum) DocumentationLength() int

func (*Enum) Init

func (rcv *Enum) Init(buf []byte, i flatbuffers.UOffsetT)

func (*Enum) IsUnion

func (rcv *Enum) IsUnion() bool

func (*Enum) MutateIsUnion

func (rcv *Enum) MutateIsUnion(n bool) bool

func (*Enum) Name

func (rcv *Enum) Name() []byte

func (*Enum) Table

func (rcv *Enum) Table() flatbuffers.Table

func (*Enum) UnderlyingType

func (rcv *Enum) UnderlyingType(obj *Type) *Type

func (*Enum) Values

func (rcv *Enum) Values(obj *EnumVal, j int) bool

func (*Enum) ValuesLength

func (rcv *Enum) ValuesLength() int

type EnumVal

type EnumVal struct {
	// contains filtered or unexported fields
}

func GetRootAsEnumVal

func GetRootAsEnumVal(buf []byte, offset flatbuffers.UOffsetT) *EnumVal

func (*EnumVal) Documentation

func (rcv *EnumVal) Documentation(j int) []byte

func (*EnumVal) DocumentationLength

func (rcv *EnumVal) DocumentationLength() int

func (*EnumVal) Init

func (rcv *EnumVal) Init(buf []byte, i flatbuffers.UOffsetT)

func (*EnumVal) MutateValue

func (rcv *EnumVal) MutateValue(n int64) bool

func (*EnumVal) Name

func (rcv *EnumVal) Name() []byte

func (*EnumVal) Object

func (rcv *EnumVal) Object(obj *Object) *Object

func (*EnumVal) Table

func (rcv *EnumVal) Table() flatbuffers.Table

func (*EnumVal) UnionType

func (rcv *EnumVal) UnionType(obj *Type) *Type

func (*EnumVal) Value

func (rcv *EnumVal) Value() int64

type Field

type Field struct {
	// contains filtered or unexported fields
}

func GetRootAsField

func GetRootAsField(buf []byte, offset flatbuffers.UOffsetT) *Field

func (*Field) Attributes

func (rcv *Field) Attributes(obj *KeyValue, j int) bool

func (*Field) AttributesLength

func (rcv *Field) AttributesLength() int

func (*Field) DefaultInteger

func (rcv *Field) DefaultInteger() int64

func (*Field) DefaultReal

func (rcv *Field) DefaultReal() float64

func (*Field) Deprecated

func (rcv *Field) Deprecated() bool

func (*Field) Documentation

func (rcv *Field) Documentation(j int) []byte

func (*Field) DocumentationLength

func (rcv *Field) DocumentationLength() int

func (*Field) Id

func (rcv *Field) Id() uint16

func (*Field) Init

func (rcv *Field) Init(buf []byte, i flatbuffers.UOffsetT)

func (*Field) Key

func (rcv *Field) Key() bool

func (*Field) MutateDefaultInteger

func (rcv *Field) MutateDefaultInteger(n int64) bool

func (*Field) MutateDefaultReal

func (rcv *Field) MutateDefaultReal(n float64) bool

func (*Field) MutateDeprecated

func (rcv *Field) MutateDeprecated(n bool) bool

func (*Field) MutateId

func (rcv *Field) MutateId(n uint16) bool

func (*Field) MutateKey

func (rcv *Field) MutateKey(n bool) bool

func (*Field) MutateOffset

func (rcv *Field) MutateOffset(n uint16) bool

func (*Field) MutateRequired

func (rcv *Field) MutateRequired(n bool) bool

func (*Field) Name

func (rcv *Field) Name() []byte

func (*Field) Offset

func (rcv *Field) Offset() uint16

func (*Field) Required

func (rcv *Field) Required() bool

func (*Field) Table

func (rcv *Field) Table() flatbuffers.Table

func (*Field) Type

func (rcv *Field) Type(obj *Type) *Type

type KeyValue

type KeyValue struct {
	// contains filtered or unexported fields
}

func GetRootAsKeyValue

func GetRootAsKeyValue(buf []byte, offset flatbuffers.UOffsetT) *KeyValue

func (*KeyValue) Init

func (rcv *KeyValue) Init(buf []byte, i flatbuffers.UOffsetT)

func (*KeyValue) Key

func (rcv *KeyValue) Key() []byte

func (*KeyValue) Table

func (rcv *KeyValue) Table() flatbuffers.Table

func (*KeyValue) Value

func (rcv *KeyValue) Value() []byte

type Object

type Object struct {
	// contains filtered or unexported fields
}

func GetRootAsObject

func GetRootAsObject(buf []byte, offset flatbuffers.UOffsetT) *Object

func (*Object) Attributes

func (rcv *Object) Attributes(obj *KeyValue, j int) bool

func (*Object) AttributesLength

func (rcv *Object) AttributesLength() int

func (*Object) Bytesize

func (rcv *Object) Bytesize() int32

func (*Object) Documentation

func (rcv *Object) Documentation(j int) []byte

func (*Object) DocumentationLength

func (rcv *Object) DocumentationLength() int

func (*Object) Fields

func (rcv *Object) Fields(obj *Field, j int) bool

func (*Object) FieldsLength

func (rcv *Object) FieldsLength() int

func (*Object) Init

func (rcv *Object) Init(buf []byte, i flatbuffers.UOffsetT)

func (*Object) IsStruct

func (rcv *Object) IsStruct() bool

func (*Object) Minalign

func (rcv *Object) Minalign() int32

func (*Object) MutateBytesize

func (rcv *Object) MutateBytesize(n int32) bool

func (*Object) MutateIsStruct

func (rcv *Object) MutateIsStruct(n bool) bool

func (*Object) MutateMinalign

func (rcv *Object) MutateMinalign(n int32) bool

func (*Object) Name

func (rcv *Object) Name() []byte

func (*Object) Table

func (rcv *Object) Table() flatbuffers.Table

type RPCCall

type RPCCall struct {
	// contains filtered or unexported fields
}

func GetRootAsRPCCall

func GetRootAsRPCCall(buf []byte, offset flatbuffers.UOffsetT) *RPCCall

func (*RPCCall) Attributes

func (rcv *RPCCall) Attributes(obj *KeyValue, j int) bool

func (*RPCCall) AttributesLength

func (rcv *RPCCall) AttributesLength() int

func (*RPCCall) Documentation

func (rcv *RPCCall) Documentation(j int) []byte

func (*RPCCall) DocumentationLength

func (rcv *RPCCall) DocumentationLength() int

func (*RPCCall) Init

func (rcv *RPCCall) Init(buf []byte, i flatbuffers.UOffsetT)

func (*RPCCall) Name

func (rcv *RPCCall) Name() []byte

func (*RPCCall) Request

func (rcv *RPCCall) Request(obj *Object) *Object

func (*RPCCall) Response

func (rcv *RPCCall) Response(obj *Object) *Object

func (*RPCCall) Table

func (rcv *RPCCall) Table() flatbuffers.Table

type Schema

type Schema struct {
	// contains filtered or unexported fields
}

func GetRootAsSchema

func GetRootAsSchema(buf []byte, offset flatbuffers.UOffsetT) *Schema

func (*Schema) Enums

func (rcv *Schema) Enums(obj *Enum, j int) bool

func (*Schema) EnumsLength

func (rcv *Schema) EnumsLength() int

func (*Schema) FileExt

func (rcv *Schema) FileExt() []byte

func (*Schema) FileIdent

func (rcv *Schema) FileIdent() []byte

func (*Schema) Init

func (rcv *Schema) Init(buf []byte, i flatbuffers.UOffsetT)

func (*Schema) Objects

func (rcv *Schema) Objects(obj *Object, j int) bool

func (*Schema) ObjectsLength

func (rcv *Schema) ObjectsLength() int

func (*Schema) RootTable

func (rcv *Schema) RootTable(obj *Object) *Object

func (*Schema) Services

func (rcv *Schema) Services(obj *Service, j int) bool

func (*Schema) ServicesLength

func (rcv *Schema) ServicesLength() int

func (*Schema) Table

func (rcv *Schema) Table() flatbuffers.Table

type Service

type Service struct {
	// contains filtered or unexported fields
}

func GetRootAsService

func GetRootAsService(buf []byte, offset flatbuffers.UOffsetT) *Service

func (*Service) Attributes

func (rcv *Service) Attributes(obj *KeyValue, j int) bool

func (*Service) AttributesLength

func (rcv *Service) AttributesLength() int

func (*Service) Calls

func (rcv *Service) Calls(obj *RPCCall, j int) bool

func (*Service) CallsLength

func (rcv *Service) CallsLength() int

func (*Service) Documentation

func (rcv *Service) Documentation(j int) []byte

func (*Service) DocumentationLength

func (rcv *Service) DocumentationLength() int

func (*Service) Init

func (rcv *Service) Init(buf []byte, i flatbuffers.UOffsetT)

func (*Service) Name

func (rcv *Service) Name() []byte

func (*Service) Table

func (rcv *Service) Table() flatbuffers.Table

type Type

type Type struct {
	// contains filtered or unexported fields
}

func GetRootAsType

func GetRootAsType(buf []byte, offset flatbuffers.UOffsetT) *Type

func (*Type) BaseType

func (rcv *Type) BaseType() BaseType

func (*Type) Element

func (rcv *Type) Element() BaseType

func (*Type) FixedLength

func (rcv *Type) FixedLength() uint16

func (*Type) Index

func (rcv *Type) Index() int32

func (*Type) Init

func (rcv *Type) Init(buf []byte, i flatbuffers.UOffsetT)

func (*Type) MutateBaseType

func (rcv *Type) MutateBaseType(n BaseType) bool

func (*Type) MutateElement

func (rcv *Type) MutateElement(n BaseType) bool

func (*Type) MutateFixedLength

func (rcv *Type) MutateFixedLength(n uint16) bool

func (*Type) MutateIndex

func (rcv *Type) MutateIndex(n int32) bool

func (*Type) Table

func (rcv *Type) Table() flatbuffers.Table

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL