-
Notifications
You must be signed in to change notification settings - Fork 3
/
callback_grpc.pb.go
111 lines (96 loc) · 4.4 KB
/
callback_grpc.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: campusapis/gate/v1/callback.proto
package gatev1
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.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
const (
GateCallbackService_PostGateEventCallback_FullMethodName = "/campusapis.gate.v1.GateCallbackService/PostGateEventCallback"
)
// GateCallbackServiceClient is the client API for GateCallbackService 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 GateCallbackServiceClient interface {
// 门禁事件回调接口
PostGateEventCallback(ctx context.Context, in *PostGateEventCallbackRequest, opts ...grpc.CallOption) (*PostGateEventCallbackResponse, error)
}
type gateCallbackServiceClient struct {
cc grpc.ClientConnInterface
}
func NewGateCallbackServiceClient(cc grpc.ClientConnInterface) GateCallbackServiceClient {
return &gateCallbackServiceClient{cc}
}
func (c *gateCallbackServiceClient) PostGateEventCallback(ctx context.Context, in *PostGateEventCallbackRequest, opts ...grpc.CallOption) (*PostGateEventCallbackResponse, error) {
out := new(PostGateEventCallbackResponse)
err := c.cc.Invoke(ctx, GateCallbackService_PostGateEventCallback_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// GateCallbackServiceServer is the server API for GateCallbackService service.
// All implementations must embed UnimplementedGateCallbackServiceServer
// for forward compatibility
type GateCallbackServiceServer interface {
// 门禁事件回调接口
PostGateEventCallback(context.Context, *PostGateEventCallbackRequest) (*PostGateEventCallbackResponse, error)
mustEmbedUnimplementedGateCallbackServiceServer()
}
// UnimplementedGateCallbackServiceServer must be embedded to have forward compatible implementations.
type UnimplementedGateCallbackServiceServer struct {
}
func (UnimplementedGateCallbackServiceServer) PostGateEventCallback(context.Context, *PostGateEventCallbackRequest) (*PostGateEventCallbackResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method PostGateEventCallback not implemented")
}
func (UnimplementedGateCallbackServiceServer) mustEmbedUnimplementedGateCallbackServiceServer() {}
// UnsafeGateCallbackServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to GateCallbackServiceServer will
// result in compilation errors.
type UnsafeGateCallbackServiceServer interface {
mustEmbedUnimplementedGateCallbackServiceServer()
}
func RegisterGateCallbackServiceServer(s grpc.ServiceRegistrar, srv GateCallbackServiceServer) {
s.RegisterService(&GateCallbackService_ServiceDesc, srv)
}
func _GateCallbackService_PostGateEventCallback_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PostGateEventCallbackRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(GateCallbackServiceServer).PostGateEventCallback(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: GateCallbackService_PostGateEventCallback_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GateCallbackServiceServer).PostGateEventCallback(ctx, req.(*PostGateEventCallbackRequest))
}
return interceptor(ctx, in, info, handler)
}
// GateCallbackService_ServiceDesc is the grpc.ServiceDesc for GateCallbackService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var GateCallbackService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "campusapis.gate.v1.GateCallbackService",
HandlerType: (*GateCallbackServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "PostGateEventCallback",
Handler: _GateCallbackService_PostGateEventCallback_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "campusapis/gate/v1/callback.proto",
}