1
2
3
4
5
6
7 package examplepb
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 NonStandardServiceClient interface {
25
26 Update(ctx context.Context, in *NonStandardUpdateRequest, opts ...grpc.CallOption) (*NonStandardMessage, error)
27
28 UpdateWithJSONNames(ctx context.Context, in *NonStandardWithJSONNamesUpdateRequest, opts ...grpc.CallOption) (*NonStandardMessageWithJSONNames, error)
29 }
30
31 type nonStandardServiceClient struct {
32 cc grpc.ClientConnInterface
33 }
34
35 func NewNonStandardServiceClient(cc grpc.ClientConnInterface) NonStandardServiceClient {
36 return &nonStandardServiceClient{cc}
37 }
38
39 func (c *nonStandardServiceClient) Update(ctx context.Context, in *NonStandardUpdateRequest, opts ...grpc.CallOption) (*NonStandardMessage, error) {
40 out := new(NonStandardMessage)
41 err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.NonStandardService/Update", in, out, opts...)
42 if err != nil {
43 return nil, err
44 }
45 return out, nil
46 }
47
48 func (c *nonStandardServiceClient) UpdateWithJSONNames(ctx context.Context, in *NonStandardWithJSONNamesUpdateRequest, opts ...grpc.CallOption) (*NonStandardMessageWithJSONNames, error) {
49 out := new(NonStandardMessageWithJSONNames)
50 err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.NonStandardService/UpdateWithJSONNames", in, out, opts...)
51 if err != nil {
52 return nil, err
53 }
54 return out, nil
55 }
56
57
58
59
60 type NonStandardServiceServer interface {
61
62 Update(context.Context, *NonStandardUpdateRequest) (*NonStandardMessage, error)
63
64 UpdateWithJSONNames(context.Context, *NonStandardWithJSONNamesUpdateRequest) (*NonStandardMessageWithJSONNames, error)
65 }
66
67
68 type UnimplementedNonStandardServiceServer struct {
69 }
70
71 func (UnimplementedNonStandardServiceServer) Update(context.Context, *NonStandardUpdateRequest) (*NonStandardMessage, error) {
72 return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
73 }
74 func (UnimplementedNonStandardServiceServer) UpdateWithJSONNames(context.Context, *NonStandardWithJSONNamesUpdateRequest) (*NonStandardMessageWithJSONNames, error) {
75 return nil, status.Errorf(codes.Unimplemented, "method UpdateWithJSONNames not implemented")
76 }
77
78
79
80
81 type UnsafeNonStandardServiceServer interface {
82 mustEmbedUnimplementedNonStandardServiceServer()
83 }
84
85 func RegisterNonStandardServiceServer(s grpc.ServiceRegistrar, srv NonStandardServiceServer) {
86 s.RegisterService(&NonStandardService_ServiceDesc, srv)
87 }
88
89 func _NonStandardService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
90 in := new(NonStandardUpdateRequest)
91 if err := dec(in); err != nil {
92 return nil, err
93 }
94 if interceptor == nil {
95 return srv.(NonStandardServiceServer).Update(ctx, in)
96 }
97 info := &grpc.UnaryServerInfo{
98 Server: srv,
99 FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.NonStandardService/Update",
100 }
101 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
102 return srv.(NonStandardServiceServer).Update(ctx, req.(*NonStandardUpdateRequest))
103 }
104 return interceptor(ctx, in, info, handler)
105 }
106
107 func _NonStandardService_UpdateWithJSONNames_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
108 in := new(NonStandardWithJSONNamesUpdateRequest)
109 if err := dec(in); err != nil {
110 return nil, err
111 }
112 if interceptor == nil {
113 return srv.(NonStandardServiceServer).UpdateWithJSONNames(ctx, in)
114 }
115 info := &grpc.UnaryServerInfo{
116 Server: srv,
117 FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.NonStandardService/UpdateWithJSONNames",
118 }
119 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
120 return srv.(NonStandardServiceServer).UpdateWithJSONNames(ctx, req.(*NonStandardWithJSONNamesUpdateRequest))
121 }
122 return interceptor(ctx, in, info, handler)
123 }
124
125
126
127
128 var NonStandardService_ServiceDesc = grpc.ServiceDesc{
129 ServiceName: "grpc.gateway.examples.internal.proto.examplepb.NonStandardService",
130 HandlerType: (*NonStandardServiceServer)(nil),
131 Methods: []grpc.MethodDesc{
132 {
133 MethodName: "Update",
134 Handler: _NonStandardService_Update_Handler,
135 },
136 {
137 MethodName: "UpdateWithJSONNames",
138 Handler: _NonStandardService_UpdateWithJSONNames_Handler,
139 },
140 },
141 Streams: []grpc.StreamDesc{},
142 Metadata: "examples/internal/proto/examplepb/non_standard_names.proto",
143 }
144
View as plain text