github.com/Tyktechnologies/tyk@v2.9.5+incompatible/coprocess/coprocess_object.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // source: coprocess_object.proto 3 4 package coprocess 5 6 import ( 7 context "context" 8 fmt "fmt" 9 math "math" 10 11 proto "github.com/golang/protobuf/proto" 12 grpc "google.golang.org/grpc" 13 codes "google.golang.org/grpc/codes" 14 status "google.golang.org/grpc/status" 15 ) 16 17 // Reference imports to suppress errors if they are not otherwise used. 18 var _ = proto.Marshal 19 var _ = fmt.Errorf 20 var _ = math.Inf 21 22 // This is a compile-time assertion to ensure that this generated file 23 // is compatible with the proto package it is being compiled against. 24 // A compilation error at this line likely means your copy of the 25 // proto package needs to be updated. 26 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package 27 28 type Object struct { 29 HookType HookType `protobuf:"varint,1,opt,name=hook_type,json=hookType,proto3,enum=coprocess.HookType" json:"hook_type,omitempty"` 30 HookName string `protobuf:"bytes,2,opt,name=hook_name,json=hookName,proto3" json:"hook_name,omitempty"` 31 Request *MiniRequestObject `protobuf:"bytes,3,opt,name=request,proto3" json:"request,omitempty"` 32 Session *SessionState `protobuf:"bytes,4,opt,name=session,proto3" json:"session,omitempty"` 33 Metadata map[string]string `protobuf:"bytes,5,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 34 Spec map[string]string `protobuf:"bytes,6,rep,name=spec,proto3" json:"spec,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 35 XXX_NoUnkeyedLiteral struct{} `json:"-"` 36 XXX_unrecognized []byte `json:"-"` 37 XXX_sizecache int32 `json:"-"` 38 } 39 40 func (m *Object) Reset() { *m = Object{} } 41 func (m *Object) String() string { return proto.CompactTextString(m) } 42 func (*Object) ProtoMessage() {} 43 func (*Object) Descriptor() ([]byte, []int) { 44 return fileDescriptor_72698a2223f86099, []int{0} 45 } 46 47 func (m *Object) XXX_Unmarshal(b []byte) error { 48 return xxx_messageInfo_Object.Unmarshal(m, b) 49 } 50 func (m *Object) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 51 return xxx_messageInfo_Object.Marshal(b, m, deterministic) 52 } 53 func (m *Object) XXX_Merge(src proto.Message) { 54 xxx_messageInfo_Object.Merge(m, src) 55 } 56 func (m *Object) XXX_Size() int { 57 return xxx_messageInfo_Object.Size(m) 58 } 59 func (m *Object) XXX_DiscardUnknown() { 60 xxx_messageInfo_Object.DiscardUnknown(m) 61 } 62 63 var xxx_messageInfo_Object proto.InternalMessageInfo 64 65 func (m *Object) GetHookType() HookType { 66 if m != nil { 67 return m.HookType 68 } 69 return HookType_Unknown 70 } 71 72 func (m *Object) GetHookName() string { 73 if m != nil { 74 return m.HookName 75 } 76 return "" 77 } 78 79 func (m *Object) GetRequest() *MiniRequestObject { 80 if m != nil { 81 return m.Request 82 } 83 return nil 84 } 85 86 func (m *Object) GetSession() *SessionState { 87 if m != nil { 88 return m.Session 89 } 90 return nil 91 } 92 93 func (m *Object) GetMetadata() map[string]string { 94 if m != nil { 95 return m.Metadata 96 } 97 return nil 98 } 99 100 func (m *Object) GetSpec() map[string]string { 101 if m != nil { 102 return m.Spec 103 } 104 return nil 105 } 106 107 type Event struct { 108 Payload string `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` 109 XXX_NoUnkeyedLiteral struct{} `json:"-"` 110 XXX_unrecognized []byte `json:"-"` 111 XXX_sizecache int32 `json:"-"` 112 } 113 114 func (m *Event) Reset() { *m = Event{} } 115 func (m *Event) String() string { return proto.CompactTextString(m) } 116 func (*Event) ProtoMessage() {} 117 func (*Event) Descriptor() ([]byte, []int) { 118 return fileDescriptor_72698a2223f86099, []int{1} 119 } 120 121 func (m *Event) XXX_Unmarshal(b []byte) error { 122 return xxx_messageInfo_Event.Unmarshal(m, b) 123 } 124 func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 125 return xxx_messageInfo_Event.Marshal(b, m, deterministic) 126 } 127 func (m *Event) XXX_Merge(src proto.Message) { 128 xxx_messageInfo_Event.Merge(m, src) 129 } 130 func (m *Event) XXX_Size() int { 131 return xxx_messageInfo_Event.Size(m) 132 } 133 func (m *Event) XXX_DiscardUnknown() { 134 xxx_messageInfo_Event.DiscardUnknown(m) 135 } 136 137 var xxx_messageInfo_Event proto.InternalMessageInfo 138 139 func (m *Event) GetPayload() string { 140 if m != nil { 141 return m.Payload 142 } 143 return "" 144 } 145 146 type EventReply struct { 147 XXX_NoUnkeyedLiteral struct{} `json:"-"` 148 XXX_unrecognized []byte `json:"-"` 149 XXX_sizecache int32 `json:"-"` 150 } 151 152 func (m *EventReply) Reset() { *m = EventReply{} } 153 func (m *EventReply) String() string { return proto.CompactTextString(m) } 154 func (*EventReply) ProtoMessage() {} 155 func (*EventReply) Descriptor() ([]byte, []int) { 156 return fileDescriptor_72698a2223f86099, []int{2} 157 } 158 159 func (m *EventReply) XXX_Unmarshal(b []byte) error { 160 return xxx_messageInfo_EventReply.Unmarshal(m, b) 161 } 162 func (m *EventReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 163 return xxx_messageInfo_EventReply.Marshal(b, m, deterministic) 164 } 165 func (m *EventReply) XXX_Merge(src proto.Message) { 166 xxx_messageInfo_EventReply.Merge(m, src) 167 } 168 func (m *EventReply) XXX_Size() int { 169 return xxx_messageInfo_EventReply.Size(m) 170 } 171 func (m *EventReply) XXX_DiscardUnknown() { 172 xxx_messageInfo_EventReply.DiscardUnknown(m) 173 } 174 175 var xxx_messageInfo_EventReply proto.InternalMessageInfo 176 177 func init() { 178 proto.RegisterType((*Object)(nil), "coprocess.Object") 179 proto.RegisterMapType((map[string]string)(nil), "coprocess.Object.MetadataEntry") 180 proto.RegisterMapType((map[string]string)(nil), "coprocess.Object.SpecEntry") 181 proto.RegisterType((*Event)(nil), "coprocess.Event") 182 proto.RegisterType((*EventReply)(nil), "coprocess.EventReply") 183 } 184 185 func init() { proto.RegisterFile("coprocess_object.proto", fileDescriptor_72698a2223f86099) } 186 187 var fileDescriptor_72698a2223f86099 = []byte{ 188 // 383 bytes of a gzipped FileDescriptorProto 189 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0x4f, 0xcf, 0x93, 0x40, 190 0x10, 0xc6, 0x4b, 0xe9, 0x3f, 0xa6, 0xd6, 0xd4, 0xf5, 0x1f, 0xa1, 0x1a, 0x11, 0x2f, 0x9c, 0x50, 191 0x31, 0x51, 0xd3, 0x5e, 0x6d, 0xe2, 0xa5, 0x9a, 0x50, 0xef, 0x64, 0x4b, 0x27, 0x29, 0xb6, 0xb0, 192 0x2b, 0xbb, 0x6d, 0x42, 0xe2, 0xe7, 0x79, 0x3f, 0xe7, 0x9b, 0xee, 0x02, 0xa5, 0x6f, 0x4f, 0xef, 193 0x6d, 0xe7, 0x99, 0xe7, 0x37, 0x0f, 0x33, 0x01, 0x5e, 0x25, 0x8c, 0x17, 0x2c, 0x41, 0x21, 0x62, 194 0xb6, 0xf9, 0x8b, 0x89, 0x0c, 0x78, 0xc1, 0x24, 0x23, 0x56, 0xa3, 0x3b, 0x1f, 0x2e, 0x96, 0x2c, 195 0xcd, 0xd3, 0xb8, 0xc0, 0x7f, 0x47, 0x14, 0xf2, 0xca, 0xef, 0xbc, 0xbd, 0x98, 0x04, 0x0a, 0x91, 196 0xb2, 0x3c, 0x16, 0x92, 0x4a, 0xac, 0xda, 0xad, 0x98, 0x84, 0x65, 0x19, 0xcb, 0xb5, 0xee, 0xdd, 197 0x99, 0x30, 0xf8, 0xad, 0xe6, 0x90, 0x4f, 0x60, 0xed, 0x18, 0xdb, 0xc7, 0xb2, 0xe4, 0x68, 0x1b, 198 0xae, 0xe1, 0x3f, 0x0d, 0x9f, 0x07, 0x0d, 0x16, 0xfc, 0x64, 0x6c, 0xff, 0xa7, 0xe4, 0x18, 0x8d, 199 0x76, 0xd5, 0x8b, 0xcc, 0x2a, 0x22, 0xa7, 0x19, 0xda, 0x5d, 0xd7, 0xf0, 0x2d, 0xdd, 0xfc, 0x45, 200 0x33, 0x24, 0x5f, 0x61, 0x58, 0x7d, 0xa8, 0x6d, 0xba, 0x86, 0x3f, 0x0e, 0xdf, 0xb4, 0x86, 0xad, 201 0xd2, 0x3c, 0x8d, 0x74, 0x57, 0xa7, 0x47, 0xb5, 0x99, 0x7c, 0x86, 0x61, 0xb5, 0x80, 0xdd, 0x53, 202 0xdc, 0xeb, 0x16, 0xb7, 0xd6, 0x9d, 0xf5, 0x79, 0xb3, 0xa8, 0xf6, 0x91, 0x05, 0x8c, 0x32, 0x94, 203 0x74, 0x4b, 0x25, 0xb5, 0xfb, 0xae, 0xe9, 0x8f, 0xc3, 0x77, 0x2d, 0x46, 0x07, 0x04, 0xab, 0xca, 204 0xb1, 0xcc, 0x65, 0x51, 0x46, 0x0d, 0x40, 0x3e, 0x42, 0x4f, 0x70, 0x4c, 0xec, 0x81, 0x02, 0x67, 205 0xb7, 0xe0, 0x9a, 0x63, 0xa2, 0x21, 0x65, 0x74, 0x16, 0x30, 0xb9, 0x9a, 0x45, 0xa6, 0x60, 0xee, 206 0xb1, 0x54, 0x27, 0xb3, 0xa2, 0xf3, 0x93, 0xbc, 0x80, 0xfe, 0x89, 0x1e, 0x8e, 0xf5, 0x51, 0x74, 207 0x31, 0xef, 0x7e, 0x37, 0x9c, 0x6f, 0x60, 0x35, 0xf3, 0x1e, 0x03, 0x7a, 0xef, 0xa1, 0xbf, 0x3c, 208 0x61, 0x2e, 0x89, 0x0d, 0x43, 0x4e, 0xcb, 0x03, 0xa3, 0xdb, 0x0a, 0xac, 0x4b, 0xef, 0x09, 0x80, 209 0xb2, 0x44, 0xc8, 0x0f, 0x65, 0xf8, 0x1f, 0xe0, 0x47, 0x2a, 0x38, 0x95, 0xc9, 0x0e, 0x0b, 0x12, 210 0xc2, 0xa8, 0xae, 0xc8, 0xb3, 0x9b, 0x1d, 0x9d, 0x5b, 0xc9, 0xeb, 0x90, 0x39, 0x4c, 0x6a, 0x46, 211 0x47, 0x4f, 0x5b, 0x2e, 0xa5, 0x38, 0x2f, 0x1f, 0x2a, 0x2a, 0xdb, 0xeb, 0x6c, 0x06, 0xea, 0xf7, 212 0xfa, 0x72, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x6f, 0xaf, 0x58, 0x65, 0xdf, 0x02, 0x00, 0x00, 213 } 214 215 // Reference imports to suppress errors if they are not otherwise used. 216 var _ context.Context 217 var _ grpc.ClientConn 218 219 // This is a compile-time assertion to ensure that this generated file 220 // is compatible with the grpc package it is being compiled against. 221 const _ = grpc.SupportPackageIsVersion4 222 223 // DispatcherClient is the client API for Dispatcher service. 224 // 225 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 226 type DispatcherClient interface { 227 Dispatch(ctx context.Context, in *Object, opts ...grpc.CallOption) (*Object, error) 228 DispatchEvent(ctx context.Context, in *Event, opts ...grpc.CallOption) (*EventReply, error) 229 } 230 231 type dispatcherClient struct { 232 cc *grpc.ClientConn 233 } 234 235 func NewDispatcherClient(cc *grpc.ClientConn) DispatcherClient { 236 return &dispatcherClient{cc} 237 } 238 239 func (c *dispatcherClient) Dispatch(ctx context.Context, in *Object, opts ...grpc.CallOption) (*Object, error) { 240 out := new(Object) 241 err := c.cc.Invoke(ctx, "/coprocess.Dispatcher/Dispatch", in, out, opts...) 242 if err != nil { 243 return nil, err 244 } 245 return out, nil 246 } 247 248 func (c *dispatcherClient) DispatchEvent(ctx context.Context, in *Event, opts ...grpc.CallOption) (*EventReply, error) { 249 out := new(EventReply) 250 err := c.cc.Invoke(ctx, "/coprocess.Dispatcher/DispatchEvent", in, out, opts...) 251 if err != nil { 252 return nil, err 253 } 254 return out, nil 255 } 256 257 // DispatcherServer is the server API for Dispatcher service. 258 type DispatcherServer interface { 259 Dispatch(context.Context, *Object) (*Object, error) 260 DispatchEvent(context.Context, *Event) (*EventReply, error) 261 } 262 263 // UnimplementedDispatcherServer can be embedded to have forward compatible implementations. 264 type UnimplementedDispatcherServer struct { 265 } 266 267 func (*UnimplementedDispatcherServer) Dispatch(ctx context.Context, req *Object) (*Object, error) { 268 return nil, status.Errorf(codes.Unimplemented, "method Dispatch not implemented") 269 } 270 func (*UnimplementedDispatcherServer) DispatchEvent(ctx context.Context, req *Event) (*EventReply, error) { 271 return nil, status.Errorf(codes.Unimplemented, "method DispatchEvent not implemented") 272 } 273 274 func RegisterDispatcherServer(s *grpc.Server, srv DispatcherServer) { 275 s.RegisterService(&_Dispatcher_serviceDesc, srv) 276 } 277 278 func _Dispatcher_Dispatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 279 in := new(Object) 280 if err := dec(in); err != nil { 281 return nil, err 282 } 283 if interceptor == nil { 284 return srv.(DispatcherServer).Dispatch(ctx, in) 285 } 286 info := &grpc.UnaryServerInfo{ 287 Server: srv, 288 FullMethod: "/coprocess.Dispatcher/Dispatch", 289 } 290 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 291 return srv.(DispatcherServer).Dispatch(ctx, req.(*Object)) 292 } 293 return interceptor(ctx, in, info, handler) 294 } 295 296 func _Dispatcher_DispatchEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 297 in := new(Event) 298 if err := dec(in); err != nil { 299 return nil, err 300 } 301 if interceptor == nil { 302 return srv.(DispatcherServer).DispatchEvent(ctx, in) 303 } 304 info := &grpc.UnaryServerInfo{ 305 Server: srv, 306 FullMethod: "/coprocess.Dispatcher/DispatchEvent", 307 } 308 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 309 return srv.(DispatcherServer).DispatchEvent(ctx, req.(*Event)) 310 } 311 return interceptor(ctx, in, info, handler) 312 } 313 314 var _Dispatcher_serviceDesc = grpc.ServiceDesc{ 315 ServiceName: "coprocess.Dispatcher", 316 HandlerType: (*DispatcherServer)(nil), 317 Methods: []grpc.MethodDesc{ 318 { 319 MethodName: "Dispatch", 320 Handler: _Dispatcher_Dispatch_Handler, 321 }, 322 { 323 MethodName: "DispatchEvent", 324 Handler: _Dispatcher_DispatchEvent_Handler, 325 }, 326 }, 327 Streams: []grpc.StreamDesc{}, 328 Metadata: "coprocess_object.proto", 329 }