client/golang/passport/verify_grpc.pb.go

168 lines
5.7 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: verify.proto
package passport
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 (
Verify_Request_FullMethodName = "/passport.Verify/Request"
Verify_JumioCallback_FullMethodName = "/passport.Verify/JumioCallback"
)
// VerifyClient is the client API for Verify 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.
//
// Passport(会员通行证)-验证
type VerifyClient interface {
// 认证请求
Request(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*StatusReply, error)
// KYC 认证回调
JumioCallback(ctx context.Context, in *JumioCallbackPayload, opts ...grpc.CallOption) (*StatusReply, error)
}
type verifyClient struct {
cc grpc.ClientConnInterface
}
func NewVerifyClient(cc grpc.ClientConnInterface) VerifyClient {
return &verifyClient{cc}
}
func (c *verifyClient) Request(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*StatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(StatusReply)
err := c.cc.Invoke(ctx, Verify_Request_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *verifyClient) JumioCallback(ctx context.Context, in *JumioCallbackPayload, opts ...grpc.CallOption) (*StatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(StatusReply)
err := c.cc.Invoke(ctx, Verify_JumioCallback_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// VerifyServer is the server API for Verify service.
// All implementations must embed UnimplementedVerifyServer
// for forward compatibility.
//
// Passport(会员通行证)-验证
type VerifyServer interface {
// 认证请求
Request(context.Context, *VerifyRequest) (*StatusReply, error)
// KYC 认证回调
JumioCallback(context.Context, *JumioCallbackPayload) (*StatusReply, error)
mustEmbedUnimplementedVerifyServer()
}
// UnimplementedVerifyServer 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 UnimplementedVerifyServer struct{}
func (UnimplementedVerifyServer) Request(context.Context, *VerifyRequest) (*StatusReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Request not implemented")
}
func (UnimplementedVerifyServer) JumioCallback(context.Context, *JumioCallbackPayload) (*StatusReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method JumioCallback not implemented")
}
func (UnimplementedVerifyServer) mustEmbedUnimplementedVerifyServer() {}
func (UnimplementedVerifyServer) testEmbeddedByValue() {}
// UnsafeVerifyServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to VerifyServer will
// result in compilation errors.
type UnsafeVerifyServer interface {
mustEmbedUnimplementedVerifyServer()
}
func RegisterVerifyServer(s grpc.ServiceRegistrar, srv VerifyServer) {
// If the following call pancis, it indicates UnimplementedVerifyServer 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(&Verify_ServiceDesc, srv)
}
func _Verify_Request_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(VerifyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(VerifyServer).Request(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Verify_Request_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(VerifyServer).Request(ctx, req.(*VerifyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Verify_JumioCallback_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(JumioCallbackPayload)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(VerifyServer).JumioCallback(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Verify_JumioCallback_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(VerifyServer).JumioCallback(ctx, req.(*JumioCallbackPayload))
}
return interceptor(ctx, in, info, handler)
}
// Verify_ServiceDesc is the grpc.ServiceDesc for Verify service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Verify_ServiceDesc = grpc.ServiceDesc{
ServiceName: "passport.Verify",
HandlerType: (*VerifyServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Request",
Handler: _Verify_Request_Handler,
},
{
MethodName: "JumioCallback",
Handler: _Verify_JumioCallback_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "verify.proto",
}