224 lines
8.1 KiB
Go
224 lines
8.1 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: gateway.proto
|
|
|
|
package gatewaypb
|
|
|
|
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 (
|
|
ChatAppUser_Login_FullMethodName = "/chatappgateway.gateway.v1.ChatAppUser/Login"
|
|
)
|
|
|
|
// ChatAppUserClient is the client API for ChatAppUser 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 ChatAppUserClient interface {
|
|
Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
|
|
}
|
|
|
|
type chatAppUserClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewChatAppUserClient(cc grpc.ClientConnInterface) ChatAppUserClient {
|
|
return &chatAppUserClient{cc}
|
|
}
|
|
|
|
func (c *chatAppUserClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(LoginResponse)
|
|
err := c.cc.Invoke(ctx, ChatAppUser_Login_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// ChatAppUserServer is the server API for ChatAppUser service.
|
|
// All implementations must embed UnimplementedChatAppUserServer
|
|
// for forward compatibility.
|
|
type ChatAppUserServer interface {
|
|
Login(context.Context, *LoginRequest) (*LoginResponse, error)
|
|
mustEmbedUnimplementedChatAppUserServer()
|
|
}
|
|
|
|
// UnimplementedChatAppUserServer 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 UnimplementedChatAppUserServer struct{}
|
|
|
|
func (UnimplementedChatAppUserServer) Login(context.Context, *LoginRequest) (*LoginResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Login not implemented")
|
|
}
|
|
func (UnimplementedChatAppUserServer) mustEmbedUnimplementedChatAppUserServer() {}
|
|
func (UnimplementedChatAppUserServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeChatAppUserServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to ChatAppUserServer will
|
|
// result in compilation errors.
|
|
type UnsafeChatAppUserServer interface {
|
|
mustEmbedUnimplementedChatAppUserServer()
|
|
}
|
|
|
|
func RegisterChatAppUserServer(s grpc.ServiceRegistrar, srv ChatAppUserServer) {
|
|
// If the following call pancis, it indicates UnimplementedChatAppUserServer 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(&ChatAppUser_ServiceDesc, srv)
|
|
}
|
|
|
|
func _ChatAppUser_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(LoginRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ChatAppUserServer).Login(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ChatAppUser_Login_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ChatAppUserServer).Login(ctx, req.(*LoginRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// ChatAppUser_ServiceDesc is the grpc.ServiceDesc for ChatAppUser service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var ChatAppUser_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "chatappgateway.gateway.v1.ChatAppUser",
|
|
HandlerType: (*ChatAppUserServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Login",
|
|
Handler: _ChatAppUser_Login_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "gateway.proto",
|
|
}
|
|
|
|
const (
|
|
ChatAppPay_QueryOrder_FullMethodName = "/chatappgateway.gateway.v1.ChatAppPay/QueryOrder"
|
|
)
|
|
|
|
// ChatAppPayClient is the client API for ChatAppPay 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 ChatAppPayClient interface {
|
|
QueryOrder(ctx context.Context, in *QueryOrderRequest, opts ...grpc.CallOption) (*QueryOrderResponse, error)
|
|
}
|
|
|
|
type chatAppPayClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewChatAppPayClient(cc grpc.ClientConnInterface) ChatAppPayClient {
|
|
return &chatAppPayClient{cc}
|
|
}
|
|
|
|
func (c *chatAppPayClient) QueryOrder(ctx context.Context, in *QueryOrderRequest, opts ...grpc.CallOption) (*QueryOrderResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(QueryOrderResponse)
|
|
err := c.cc.Invoke(ctx, ChatAppPay_QueryOrder_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// ChatAppPayServer is the server API for ChatAppPay service.
|
|
// All implementations must embed UnimplementedChatAppPayServer
|
|
// for forward compatibility.
|
|
type ChatAppPayServer interface {
|
|
QueryOrder(context.Context, *QueryOrderRequest) (*QueryOrderResponse, error)
|
|
mustEmbedUnimplementedChatAppPayServer()
|
|
}
|
|
|
|
// UnimplementedChatAppPayServer 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 UnimplementedChatAppPayServer struct{}
|
|
|
|
func (UnimplementedChatAppPayServer) QueryOrder(context.Context, *QueryOrderRequest) (*QueryOrderResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method QueryOrder not implemented")
|
|
}
|
|
func (UnimplementedChatAppPayServer) mustEmbedUnimplementedChatAppPayServer() {}
|
|
func (UnimplementedChatAppPayServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeChatAppPayServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to ChatAppPayServer will
|
|
// result in compilation errors.
|
|
type UnsafeChatAppPayServer interface {
|
|
mustEmbedUnimplementedChatAppPayServer()
|
|
}
|
|
|
|
func RegisterChatAppPayServer(s grpc.ServiceRegistrar, srv ChatAppPayServer) {
|
|
// If the following call pancis, it indicates UnimplementedChatAppPayServer 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(&ChatAppPay_ServiceDesc, srv)
|
|
}
|
|
|
|
func _ChatAppPay_QueryOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(QueryOrderRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ChatAppPayServer).QueryOrder(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ChatAppPay_QueryOrder_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ChatAppPayServer).QueryOrder(ctx, req.(*QueryOrderRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// ChatAppPay_ServiceDesc is the grpc.ServiceDesc for ChatAppPay service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var ChatAppPay_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "chatappgateway.gateway.v1.ChatAppPay",
|
|
HandlerType: (*ChatAppPayServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "QueryOrder",
|
|
Handler: _ChatAppPay_QueryOrder_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "gateway.proto",
|
|
}
|