github.com/infraboard/keyauth@v0.8.1/apps/verifycode/service_grpc.pb.go (about) 1 // Code generated by protoc-gen-go-grpc. DO NOT EDIT. 2 // versions: 3 // - protoc-gen-go-grpc v1.2.0 4 // - protoc v3.19.1 5 // source: apps/verifycode/pb/service.proto 6 7 package verifycode 8 9 import ( 10 context "context" 11 grpc "google.golang.org/grpc" 12 codes "google.golang.org/grpc/codes" 13 status "google.golang.org/grpc/status" 14 ) 15 16 // This is a compile-time assertion to ensure that this generated file 17 // is compatible with the grpc package it is being compiled against. 18 // Requires gRPC-Go v1.32.0 or later. 19 const _ = grpc.SupportPackageIsVersion7 20 21 // ServiceClient is the client API for Service service. 22 // 23 // 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. 24 type ServiceClient interface { 25 IssueCode(ctx context.Context, in *IssueCodeRequest, opts ...grpc.CallOption) (*IssueCodeResponse, error) 26 CheckCode(ctx context.Context, in *CheckCodeRequest, opts ...grpc.CallOption) (*Code, error) 27 } 28 29 type serviceClient struct { 30 cc grpc.ClientConnInterface 31 } 32 33 func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient { 34 return &serviceClient{cc} 35 } 36 37 func (c *serviceClient) IssueCode(ctx context.Context, in *IssueCodeRequest, opts ...grpc.CallOption) (*IssueCodeResponse, error) { 38 out := new(IssueCodeResponse) 39 err := c.cc.Invoke(ctx, "/infraboard.keyauth.verifycode.Service/IssueCode", in, out, opts...) 40 if err != nil { 41 return nil, err 42 } 43 return out, nil 44 } 45 46 func (c *serviceClient) CheckCode(ctx context.Context, in *CheckCodeRequest, opts ...grpc.CallOption) (*Code, error) { 47 out := new(Code) 48 err := c.cc.Invoke(ctx, "/infraboard.keyauth.verifycode.Service/CheckCode", in, out, opts...) 49 if err != nil { 50 return nil, err 51 } 52 return out, nil 53 } 54 55 // ServiceServer is the server API for Service service. 56 // All implementations must embed UnimplementedServiceServer 57 // for forward compatibility 58 type ServiceServer interface { 59 IssueCode(context.Context, *IssueCodeRequest) (*IssueCodeResponse, error) 60 CheckCode(context.Context, *CheckCodeRequest) (*Code, error) 61 mustEmbedUnimplementedServiceServer() 62 } 63 64 // UnimplementedServiceServer must be embedded to have forward compatible implementations. 65 type UnimplementedServiceServer struct { 66 } 67 68 func (UnimplementedServiceServer) IssueCode(context.Context, *IssueCodeRequest) (*IssueCodeResponse, error) { 69 return nil, status.Errorf(codes.Unimplemented, "method IssueCode not implemented") 70 } 71 func (UnimplementedServiceServer) CheckCode(context.Context, *CheckCodeRequest) (*Code, error) { 72 return nil, status.Errorf(codes.Unimplemented, "method CheckCode not implemented") 73 } 74 func (UnimplementedServiceServer) mustEmbedUnimplementedServiceServer() {} 75 76 // UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. 77 // Use of this interface is not recommended, as added methods to ServiceServer will 78 // result in compilation errors. 79 type UnsafeServiceServer interface { 80 mustEmbedUnimplementedServiceServer() 81 } 82 83 func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer) { 84 s.RegisterService(&Service_ServiceDesc, srv) 85 } 86 87 func _Service_IssueCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 88 in := new(IssueCodeRequest) 89 if err := dec(in); err != nil { 90 return nil, err 91 } 92 if interceptor == nil { 93 return srv.(ServiceServer).IssueCode(ctx, in) 94 } 95 info := &grpc.UnaryServerInfo{ 96 Server: srv, 97 FullMethod: "/infraboard.keyauth.verifycode.Service/IssueCode", 98 } 99 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 100 return srv.(ServiceServer).IssueCode(ctx, req.(*IssueCodeRequest)) 101 } 102 return interceptor(ctx, in, info, handler) 103 } 104 105 func _Service_CheckCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 106 in := new(CheckCodeRequest) 107 if err := dec(in); err != nil { 108 return nil, err 109 } 110 if interceptor == nil { 111 return srv.(ServiceServer).CheckCode(ctx, in) 112 } 113 info := &grpc.UnaryServerInfo{ 114 Server: srv, 115 FullMethod: "/infraboard.keyauth.verifycode.Service/CheckCode", 116 } 117 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 118 return srv.(ServiceServer).CheckCode(ctx, req.(*CheckCodeRequest)) 119 } 120 return interceptor(ctx, in, info, handler) 121 } 122 123 // Service_ServiceDesc is the grpc.ServiceDesc for Service service. 124 // It's only intended for direct use with grpc.RegisterService, 125 // and not to be introspected or modified (even as a copy) 126 var Service_ServiceDesc = grpc.ServiceDesc{ 127 ServiceName: "infraboard.keyauth.verifycode.Service", 128 HandlerType: (*ServiceServer)(nil), 129 Methods: []grpc.MethodDesc{ 130 { 131 MethodName: "IssueCode", 132 Handler: _Service_IssueCode_Handler, 133 }, 134 { 135 MethodName: "CheckCode", 136 Handler: _Service_CheckCode_Handler, 137 }, 138 }, 139 Streams: []grpc.StreamDesc{}, 140 Metadata: "apps/verifycode/pb/service.proto", 141 }