github.com/angenalZZZ/gofunc@v0.0.0-20210507121333-48ff1be3917b/cmd/fastcache1e6/cache.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // source: cache.proto 3 4 package main 5 6 import ( 7 context "context" 8 fmt "fmt" 9 proto "github.com/golang/protobuf/proto" 10 grpc "google.golang.org/grpc" 11 math "math" 12 ) 13 14 // Reference imports to suppress errors if they are not otherwise used. 15 var _ = proto.Marshal 16 var _ = fmt.Errorf 17 var _ = math.Inf 18 19 // This is a compile-time assertion to ensure that this generated file 20 // is compatible with the proto package it is being compiled against. 21 // A compilation error at this line likely means your copy of the 22 // proto package needs to be updated. 23 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package 24 25 // A CacheWriter Message 26 type CacheWriter struct { 27 Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` 28 Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` 29 Ttl uint64 `protobuf:"fixed64,3,opt,name=ttl,proto3" json:"ttl,omitempty"` 30 XXX_NoUnkeyedLiteral struct{} `json:"-"` 31 XXX_unrecognized []byte `json:"-"` 32 XXX_sizecache int32 `json:"-"` 33 } 34 35 func (m *CacheWriter) Reset() { *m = CacheWriter{} } 36 func (m *CacheWriter) String() string { return proto.CompactTextString(m) } 37 func (*CacheWriter) ProtoMessage() {} 38 func (*CacheWriter) Descriptor() ([]byte, []int) { 39 return fileDescriptor_5fca3b110c9bbf3a, []int{0} 40 } 41 42 func (m *CacheWriter) XXX_Unmarshal(b []byte) error { 43 return xxx_messageInfo_CacheWriter.Unmarshal(m, b) 44 } 45 func (m *CacheWriter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 46 return xxx_messageInfo_CacheWriter.Marshal(b, m, deterministic) 47 } 48 func (m *CacheWriter) XXX_Merge(src proto.Message) { 49 xxx_messageInfo_CacheWriter.Merge(m, src) 50 } 51 func (m *CacheWriter) XXX_Size() int { 52 return xxx_messageInfo_CacheWriter.Size(m) 53 } 54 func (m *CacheWriter) XXX_DiscardUnknown() { 55 xxx_messageInfo_CacheWriter.DiscardUnknown(m) 56 } 57 58 var xxx_messageInfo_CacheWriter proto.InternalMessageInfo 59 60 func (m *CacheWriter) GetKey() string { 61 if m != nil { 62 return m.Key 63 } 64 return "" 65 } 66 67 func (m *CacheWriter) GetValue() []byte { 68 if m != nil { 69 return m.Value 70 } 71 return nil 72 } 73 74 func (m *CacheWriter) GetTtl() uint64 { 75 if m != nil { 76 return m.Ttl 77 } 78 return 0 79 } 80 81 // A CacheReader Message 82 type CacheReader struct { 83 Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` 84 XXX_NoUnkeyedLiteral struct{} `json:"-"` 85 XXX_unrecognized []byte `json:"-"` 86 XXX_sizecache int32 `json:"-"` 87 } 88 89 func (m *CacheReader) Reset() { *m = CacheReader{} } 90 func (m *CacheReader) String() string { return proto.CompactTextString(m) } 91 func (*CacheReader) ProtoMessage() {} 92 func (*CacheReader) Descriptor() ([]byte, []int) { 93 return fileDescriptor_5fca3b110c9bbf3a, []int{1} 94 } 95 96 func (m *CacheReader) XXX_Unmarshal(b []byte) error { 97 return xxx_messageInfo_CacheReader.Unmarshal(m, b) 98 } 99 func (m *CacheReader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 100 return xxx_messageInfo_CacheReader.Marshal(b, m, deterministic) 101 } 102 func (m *CacheReader) XXX_Merge(src proto.Message) { 103 xxx_messageInfo_CacheReader.Merge(m, src) 104 } 105 func (m *CacheReader) XXX_Size() int { 106 return xxx_messageInfo_CacheReader.Size(m) 107 } 108 func (m *CacheReader) XXX_DiscardUnknown() { 109 xxx_messageInfo_CacheReader.DiscardUnknown(m) 110 } 111 112 var xxx_messageInfo_CacheReader proto.InternalMessageInfo 113 114 func (m *CacheReader) GetKey() string { 115 if m != nil { 116 return m.Key 117 } 118 return "" 119 } 120 121 // A CacheValue Message 122 type CacheValue struct { 123 Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` 124 XXX_NoUnkeyedLiteral struct{} `json:"-"` 125 XXX_unrecognized []byte `json:"-"` 126 XXX_sizecache int32 `json:"-"` 127 } 128 129 func (m *CacheValue) Reset() { *m = CacheValue{} } 130 func (m *CacheValue) String() string { return proto.CompactTextString(m) } 131 func (*CacheValue) ProtoMessage() {} 132 func (*CacheValue) Descriptor() ([]byte, []int) { 133 return fileDescriptor_5fca3b110c9bbf3a, []int{2} 134 } 135 136 func (m *CacheValue) XXX_Unmarshal(b []byte) error { 137 return xxx_messageInfo_CacheValue.Unmarshal(m, b) 138 } 139 func (m *CacheValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 140 return xxx_messageInfo_CacheValue.Marshal(b, m, deterministic) 141 } 142 func (m *CacheValue) XXX_Merge(src proto.Message) { 143 xxx_messageInfo_CacheValue.Merge(m, src) 144 } 145 func (m *CacheValue) XXX_Size() int { 146 return xxx_messageInfo_CacheValue.Size(m) 147 } 148 func (m *CacheValue) XXX_DiscardUnknown() { 149 xxx_messageInfo_CacheValue.DiscardUnknown(m) 150 } 151 152 var xxx_messageInfo_CacheValue proto.InternalMessageInfo 153 154 func (m *CacheValue) GetValue() []byte { 155 if m != nil { 156 return m.Value 157 } 158 return nil 159 } 160 161 // A CacheTtl Message 162 type CacheTtl struct { 163 Ttl uint64 `protobuf:"fixed64,1,opt,name=ttl,proto3" json:"ttl,omitempty"` 164 XXX_NoUnkeyedLiteral struct{} `json:"-"` 165 XXX_unrecognized []byte `json:"-"` 166 XXX_sizecache int32 `json:"-"` 167 } 168 169 func (m *CacheTtl) Reset() { *m = CacheTtl{} } 170 func (m *CacheTtl) String() string { return proto.CompactTextString(m) } 171 func (*CacheTtl) ProtoMessage() {} 172 func (*CacheTtl) Descriptor() ([]byte, []int) { 173 return fileDescriptor_5fca3b110c9bbf3a, []int{3} 174 } 175 176 func (m *CacheTtl) XXX_Unmarshal(b []byte) error { 177 return xxx_messageInfo_CacheTtl.Unmarshal(m, b) 178 } 179 func (m *CacheTtl) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 180 return xxx_messageInfo_CacheTtl.Marshal(b, m, deterministic) 181 } 182 func (m *CacheTtl) XXX_Merge(src proto.Message) { 183 xxx_messageInfo_CacheTtl.Merge(m, src) 184 } 185 func (m *CacheTtl) XXX_Size() int { 186 return xxx_messageInfo_CacheTtl.Size(m) 187 } 188 func (m *CacheTtl) XXX_DiscardUnknown() { 189 xxx_messageInfo_CacheTtl.DiscardUnknown(m) 190 } 191 192 var xxx_messageInfo_CacheTtl proto.InternalMessageInfo 193 194 func (m *CacheTtl) GetTtl() uint64 { 195 if m != nil { 196 return m.Ttl 197 } 198 return 0 199 } 200 201 func init() { 202 proto.RegisterType((*CacheWriter)(nil), "proto3.CacheWriter") 203 proto.RegisterType((*CacheReader)(nil), "proto3.CacheReader") 204 proto.RegisterType((*CacheValue)(nil), "proto3.CacheValue") 205 proto.RegisterType((*CacheTtl)(nil), "proto3.CacheTtl") 206 } 207 208 func init() { proto.RegisterFile("cache.proto", fileDescriptor_5fca3b110c9bbf3a) } 209 210 var fileDescriptor_5fca3b110c9bbf3a = []byte{ 211 // 260 bytes of a gzipped FileDescriptorProto 212 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4e, 0x4e, 0x4c, 0xce, 213 0x48, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x03, 0x53, 0xc6, 0x4a, 0xee, 0x5c, 0xdc, 214 0xce, 0x20, 0xe1, 0xf0, 0xa2, 0xcc, 0x92, 0xd4, 0x22, 0x21, 0x01, 0x2e, 0xe6, 0xec, 0xd4, 0x4a, 215 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x10, 0x53, 0x48, 0x84, 0x8b, 0xb5, 0x2c, 0x31, 0xa7, 216 0x34, 0x55, 0x82, 0x49, 0x81, 0x51, 0x83, 0x27, 0x08, 0xc2, 0x01, 0xa9, 0x2b, 0x29, 0xc9, 0x91, 217 0x60, 0x56, 0x60, 0xd4, 0x60, 0x0b, 0x02, 0x31, 0x95, 0xe4, 0xa1, 0x06, 0x05, 0xa5, 0x26, 0xa6, 218 0x60, 0x33, 0x48, 0x49, 0x89, 0x8b, 0x0b, 0xac, 0x20, 0x0c, 0x6c, 0x00, 0xdc, 0x58, 0x46, 0x24, 219 0x63, 0x95, 0x64, 0xb8, 0x38, 0xc0, 0x6a, 0x42, 0x4a, 0x72, 0x60, 0x56, 0x30, 0xc2, 0xad, 0x30, 220 0xba, 0xc6, 0xc8, 0xc5, 0x03, 0x96, 0x0e, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0x15, 0x32, 0xe0, 221 0x62, 0x05, 0xbb, 0x5b, 0x48, 0x18, 0xe2, 0x2b, 0x63, 0x3d, 0x24, 0xbf, 0x48, 0x09, 0xa0, 0x08, 222 0x86, 0x94, 0xe4, 0x28, 0x31, 0x08, 0x19, 0x72, 0xb1, 0x80, 0x1c, 0x88, 0xa6, 0x01, 0xe2, 0x66, 223 0x29, 0x21, 0x14, 0x41, 0xb0, 0x3b, 0xc1, 0x5a, 0xd8, 0x5c, 0x52, 0x73, 0x52, 0x31, 0x6c, 0x81, 224 0x6a, 0xc2, 0x66, 0x8b, 0x1e, 0x17, 0x33, 0xc8, 0x07, 0xc4, 0xaa, 0x77, 0x32, 0xe6, 0xe2, 0xcd, 225 0xcc, 0xd7, 0x4b, 0x2f, 0x2a, 0x48, 0x86, 0x48, 0x3a, 0x41, 0x42, 0x2a, 0x00, 0xc4, 0x0e, 0x60, 226 0x8c, 0x62, 0xc9, 0x4d, 0xcc, 0xcc, 0x5b, 0xc5, 0xc4, 0xeb, 0xe9, 0xaf, 0x97, 0x1e, 0x14, 0xe0, 227 0xac, 0x07, 0x16, 0x4f, 0x82, 0xc6, 0x20, 0x20, 0x00, 0x00, 0xff, 0xff, 0x94, 0x3e, 0x89, 0xc1, 228 0xd7, 0x01, 0x00, 0x00, 229 } 230 231 // Reference imports to suppress errors if they are not otherwise used. 232 var _ context.Context 233 var _ grpc.ClientConn 234 235 // This is a compile-time assertion to ensure that this generated file 236 // is compatible with the grpc package it is being compiled against. 237 const _ = grpc.SupportPackageIsVersion4 238 239 // CacheServiceClient is the client API for CacheService service. 240 // 241 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 242 type CacheServiceClient interface { 243 Write(ctx context.Context, in *CacheWriter, opts ...grpc.CallOption) (*CacheTtl, error) 244 Read(ctx context.Context, in *CacheReader, opts ...grpc.CallOption) (*CacheValue, error) 245 Delete(ctx context.Context, in *CacheReader, opts ...grpc.CallOption) (*CacheTtl, error) 246 Ttl(ctx context.Context, in *CacheReader, opts ...grpc.CallOption) (*CacheTtl, error) 247 } 248 249 type cacheServiceClient struct { 250 cc *grpc.ClientConn 251 } 252 253 func NewCacheServiceClient(cc *grpc.ClientConn) CacheServiceClient { 254 return &cacheServiceClient{cc} 255 } 256 257 func (c *cacheServiceClient) Write(ctx context.Context, in *CacheWriter, opts ...grpc.CallOption) (*CacheTtl, error) { 258 out := new(CacheTtl) 259 err := c.cc.Invoke(ctx, "/proto3.CacheService/Write", in, out, opts...) 260 if err != nil { 261 return nil, err 262 } 263 return out, nil 264 } 265 266 func (c *cacheServiceClient) Read(ctx context.Context, in *CacheReader, opts ...grpc.CallOption) (*CacheValue, error) { 267 out := new(CacheValue) 268 err := c.cc.Invoke(ctx, "/proto3.CacheService/Read", in, out, opts...) 269 if err != nil { 270 return nil, err 271 } 272 return out, nil 273 } 274 275 func (c *cacheServiceClient) Delete(ctx context.Context, in *CacheReader, opts ...grpc.CallOption) (*CacheTtl, error) { 276 out := new(CacheTtl) 277 err := c.cc.Invoke(ctx, "/proto3.CacheService/Delete", in, out, opts...) 278 if err != nil { 279 return nil, err 280 } 281 return out, nil 282 } 283 284 func (c *cacheServiceClient) Ttl(ctx context.Context, in *CacheReader, opts ...grpc.CallOption) (*CacheTtl, error) { 285 out := new(CacheTtl) 286 err := c.cc.Invoke(ctx, "/proto3.CacheService/Ttl", in, out, opts...) 287 if err != nil { 288 return nil, err 289 } 290 return out, nil 291 } 292 293 // CacheServiceServer is the server API for CacheService service. 294 type CacheServiceServer interface { 295 Write(context.Context, *CacheWriter) (*CacheTtl, error) 296 Read(context.Context, *CacheReader) (*CacheValue, error) 297 Delete(context.Context, *CacheReader) (*CacheTtl, error) 298 Ttl(context.Context, *CacheReader) (*CacheTtl, error) 299 } 300 301 func RegisterCacheServiceServer(s *grpc.Server, srv CacheServiceServer) { 302 s.RegisterService(&_CacheService_serviceDesc, srv) 303 } 304 305 func _CacheService_Write_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 306 in := new(CacheWriter) 307 if err := dec(in); err != nil { 308 return nil, err 309 } 310 if interceptor == nil { 311 return srv.(CacheServiceServer).Write(ctx, in) 312 } 313 info := &grpc.UnaryServerInfo{ 314 Server: srv, 315 FullMethod: "/proto3.CacheService/Write", 316 } 317 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 318 return srv.(CacheServiceServer).Write(ctx, req.(*CacheWriter)) 319 } 320 return interceptor(ctx, in, info, handler) 321 } 322 323 func _CacheService_Read_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 324 in := new(CacheReader) 325 if err := dec(in); err != nil { 326 return nil, err 327 } 328 if interceptor == nil { 329 return srv.(CacheServiceServer).Read(ctx, in) 330 } 331 info := &grpc.UnaryServerInfo{ 332 Server: srv, 333 FullMethod: "/proto3.CacheService/Read", 334 } 335 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 336 return srv.(CacheServiceServer).Read(ctx, req.(*CacheReader)) 337 } 338 return interceptor(ctx, in, info, handler) 339 } 340 341 func _CacheService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 342 in := new(CacheReader) 343 if err := dec(in); err != nil { 344 return nil, err 345 } 346 if interceptor == nil { 347 return srv.(CacheServiceServer).Delete(ctx, in) 348 } 349 info := &grpc.UnaryServerInfo{ 350 Server: srv, 351 FullMethod: "/proto3.CacheService/Delete", 352 } 353 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 354 return srv.(CacheServiceServer).Delete(ctx, req.(*CacheReader)) 355 } 356 return interceptor(ctx, in, info, handler) 357 } 358 359 func _CacheService_Ttl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 360 in := new(CacheReader) 361 if err := dec(in); err != nil { 362 return nil, err 363 } 364 if interceptor == nil { 365 return srv.(CacheServiceServer).Ttl(ctx, in) 366 } 367 info := &grpc.UnaryServerInfo{ 368 Server: srv, 369 FullMethod: "/proto3.CacheService/Ttl", 370 } 371 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 372 return srv.(CacheServiceServer).Ttl(ctx, req.(*CacheReader)) 373 } 374 return interceptor(ctx, in, info, handler) 375 } 376 377 var _CacheService_serviceDesc = grpc.ServiceDesc{ 378 ServiceName: "proto3.CacheService", 379 HandlerType: (*CacheServiceServer)(nil), 380 Methods: []grpc.MethodDesc{ 381 { 382 MethodName: "Write", 383 Handler: _CacheService_Write_Handler, 384 }, 385 { 386 MethodName: "Read", 387 Handler: _CacheService_Read_Handler, 388 }, 389 { 390 MethodName: "Delete", 391 Handler: _CacheService_Delete_Handler, 392 }, 393 { 394 MethodName: "Ttl", 395 Handler: _CacheService_Ttl_Handler, 396 }, 397 }, 398 Streams: []grpc.StreamDesc{}, 399 Metadata: "cache.proto", 400 }