test

package
v0.8.9 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_test_test_proto protoreflect.FileDescriptor
View Source
var Query_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "test.Query",
	HandlerType: (*QueryServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Query1",
			Handler:    _Query_Query1_Handler,
		},
		{
			MethodName: "Query2",
			Handler:    _Query_Query2_Handler,
		},
		{
			MethodName: "Mutate1",
			Handler:    _Query_Mutate1_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Subscribe",
			Handler:       _Query_Subscribe_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "test/test.proto",
}

Query_ServiceDesc is the grpc.ServiceDesc for Query service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var Service_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "test.Service",
	HandlerType: (*ServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "testQ",
			Handler:    _Service_TestQ_Handler,
		},
		{
			MethodName: "testM",
			Handler:    _Service_TestM_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "test/test.proto",
}

Service_ServiceDesc is the grpc.ServiceDesc for Service service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func NewExecutableSchema

func NewExecutableSchema(cfg Config) graphql.ExecutableSchema

NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.

func RegisterQueryServer

func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer)

func RegisterServiceServer

func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)

Types

type ComplexityRoot

type ComplexityRoot struct {
	Hello struct {
		Asdf func(childComplexity int) int
		Test func(childComplexity int) int
	}

	Mutation struct {
		QueryMutate1 func(childComplexity int, in *Hello) int
		ServiceTestM func(childComplexity int, in *Hello) int
	}

	OutHello struct {
		Asdf   func(childComplexity int) int
		Qwertt func(childComplexity int, inputName *int) int
	}

	Query struct {
		QueryQuery1  func(childComplexity int, in *Hello) int
		QueryQuery2  func(childComplexity int, in *Hello) int
		ServiceTestQ func(childComplexity int, in *Hello) int
	}

	Subscription struct {
		QuerySubscribe func(childComplexity int, in *Hello) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
	Auth    func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)
	Auth123 func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)
	DirName func(ctx context.Context, obj interface{}, next graphql.Resolver, paramName *string) (res interface{}, err error)
	Query   func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)
	Service func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)
}

type Hello

type Hello struct {
	Test string `protobuf:"bytes,1,opt,name=test,proto3" json:"test,omitempty"`
	Asdf string `protobuf:"bytes,2,opt,name=asdf,proto3" json:"asdf,omitempty"`
	// contains filtered or unexported fields
}

func (*Hello) Descriptor deprecated

func (*Hello) Descriptor() ([]byte, []int)

Deprecated: Use Hello.ProtoReflect.Descriptor instead.

func (*Hello) GetAsdf

func (x *Hello) GetAsdf() string

func (*Hello) GetTest

func (x *Hello) GetTest() string

func (*Hello) ProtoMessage

func (*Hello) ProtoMessage()

func (*Hello) ProtoReflect

func (x *Hello) ProtoReflect() protoreflect.Message

func (*Hello) Reset

func (x *Hello) Reset()

func (*Hello) String

func (x *Hello) String() string

type HelloInput

type HelloInput = Hello

type MutationResolver

type MutationResolver interface {
	ServiceTestM(ctx context.Context, in *Hello) (*Hello, error)
	QueryMutate1(ctx context.Context, in *Hello) (*Hello, error)
}

type OutHello

type OutHello struct {
	Asdf   string `protobuf:"bytes,1,opt,name=asdf,proto3" json:"asdf,omitempty"`
	Qwertt string `protobuf:"bytes,3,opt,name=qwertt,proto3" json:"qwertt,omitempty"`
	// contains filtered or unexported fields
}

func (*OutHello) Descriptor deprecated

func (*OutHello) Descriptor() ([]byte, []int)

Deprecated: Use OutHello.ProtoReflect.Descriptor instead.

func (*OutHello) GetAsdf

func (x *OutHello) GetAsdf() string

func (*OutHello) GetQwertt

func (x *OutHello) GetQwertt() string

func (*OutHello) ProtoMessage

func (*OutHello) ProtoMessage()

func (*OutHello) ProtoReflect

func (x *OutHello) ProtoReflect() protoreflect.Message

func (*OutHello) Reset

func (x *OutHello) Reset()

func (*OutHello) String

func (x *OutHello) String() string

type OutHelloInput

type OutHelloInput = OutHello

type QueryClient

type QueryClient interface {
	Query1(ctx context.Context, in *Hello, opts ...grpc.CallOption) (*Hello, error)
	Query2(ctx context.Context, in *Hello, opts ...grpc.CallOption) (*Hello, error)
	Mutate1(ctx context.Context, in *Hello, opts ...grpc.CallOption) (*Hello, error)
	Subscribe(ctx context.Context, in *Hello, opts ...grpc.CallOption) (Query_SubscribeClient, error)
}

QueryClient is the client API for Query service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewQueryClient

func NewQueryClient(cc grpc.ClientConnInterface) QueryClient

type QueryResolver

type QueryResolver interface {
	ServiceTestQ(ctx context.Context, in *Hello) (*OutHello, error)
	QueryQuery1(ctx context.Context, in *Hello) (*Hello, error)
	QueryQuery2(ctx context.Context, in *Hello) (*Hello, error)
}

type QueryResolvers

type QueryResolvers struct{ Service QueryServer }

func (*QueryResolvers) QueryMutate1

func (s *QueryResolvers) QueryMutate1(ctx context.Context, in *Hello) (*Hello, error)

func (*QueryResolvers) QueryQuery1

func (s *QueryResolvers) QueryQuery1(ctx context.Context, in *Hello) (*Hello, error)

func (*QueryResolvers) QueryQuery2

func (s *QueryResolvers) QueryQuery2(ctx context.Context, in *Hello) (*Hello, error)

type QueryServer

type QueryServer interface {
	Query1(context.Context, *Hello) (*Hello, error)
	Query2(context.Context, *Hello) (*Hello, error)
	Mutate1(context.Context, *Hello) (*Hello, error)
	Subscribe(*Hello, Query_SubscribeServer) error
}

QueryServer is the server API for Query service. All implementations should embed UnimplementedQueryServer for forward compatibility

type Query_SubscribeClient

type Query_SubscribeClient interface {
	Recv() (*Hello, error)
	grpc.ClientStream
}

type Query_SubscribeServer

type Query_SubscribeServer interface {
	Send(*Hello) error
	grpc.ServerStream
}

type ResolverRoot

type ResolverRoot interface {
	Mutation() MutationResolver
	Query() QueryResolver
	Subscription() SubscriptionResolver
}

type ServiceClient

type ServiceClient interface {
	TestQ(ctx context.Context, in *Hello, opts ...grpc.CallOption) (*OutHello, error)
	TestM(ctx context.Context, in *Hello, opts ...grpc.CallOption) (*Hello, error)
}

ServiceClient is the client API for Service service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewServiceClient

func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient

type ServiceResolvers

type ServiceResolvers struct{ Service ServiceServer }

func (*ServiceResolvers) ServiceTestM

func (s *ServiceResolvers) ServiceTestM(ctx context.Context, in *Hello) (*Hello, error)

func (*ServiceResolvers) ServiceTestQ

func (s *ServiceResolvers) ServiceTestQ(ctx context.Context, in *Hello) (*OutHello, error)

type ServiceServer

type ServiceServer interface {
	TestQ(context.Context, *Hello) (*OutHello, error)
	TestM(context.Context, *Hello) (*Hello, error)
}

ServiceServer is the server API for Service service. All implementations should embed UnimplementedServiceServer for forward compatibility

type SubscriptionResolver

type SubscriptionResolver interface {
	QuerySubscribe(ctx context.Context, in *Hello) (<-chan *Hello, error)
}

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer should be embedded to have forward compatible implementations.

func (UnimplementedQueryServer) Mutate1

func (UnimplementedQueryServer) Query1

func (UnimplementedQueryServer) Query2

func (UnimplementedQueryServer) Subscribe

type UnimplementedServiceServer

type UnimplementedServiceServer struct {
}

UnimplementedServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedServiceServer) TestM

func (UnimplementedServiceServer) TestQ

type UnsafeQueryServer

type UnsafeQueryServer interface {
	// contains filtered or unexported methods
}

UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to QueryServer will result in compilation errors.

type UnsafeServiceServer

type UnsafeServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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