Debian Codegraph @

examples/grpc-server-with-prometheus/protobuf/service.pb.go

raw
1 // Code generated by protoc-gen-go. DO NOT EDIT.
2 // source: service.proto
3
4 package proto
5
6 import proto "github.com/golang/protobuf/proto"
7 import fmt "fmt"
8 import math "math"
9
10 import (
11 context "golang.org/x/net/context"
12 grpc "google.golang.org/grpc"
13 )
14
15 // Reference imports to suppress errors if they are not otherwise used.
16 var _ = proto.Marshal
17 var _ = fmt.Errorf
18 var _ = math.Inf
19
20 // This is a compile-time assertion to ensure that this generated file
21 // is compatible with the proto package it is being compiled against.
22 // A compilation error at this line likely means your copy of the
23 // proto package needs to be updated.
24 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
25
26 type HelloRequest struct {
27 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
28 XXX_NoUnkeyedLiteral struct{} `json:"-"`
29 XXX_unrecognized []byte `json:"-"`
30 XXX_sizecache int32 `json:"-"`
31 }
32
33 func (m *HelloRequest) Reset() { *m = HelloRequest{} }
34 func (m *HelloRequest) String() string { return proto.CompactTextString(m) }
35 func (*HelloRequest) ProtoMessage() {}
36 func (*HelloRequest) Descriptor() ([]byte, []int) {
37 return fileDescriptor_service_85197be0990351b4, []int{0}
38 }
39 func (m *HelloRequest) XXX_Unmarshal(b []byte) error {
40 return xxx_messageInfo_HelloRequest.Unmarshal(m, b)
41 }
42 func (m *HelloRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
43 return xxx_messageInfo_HelloRequest.Marshal(b, m, deterministic)
44 }
45 func (dst *HelloRequest) XXX_Merge(src proto.Message) {
46 xxx_messageInfo_HelloRequest.Merge(dst, src)
47 }
48 func (m *HelloRequest) XXX_Size() int {
49 return xxx_messageInfo_HelloRequest.Size(m)
50 }
51 func (m *HelloRequest) XXX_DiscardUnknown() {
52 xxx_messageInfo_HelloRequest.DiscardUnknown(m)
53 }
54
55 var xxx_messageInfo_HelloRequest proto.InternalMessageInfo
56
57 func (m *HelloRequest) GetName() string {
58 if m != nil {
59 return m.Name
60 }
61 return ""
62 }
63
64 type HelloResponse struct {
65 Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
66 XXX_NoUnkeyedLiteral struct{} `json:"-"`
67 XXX_unrecognized []byte `json:"-"`
68 XXX_sizecache int32 `json:"-"`
69 }
70
71 func (m *HelloResponse) Reset() { *m = HelloResponse{} }
72 func (m *HelloResponse) String() string { return proto.CompactTextString(m) }
73 func (*HelloResponse) ProtoMessage() {}
74 func (*HelloResponse) Descriptor() ([]byte, []int) {
75 return fileDescriptor_service_85197be0990351b4, []int{1}
76 }
77 func (m *HelloResponse) XXX_Unmarshal(b []byte) error {
78 return xxx_messageInfo_HelloResponse.Unmarshal(m, b)
79 }
80 func (m *HelloResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
81 return xxx_messageInfo_HelloResponse.Marshal(b, m, deterministic)
82 }
83 func (dst *HelloResponse) XXX_Merge(src proto.Message) {
84 xxx_messageInfo_HelloResponse.Merge(dst, src)
85 }
86 func (m *HelloResponse) XXX_Size() int {
87 return xxx_messageInfo_HelloResponse.Size(m)
88 }
89 func (m *HelloResponse) XXX_DiscardUnknown() {
90 xxx_messageInfo_HelloResponse.DiscardUnknown(m)
91 }
92
93 var xxx_messageInfo_HelloResponse proto.InternalMessageInfo
94
95 func (m *HelloResponse) GetMessage() string {
96 if m != nil {
97 return m.Message
98 }
99 return ""
100 }
101
102 func init() {
103 proto.RegisterType((*HelloRequest)(nil), "proto.HelloRequest")
104 proto.RegisterType((*HelloResponse)(nil), "proto.HelloResponse")
105 }
106
107 // Reference imports to suppress errors if they are not otherwise used.
108 var _ context.Context
109 var _ grpc.ClientConn
110
111 // This is a compile-time assertion to ensure that this generated file
112 // is compatible with the grpc package it is being compiled against.
113 const _ = grpc.SupportPackageIsVersion4
114
115 // DemoServiceClient is the client API for DemoService service.
116 //
117 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
118 type DemoServiceClient interface {
119 SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloResponse, error)
120 }
121
122 type demoServiceClient struct {
123 cc *grpc.ClientConn
124 }
125
126 func NewDemoServiceClient(cc *grpc.ClientConn) DemoServiceClient {
127 return &demoServiceClient{cc}
128 }
129
130 func (c *demoServiceClient) SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloResponse, error) {
131 out := new(HelloResponse)
132 err := c.cc.Invoke(ctx, "/proto.DemoService/SayHello", in, out, opts...)
133 if err != nil {
134 return nil, err
135 }
136 return out, nil
137 }
138
139 // DemoServiceServer is the server API for DemoService service.
140 type DemoServiceServer interface {
141 SayHello(context.Context, *HelloRequest) (*HelloResponse, error)
142 }
143
144 func RegisterDemoServiceServer(s *grpc.Server, srv DemoServiceServer) {
145 s.RegisterService(&_DemoService_serviceDesc, srv)
146 }
147
148 func _DemoService_SayHello_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
149 in := new(HelloRequest)
150 if err := dec(in); err != nil {
151 return nil, err
152 }
153 if interceptor == nil {
154 return srv.(DemoServiceServer).SayHello(ctx, in)
155 }
156 info := &grpc.UnaryServerInfo{
157 Server: srv,
158 FullMethod: "/proto.DemoService/SayHello",
159 }
160 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
161 return srv.(DemoServiceServer).SayHello(ctx, req.(*HelloRequest))
162 }
163 return interceptor(ctx, in, info, handler)
164 }
165
166 var _DemoService_serviceDesc = grpc.ServiceDesc{
167 ServiceName: "proto.DemoService",
168 HandlerType: (*DemoServiceServer)(nil),
169 Methods: []grpc.MethodDesc{
170 {
171 MethodName: "SayHello",
172 Handler: _DemoService_SayHello_Handler,
173 },
174 },
175 Streams: []grpc.StreamDesc{},
176 Metadata: "service.proto",
177 }
178
179 func init() { proto.RegisterFile("service.proto", fileDescriptor_service_85197be0990351b4) }
180
181 var fileDescriptor_service_85197be0990351b4 = []byte{
182 // 142 bytes of a gzipped FileDescriptorProto
183 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2d, 0x4e, 0x2d, 0x2a,
184 0xcb, 0x4c, 0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x05, 0x53, 0x4a, 0x4a, 0x5c,
185 0x3c, 0x1e, 0xa9, 0x39, 0x39, 0xf9, 0x41, 0xa9, 0x85, 0xa5, 0xa9, 0xc5, 0x25, 0x42, 0x42, 0x5c,
186 0x2c, 0x79, 0x89, 0xb9, 0xa9, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0x60, 0xb6, 0x92, 0x26,
187 0x17, 0x2f, 0x54, 0x4d, 0x71, 0x41, 0x7e, 0x5e, 0x71, 0xaa, 0x90, 0x04, 0x17, 0x7b, 0x6e, 0x6a,
188 0x71, 0x71, 0x62, 0x3a, 0x4c, 0x1d, 0x8c, 0x6b, 0xe4, 0xc6, 0xc5, 0xed, 0x92, 0x9a, 0x9b, 0x1f,
189 0x0c, 0xb1, 0x4a, 0xc8, 0x9c, 0x8b, 0x23, 0x38, 0xb1, 0x12, 0xac, 0x59, 0x48, 0x18, 0x62, 0xb1,
190 0x1e, 0xb2, 0x75, 0x52, 0x22, 0xa8, 0x82, 0x10, 0xf3, 0x95, 0x18, 0x92, 0xd8, 0xc0, 0xc2, 0xc6,
191 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf2, 0xf5, 0x90, 0x47, 0xb5, 0x00, 0x00, 0x00,
192 }