Documentation ¶
Index ¶
- Constants
- func GetGqlFieldOptions(field *descriptor.FieldDescriptorProto) *gql.Field
- func ToLowerFirst(s string) string
- type Callstack
- type Method
- type Methods
- type ModelDescriptor
- type OneofRef
- type Plugin
- func (p *Plugin) Enums() map[string]*Type
- func (p *Plugin) Error(err error, msgs ...string)
- func (p *Plugin) FillTypeMap(typeName string, messages map[string]*Type, inputField bool)
- func (p *Plugin) GetOneof(ref OneofRef) *Type
- func (p *Plugin) GetSchemaByIndex(index int) *bytes.Buffer
- func (p *Plugin) GqlModelNames() map[*Type]string
- func (p *Plugin) GraphQLType(field *descriptor.FieldDescriptorProto, messagesIn map[string]*Type) string
- func (p *Plugin) In()
- func (p *Plugin) InitFile(file *generator.FileDescriptor)
- func (p *Plugin) Inputs() map[string]*Type
- func (p *Plugin) IsAny(typeName string) (ok bool)
- func (p *Plugin) IsEmpty(t *Type) bool
- func (p *Plugin) Maps() map[string]*Type
- func (p *Plugin) Mutations() Methods
- func (p *Plugin) Oneofs() map[string]*Type
- func (p *Plugin) Out()
- func (p *Plugin) P(str ...interface{})
- func (p *Plugin) PrintComments(path ...int) bool
- func (p *Plugin) Queries() Methods
- func (p *Plugin) Scalars() map[string]*Type
- func (p *Plugin) Subscriptions() Methods
- func (p *Plugin) Types() map[string]*Type
- func (p *Plugin) Warn(msgs ...interface{})
- type Type
- type TypeMapEntry
- type TypeMapList
Constants ¶
View Source
const ( ScalarBytes = "Bytes" ScalarFloat32 = "Float32" ScalarInt64 = "Int64" ScalarInt32 = "Int32" ScalarUint32 = "Uint32" ScalarUint64 = "Uint64" ScalarAny = "Any" ScalarDirective = "__Directive" ScalarType = "__Type" ScalarField = "__Field" ScalarEnumValue = "__EnumValue" ScalarInputValue = "__InputValue" ScalarSchema = "__Schema" ScalarInt = "Int" ScalarFloat = "Float" ScalarString = "String" ScalarBoolean = "Boolean" ScalarID = "ID" )
Variables ¶
This section is empty.
Functions ¶
func GetGqlFieldOptions ¶
func GetGqlFieldOptions(field *descriptor.FieldDescriptorProto) *gql.Field
func ToLowerFirst ¶
Types ¶
type Callstack ¶
type Callstack interface { Push(entry string) Pop(entry string) Has(entry string) bool Free() List() []string }
func NewCallstack ¶
func NewCallstack() Callstack
type ModelDescriptor ¶
type Plugin ¶
func (*Plugin) FillTypeMap ¶
recursively goes trough all fields of the types from messages map and fills it with child types. i. e. if message Type1 { Type2: field1 = 1; } exists in the map this function will look up Type2 and add Type2 to the map as well
func (*Plugin) GqlModelNames ¶
func (*Plugin) GraphQLType ¶
func (p *Plugin) GraphQLType(field *descriptor.FieldDescriptorProto, messagesIn map[string]*Type) string
func (*Plugin) InitFile ¶
func (p *Plugin) InitFile(file *generator.FileDescriptor)
func (*Plugin) PrintComments ¶
func (*Plugin) Subscriptions ¶
type Type ¶
type Type struct { *descriptor.DescriptorProto *descriptor.EnumDescriptorProto ModelDescriptor }
type TypeMapEntry ¶
type TypeMapList ¶
type TypeMapList []*TypeMapEntry
func TypeMap2List ¶
func TypeMap2List(t map[string]*Type) (m TypeMapList)
func (TypeMapList) Len ¶
func (t TypeMapList) Len() int
func (TypeMapList) Less ¶
func (t TypeMapList) Less(i, j int) bool
func (TypeMapList) Swap ¶
func (t TypeMapList) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.