224 lines
8.5 KiB
Go
224 lines
8.5 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.5.1
|
|
// - protoc v5.29.2
|
|
// source: chatapp.proto
|
|
|
|
package commonpb
|
|
|
|
import (
|
|
context "context"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
)
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
// Requires gRPC-Go v1.64.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion9
|
|
|
|
const (
|
|
ChatAppUserService_Register_FullMethodName = "/chatapp.common.v1.ChatAppUserService/Register"
|
|
)
|
|
|
|
// ChatAppUserServiceClient is the client API for ChatAppUserService 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.
|
|
type ChatAppUserServiceClient interface {
|
|
Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error)
|
|
}
|
|
|
|
type chatAppUserServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewChatAppUserServiceClient(cc grpc.ClientConnInterface) ChatAppUserServiceClient {
|
|
return &chatAppUserServiceClient{cc}
|
|
}
|
|
|
|
func (c *chatAppUserServiceClient) Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(RegisterResponse)
|
|
err := c.cc.Invoke(ctx, ChatAppUserService_Register_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// ChatAppUserServiceServer is the server API for ChatAppUserService service.
|
|
// All implementations must embed UnimplementedChatAppUserServiceServer
|
|
// for forward compatibility.
|
|
type ChatAppUserServiceServer interface {
|
|
Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
|
|
mustEmbedUnimplementedChatAppUserServiceServer()
|
|
}
|
|
|
|
// UnimplementedChatAppUserServiceServer must be embedded to have
|
|
// forward compatible implementations.
|
|
//
|
|
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
|
// pointer dereference when methods are called.
|
|
type UnimplementedChatAppUserServiceServer struct{}
|
|
|
|
func (UnimplementedChatAppUserServiceServer) Register(context.Context, *RegisterRequest) (*RegisterResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Register not implemented")
|
|
}
|
|
func (UnimplementedChatAppUserServiceServer) mustEmbedUnimplementedChatAppUserServiceServer() {}
|
|
func (UnimplementedChatAppUserServiceServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeChatAppUserServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to ChatAppUserServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeChatAppUserServiceServer interface {
|
|
mustEmbedUnimplementedChatAppUserServiceServer()
|
|
}
|
|
|
|
func RegisterChatAppUserServiceServer(s grpc.ServiceRegistrar, srv ChatAppUserServiceServer) {
|
|
// If the following call pancis, it indicates UnimplementedChatAppUserServiceServer was
|
|
// embedded by pointer and is nil. This will cause panics if an
|
|
// unimplemented method is ever invoked, so we test this at initialization
|
|
// time to prevent it from happening at runtime later due to I/O.
|
|
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
|
t.testEmbeddedByValue()
|
|
}
|
|
s.RegisterService(&ChatAppUserService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _ChatAppUserService_Register_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(RegisterRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ChatAppUserServiceServer).Register(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ChatAppUserService_Register_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ChatAppUserServiceServer).Register(ctx, req.(*RegisterRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// ChatAppUserService_ServiceDesc is the grpc.ServiceDesc for ChatAppUserService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var ChatAppUserService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "chatapp.common.v1.ChatAppUserService",
|
|
HandlerType: (*ChatAppUserServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Register",
|
|
Handler: _ChatAppUserService_Register_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "chatapp.proto",
|
|
}
|
|
|
|
const (
|
|
ChatAppPayService_Pay_FullMethodName = "/chatapp.common.v1.ChatAppPayService/Pay"
|
|
)
|
|
|
|
// ChatAppPayServiceClient is the client API for ChatAppPayService 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.
|
|
type ChatAppPayServiceClient interface {
|
|
Pay(ctx context.Context, in *PayRequest, opts ...grpc.CallOption) (*PayResponse, error)
|
|
}
|
|
|
|
type chatAppPayServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewChatAppPayServiceClient(cc grpc.ClientConnInterface) ChatAppPayServiceClient {
|
|
return &chatAppPayServiceClient{cc}
|
|
}
|
|
|
|
func (c *chatAppPayServiceClient) Pay(ctx context.Context, in *PayRequest, opts ...grpc.CallOption) (*PayResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(PayResponse)
|
|
err := c.cc.Invoke(ctx, ChatAppPayService_Pay_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// ChatAppPayServiceServer is the server API for ChatAppPayService service.
|
|
// All implementations must embed UnimplementedChatAppPayServiceServer
|
|
// for forward compatibility.
|
|
type ChatAppPayServiceServer interface {
|
|
Pay(context.Context, *PayRequest) (*PayResponse, error)
|
|
mustEmbedUnimplementedChatAppPayServiceServer()
|
|
}
|
|
|
|
// UnimplementedChatAppPayServiceServer must be embedded to have
|
|
// forward compatible implementations.
|
|
//
|
|
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
|
// pointer dereference when methods are called.
|
|
type UnimplementedChatAppPayServiceServer struct{}
|
|
|
|
func (UnimplementedChatAppPayServiceServer) Pay(context.Context, *PayRequest) (*PayResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Pay not implemented")
|
|
}
|
|
func (UnimplementedChatAppPayServiceServer) mustEmbedUnimplementedChatAppPayServiceServer() {}
|
|
func (UnimplementedChatAppPayServiceServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeChatAppPayServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to ChatAppPayServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeChatAppPayServiceServer interface {
|
|
mustEmbedUnimplementedChatAppPayServiceServer()
|
|
}
|
|
|
|
func RegisterChatAppPayServiceServer(s grpc.ServiceRegistrar, srv ChatAppPayServiceServer) {
|
|
// If the following call pancis, it indicates UnimplementedChatAppPayServiceServer was
|
|
// embedded by pointer and is nil. This will cause panics if an
|
|
// unimplemented method is ever invoked, so we test this at initialization
|
|
// time to prevent it from happening at runtime later due to I/O.
|
|
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
|
t.testEmbeddedByValue()
|
|
}
|
|
s.RegisterService(&ChatAppPayService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _ChatAppPayService_Pay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(PayRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ChatAppPayServiceServer).Pay(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ChatAppPayService_Pay_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ChatAppPayServiceServer).Pay(ctx, req.(*PayRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// ChatAppPayService_ServiceDesc is the grpc.ServiceDesc for ChatAppPayService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var ChatAppPayService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "chatapp.common.v1.ChatAppPayService",
|
|
HandlerType: (*ChatAppPayServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Pay",
|
|
Handler: _ChatAppPayService_Pay_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "chatapp.proto",
|
|
}
|