Documentation ¶
Overview ¶
Code generated by proroc-gen-graphql, DO NOT EDIT.
Index ¶
- Variables
- func Gql__input_GetUserRequest() *graphql.InputObject
- func Gql__input_GetUserResponse() *graphql.InputObject
- func Gql__type_GetUserRequest() *graphql.Object
- func Gql__type_GetUserResponse() *graphql.Object
- func RegisterUserServiceGraphql(mux *runtime.ServeMux) error
- func RegisterUserServiceGraphqlHandler(mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type GetUserRequest
- type GetUserResponse
- func (*GetUserResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserResponse) GetId() int32
- func (x *GetUserResponse) GetName() string
- func (*GetUserResponse) ProtoMessage()
- func (x *GetUserResponse) ProtoReflect() protoreflect.Message
- func (x *GetUserResponse) Reset()
- func (x *GetUserResponse) String() string
- type UnimplementedUserServiceServer
- type UnsafeUserServiceServer
- type UserServiceClient
- type UserServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_user_proto protoreflect.FileDescriptor
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "user.UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetUser", Handler: _UserService_GetUser_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "user.proto", }
UserService_ServiceDesc is the grpc.ServiceDesc for UserService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func Gql__input_GetUserRequest ¶
func Gql__input_GetUserRequest() *graphql.InputObject
func Gql__input_GetUserResponse ¶
func Gql__input_GetUserResponse() *graphql.InputObject
func RegisterUserServiceGraphql ¶
Register package divided graphql handler "without" *grpc.ClientConn, therefore gRPC connection will be opened and closed automatically. Occasionally you may worry about open/close performance for each handling graphql request, then you can call RegisterUserServiceGraphqlHandler with *grpc.ClientConn manually.
func RegisterUserServiceGraphqlHandler ¶
func RegisterUserServiceGraphqlHandler(mux *runtime.ServeMux, conn *grpc.ClientConn) error
Register package divided graphql handler "with" *grpc.ClientConn. this function accepts your defined grpc connection, so that we reuse that and never close connection inside. You need to close it maunally when application will terminate. Otherwise, you can specify automatic opening connection with ServiceOption directive:
service UserService { option (graphql.service) = { host: "host:port" insecure: true or false }; ...with RPC definitions }
func RegisterUserServiceServer ¶
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
Types ¶
type GetUserRequest ¶
type GetUserRequest struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
The request message containing the user's name.
func (*GetUserRequest) Descriptor
deprecated
func (*GetUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead.
func (*GetUserRequest) GetId ¶
func (x *GetUserRequest) GetId() int32
func (*GetUserRequest) ProtoMessage ¶
func (*GetUserRequest) ProtoMessage()
func (*GetUserRequest) ProtoReflect ¶
func (x *GetUserRequest) ProtoReflect() protoreflect.Message
func (*GetUserRequest) Reset ¶
func (x *GetUserRequest) Reset()
func (*GetUserRequest) String ¶
func (x *GetUserRequest) String() string
type GetUserResponse ¶
type GetUserResponse struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
The response message containing the greetings
func (*GetUserResponse) Descriptor
deprecated
func (*GetUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetUserResponse.ProtoReflect.Descriptor instead.
func (*GetUserResponse) GetId ¶
func (x *GetUserResponse) GetId() int32
func (*GetUserResponse) GetName ¶
func (x *GetUserResponse) GetName() string
func (*GetUserResponse) ProtoMessage ¶
func (*GetUserResponse) ProtoMessage()
func (*GetUserResponse) ProtoReflect ¶
func (x *GetUserResponse) ProtoReflect() protoreflect.Message
func (*GetUserResponse) Reset ¶
func (x *GetUserResponse) Reset()
func (*GetUserResponse) String ¶
func (x *GetUserResponse) String() string
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct { }
UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedUserServiceServer) GetUser ¶
func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error)
type UnsafeUserServiceServer ¶
type UnsafeUserServiceServer interface {
// contains filtered or unexported methods
}
UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServiceServer will result in compilation errors.
type UserServiceClient ¶
type UserServiceClient interface { // Sends a greeting GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error) }
UserServiceClient is the client API for UserService 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 NewUserServiceClient ¶
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient
type UserServiceServer ¶
type UserServiceServer interface { // Sends a greeting GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error) // contains filtered or unexported methods }
UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility