...
1
2
3
4
5
6
7 package test_proto
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
17
18
19 const _ = grpc.SupportPackageIsVersion7
20
21
22
23
24 type ChillerClient interface {
25
26 Chill(ctx context.Context, in *Time, opts ...grpc.CallOption) (*Time, error)
27 }
28
29 type chillerClient struct {
30 cc grpc.ClientConnInterface
31 }
32
33 func NewChillerClient(cc grpc.ClientConnInterface) ChillerClient {
34 return &chillerClient{cc}
35 }
36
37 func (c *chillerClient) Chill(ctx context.Context, in *Time, opts ...grpc.CallOption) (*Time, error) {
38 out := new(Time)
39 err := c.cc.Invoke(ctx, "/Chiller/Chill", in, out, opts...)
40 if err != nil {
41 return nil, err
42 }
43 return out, nil
44 }
45
46
47
48
49 type ChillerServer interface {
50
51 Chill(context.Context, *Time) (*Time, error)
52 mustEmbedUnimplementedChillerServer()
53 }
54
55
56 type UnimplementedChillerServer struct {
57 }
58
59 func (UnimplementedChillerServer) Chill(context.Context, *Time) (*Time, error) {
60 return nil, status.Errorf(codes.Unimplemented, "method Chill not implemented")
61 }
62 func (UnimplementedChillerServer) mustEmbedUnimplementedChillerServer() {}
63
64
65
66
67 type UnsafeChillerServer interface {
68 mustEmbedUnimplementedChillerServer()
69 }
70
71 func RegisterChillerServer(s grpc.ServiceRegistrar, srv ChillerServer) {
72 s.RegisterService(&Chiller_ServiceDesc, srv)
73 }
74
75 func _Chiller_Chill_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
76 in := new(Time)
77 if err := dec(in); err != nil {
78 return nil, err
79 }
80 if interceptor == nil {
81 return srv.(ChillerServer).Chill(ctx, in)
82 }
83 info := &grpc.UnaryServerInfo{
84 Server: srv,
85 FullMethod: "/Chiller/Chill",
86 }
87 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
88 return srv.(ChillerServer).Chill(ctx, req.(*Time))
89 }
90 return interceptor(ctx, in, info, handler)
91 }
92
93
94
95
96 var Chiller_ServiceDesc = grpc.ServiceDesc{
97 ServiceName: "Chiller",
98 HandlerType: (*ChillerServer)(nil),
99 Methods: []grpc.MethodDesc{
100 {
101 MethodName: "Chill",
102 Handler: _Chiller_Chill_Handler,
103 },
104 },
105 Streams: []grpc.StreamDesc{},
106 Metadata: "interceptors_test.proto",
107 }
108
View as plain text