types

package
v0.0.0-...-2deef1a Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromProtoFuncName

func FromProtoFuncName(typ Type) string

func FromProtoFuncSignature

func FromProtoFuncSignature(typ ProtoType) string

func FromRepeatedProtoFuncName

func FromRepeatedProtoFuncName(typ Type) string

func FromRepeatedProtoFuncSignature

func FromRepeatedProtoFuncSignature(typ ProtoType) string

func FuncCallStatement

func FuncCallStatement(funcname string, args ...string) string

func IsFromProto

func IsFromProto(t Type) bool

func QualifiedIdent

func QualifiedIdent(t GoType) string

func ToProtoFuncName

func ToProtoFuncName(typ Type) string

func ToProtoFuncSignature

func ToProtoFuncSignature(typ ProtoType) string

func ToRepeatedProtoFuncName

func ToRepeatedProtoFuncName(typ Type) string

func ToRepeatedProtoFuncSignature

func ToRepeatedProtoFuncSignature(typ ProtoType) string

func TypeString

func TypeString(t GoType) string

func UnwrapStatement

func UnwrapStatement(t Type, varName string) string

Types

type EnumFromProto

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

func (*EnumFromProto) GQLName

func (e *EnumFromProto) GQLName() string

func (*EnumFromProto) GoType

func (e *EnumFromProto) GoType() GoType

func (*EnumFromProto) Godoc

func (e *EnumFromProto) Godoc() string

func (*EnumFromProto) IsFromProto

func (m *EnumFromProto) IsFromProto() bool

func (*EnumFromProto) ProtoGoType

func (e *EnumFromProto) ProtoGoType() GoType

type FieldFromProto

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

func (*FieldFromProto) FromProtoStatement

func (f *FieldFromProto) FromProtoStatement(receiver string) string

func (*FieldFromProto) GQLName

func (f *FieldFromProto) GQLName() string

func (*FieldFromProto) GoFieldName

func (f *FieldFromProto) GoFieldName() string

func (*FieldFromProto) GoFieldTypeDefinition

func (f *FieldFromProto) GoFieldTypeDefinition() string

func (*FieldFromProto) Godoc

func (f *FieldFromProto) Godoc() string

func (*FieldFromProto) IsDefinedInProto

func (f *FieldFromProto) IsDefinedInProto() bool

func (*FieldFromProto) IsOneof

func (f *FieldFromProto) IsOneof() bool

func (*FieldFromProto) IsOneofMember

func (f *FieldFromProto) IsOneofMember() bool

func (*FieldFromProto) OneofMembers

func (f *FieldFromProto) OneofMembers() []*UnionMemberFromProto

func (*FieldFromProto) PbGoFieldName

func (f *FieldFromProto) PbGoFieldName() string

func (*FieldFromProto) ProtoType

func (f *FieldFromProto) ProtoType() ProtoType

func (*FieldFromProto) ToProtoStatement

func (f *FieldFromProto) ToProtoStatement(receiver string) string

type FieldHasProto

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

func (*FieldHasProto) FromProtoStatement

func (f *FieldHasProto) FromProtoStatement(receiver string) string

func (*FieldHasProto) GoFieldName

func (f *FieldHasProto) GoFieldName() string

func (*FieldHasProto) GoFieldTypeDefinition

func (f *FieldHasProto) GoFieldTypeDefinition() string

func (*FieldHasProto) Godoc

func (f *FieldHasProto) Godoc() string

func (*FieldHasProto) ToProtoStatement

func (f *FieldHasProto) ToProtoStatement(receiver string) string

type GoType

type GoType interface {
	Name() string
	Package() string
	Pointer() bool
	QualifiedIdent() string
	TypeString() string
}

func GoWrapperType

func GoWrapperType(t Type) GoType

type ObjectFromProto

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

func (*ObjectFromProto) Fields

func (o *ObjectFromProto) Fields() ([]*FieldFromProto, error)

func (*ObjectFromProto) GQLName

func (o *ObjectFromProto) GQLName() string

func (*ObjectFromProto) GoType

func (o *ObjectFromProto) GoType() GoType

func (*ObjectFromProto) Godoc

func (o *ObjectFromProto) Godoc() string

func (*ObjectFromProto) IsFromProto

func (u *ObjectFromProto) IsFromProto() bool

func (*ObjectFromProto) ProtoGoType

func (o *ObjectFromProto) ProtoGoType() GoType

type ObjectHasProto

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

func (*ObjectHasProto) CodegenObject

func (o *ObjectHasProto) CodegenObject() *codegen.Object

func (*ObjectHasProto) Fields

func (o *ObjectHasProto) Fields() ([]*FieldHasProto, error)

func (*ObjectHasProto) GQLName

func (o *ObjectHasProto) GQLName() string

func (*ObjectHasProto) GoType

func (o *ObjectHasProto) GoType() GoType

func (*ObjectHasProto) Godoc

func (o *ObjectHasProto) Godoc() string

func (*ObjectHasProto) IsFromProto

func (u *ObjectHasProto) IsFromProto() bool

func (*ObjectHasProto) ProtoGoType

func (o *ObjectHasProto) ProtoGoType() GoType

type PlainObject

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

func (*PlainObject) GQLName

func (o *PlainObject) GQLName() string

func (*PlainObject) GoType

func (o *PlainObject) GoType() GoType

type PlainUnionMember

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

func (*PlainUnionMember) Type

func (m *PlainUnionMember) Type() Type

type ProtoType

type ProtoType interface {
	Type
	ProtoGoType() GoType
	IsFromProto() bool
}

type Registry

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

func CreateRegistry

func CreateRegistry(data *codegen.Data) (*Registry, error)

func CreateRegistryFromSchema

func CreateRegistryFromSchema(schema *ast.Schema) (*Registry, error)

func (*Registry) EnumsFromProto

func (r *Registry) EnumsFromProto() []*EnumFromProto

func (*Registry) FindObjectOrInput

func (r *Registry) FindObjectOrInput(def *ast.Definition) *codegen.Object

func (*Registry) FindProtoType

func (r *Registry) FindProtoType(name string) ProtoType

func (*Registry) FindType

func (r *Registry) FindType(name string) Type

func (*Registry) ObjectsFromProto

func (r *Registry) ObjectsFromProto() []*ObjectFromProto

func (*Registry) ObjectsHasProto

func (r *Registry) ObjectsHasProto() []*ObjectHasProto

func (*Registry) UnionsFromProto

func (r *Registry) UnionsFromProto() []*UnionFromProto

func (*Registry) UnionsHasProto

func (r *Registry) UnionsHasProto() []*UnionHasProto

type Type

type Type interface {
	GQLName() string
	GoType() GoType
}

type UnionFromProto

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

func (*UnionFromProto) GQLName

func (u *UnionFromProto) GQLName() string

func (*UnionFromProto) GoType

func (u *UnionFromProto) GoType() GoType

func (*UnionFromProto) Godoc

func (u *UnionFromProto) Godoc() string

func (*UnionFromProto) IsFromProto

func (u *UnionFromProto) IsFromProto() bool

func (*UnionFromProto) Members

func (u *UnionFromProto) Members() []*UnionMemberFromProto

func (*UnionFromProto) ProtoGoType

func (u *UnionFromProto) ProtoGoType() GoType

type UnionHasProto

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

func (*UnionHasProto) GQLName

func (u *UnionHasProto) GQLName() string

func (*UnionHasProto) GoType

func (u *UnionHasProto) GoType() GoType

func (*UnionHasProto) Godoc

func (u *UnionHasProto) Godoc() string

func (*UnionHasProto) IsFromProto

func (u *UnionHasProto) IsFromProto() bool

func (*UnionHasProto) Members

func (u *UnionHasProto) Members() []UnionMemberType

func (*UnionHasProto) ProtoGoType

func (u *UnionHasProto) ProtoGoType() GoType

type UnionMemberFromProto

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

func (*UnionMemberFromProto) GQLName

func (m *UnionMemberFromProto) GQLName() string

func (*UnionMemberFromProto) GoType

func (m *UnionMemberFromProto) GoType() GoType

func (*UnionMemberFromProto) IsFromProto

func (m *UnionMemberFromProto) IsFromProto() bool

func (*UnionMemberFromProto) PbGoTypeFieldName

func (m *UnionMemberFromProto) PbGoTypeFieldName() string

func (*UnionMemberFromProto) ProtoGoType

func (m *UnionMemberFromProto) ProtoGoType() GoType

func (*UnionMemberFromProto) Type

func (m *UnionMemberFromProto) Type() ProtoType

type UnionMemberHasProto

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

func (*UnionMemberHasProto) Type

func (m *UnionMemberHasProto) Type() Type

type UnionMemberType

type UnionMemberType interface {
	Type() Type
}

Jump to

Keyboard shortcuts

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