github.com/argoproj/argo-events@v1.9.1/eventsources/sources/generic/generic.pb.go (about)

     1  // Code generated by protoc-gen-go. DO NOT EDIT.
     2  // source: generic.proto
     3  
     4  package generic
     5  
     6  import (
     7  	context "context"
     8  	fmt "fmt"
     9  	proto "github.com/golang/protobuf/proto"
    10  	grpc "google.golang.org/grpc"
    11  	codes "google.golang.org/grpc/codes"
    12  	status "google.golang.org/grpc/status"
    13  	math "math"
    14  )
    15  
    16  // Reference imports to suppress errors if they are not otherwise used.
    17  var _ = proto.Marshal
    18  var _ = fmt.Errorf
    19  var _ = math.Inf
    20  
    21  // This is a compile-time assertion to ensure that this generated file
    22  // is compatible with the proto package it is being compiled against.
    23  // A compilation error at this line likely means your copy of the
    24  // proto package needs to be updated.
    25  const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
    26  
    27  type EventSource struct {
    28  	// The event source name.
    29  	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
    30  	// The event source configuration value.
    31  	Config               []byte   `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
    32  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
    33  	XXX_unrecognized     []byte   `json:"-"`
    34  	XXX_sizecache        int32    `json:"-"`
    35  }
    36  
    37  func (m *EventSource) Reset()         { *m = EventSource{} }
    38  func (m *EventSource) String() string { return proto.CompactTextString(m) }
    39  func (*EventSource) ProtoMessage()    {}
    40  func (*EventSource) Descriptor() ([]byte, []int) {
    41  	return fileDescriptor_4c692b03a02b431c, []int{0}
    42  }
    43  
    44  func (m *EventSource) XXX_Unmarshal(b []byte) error {
    45  	return xxx_messageInfo_EventSource.Unmarshal(m, b)
    46  }
    47  func (m *EventSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    48  	return xxx_messageInfo_EventSource.Marshal(b, m, deterministic)
    49  }
    50  func (m *EventSource) XXX_Merge(src proto.Message) {
    51  	xxx_messageInfo_EventSource.Merge(m, src)
    52  }
    53  func (m *EventSource) XXX_Size() int {
    54  	return xxx_messageInfo_EventSource.Size(m)
    55  }
    56  func (m *EventSource) XXX_DiscardUnknown() {
    57  	xxx_messageInfo_EventSource.DiscardUnknown(m)
    58  }
    59  
    60  var xxx_messageInfo_EventSource proto.InternalMessageInfo
    61  
    62  func (m *EventSource) GetName() string {
    63  	if m != nil {
    64  		return m.Name
    65  	}
    66  	return ""
    67  }
    68  
    69  func (m *EventSource) GetConfig() []byte {
    70  	if m != nil {
    71  		return m.Config
    72  	}
    73  	return nil
    74  }
    75  
    76  // *
    77  // Represents an event
    78  type Event struct {
    79  	// The event source name.
    80  	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
    81  	// The event payload.
    82  	Payload              []byte   `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
    83  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
    84  	XXX_unrecognized     []byte   `json:"-"`
    85  	XXX_sizecache        int32    `json:"-"`
    86  }
    87  
    88  func (m *Event) Reset()         { *m = Event{} }
    89  func (m *Event) String() string { return proto.CompactTextString(m) }
    90  func (*Event) ProtoMessage()    {}
    91  func (*Event) Descriptor() ([]byte, []int) {
    92  	return fileDescriptor_4c692b03a02b431c, []int{1}
    93  }
    94  
    95  func (m *Event) XXX_Unmarshal(b []byte) error {
    96  	return xxx_messageInfo_Event.Unmarshal(m, b)
    97  }
    98  func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    99  	return xxx_messageInfo_Event.Marshal(b, m, deterministic)
   100  }
   101  func (m *Event) XXX_Merge(src proto.Message) {
   102  	xxx_messageInfo_Event.Merge(m, src)
   103  }
   104  func (m *Event) XXX_Size() int {
   105  	return xxx_messageInfo_Event.Size(m)
   106  }
   107  func (m *Event) XXX_DiscardUnknown() {
   108  	xxx_messageInfo_Event.DiscardUnknown(m)
   109  }
   110  
   111  var xxx_messageInfo_Event proto.InternalMessageInfo
   112  
   113  func (m *Event) GetName() string {
   114  	if m != nil {
   115  		return m.Name
   116  	}
   117  	return ""
   118  }
   119  
   120  func (m *Event) GetPayload() []byte {
   121  	if m != nil {
   122  		return m.Payload
   123  	}
   124  	return nil
   125  }
   126  
   127  func init() {
   128  	proto.RegisterType((*EventSource)(nil), "generic.EventSource")
   129  	proto.RegisterType((*Event)(nil), "generic.Event")
   130  }
   131  
   132  func init() {
   133  	proto.RegisterFile("generic.proto", fileDescriptor_4c692b03a02b431c)
   134  }
   135  
   136  var fileDescriptor_4c692b03a02b431c = []byte{
   137  	// 153 bytes of a gzipped FileDescriptorProto
   138  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4d, 0x4f, 0xcd, 0x4b,
   139  	0x2d, 0xca, 0x4c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x87, 0x72, 0x95, 0x2c, 0xb9,
   140  	0xb8, 0x5d, 0xcb, 0x52, 0xf3, 0x4a, 0x82, 0xf3, 0x4b, 0x8b, 0x92, 0x53, 0x85, 0x84, 0xb8, 0x58,
   141  	0xf2, 0x12, 0x73, 0x53, 0x25, 0x18, 0x15, 0x18, 0x35, 0x38, 0x83, 0xc0, 0x6c, 0x21, 0x31, 0x2e,
   142  	0xb6, 0xe4, 0xfc, 0xbc, 0xb4, 0xcc, 0x74, 0x09, 0x26, 0x05, 0x46, 0x0d, 0x9e, 0x20, 0x28, 0x4f,
   143  	0xc9, 0x94, 0x8b, 0x15, 0xac, 0x15, 0xab, 0x26, 0x09, 0x2e, 0xf6, 0x82, 0xc4, 0xca, 0x9c, 0xfc,
   144  	0xc4, 0x14, 0xa8, 0x2e, 0x18, 0xd7, 0xc8, 0x8d, 0x8b, 0x03, 0xac, 0x2d, 0x33, 0x2f, 0x5d, 0xc8,
   145  	0x8a, 0x4b, 0x20, 0xb8, 0x24, 0xb1, 0xa8, 0x04, 0xd9, 0x09, 0x22, 0x7a, 0x30, 0xa7, 0x22, 0x89,
   146  	0x4a, 0xf1, 0xa1, 0x8a, 0x1a, 0x30, 0x26, 0xb1, 0x81, 0x7d, 0x62, 0x0c, 0x08, 0x00, 0x00, 0xff,
   147  	0xff, 0x6e, 0x1c, 0x65, 0x01, 0xda, 0x00, 0x00, 0x00,
   148  }
   149  
   150  // Reference imports to suppress errors if they are not otherwise used.
   151  var _ context.Context
   152  var _ grpc.ClientConnInterface
   153  
   154  // This is a compile-time assertion to ensure that this generated file
   155  // is compatible with the grpc package it is being compiled against.
   156  const _ = grpc.SupportPackageIsVersion6
   157  
   158  // EventingClient is the client API for Eventing service.
   159  //
   160  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   161  type EventingClient interface {
   162  	StartEventSource(ctx context.Context, in *EventSource, opts ...grpc.CallOption) (Eventing_StartEventSourceClient, error)
   163  }
   164  
   165  type eventingClient struct {
   166  	cc grpc.ClientConnInterface
   167  }
   168  
   169  func NewEventingClient(cc grpc.ClientConnInterface) EventingClient {
   170  	return &eventingClient{cc}
   171  }
   172  
   173  func (c *eventingClient) StartEventSource(ctx context.Context, in *EventSource, opts ...grpc.CallOption) (Eventing_StartEventSourceClient, error) {
   174  	stream, err := c.cc.NewStream(ctx, &_Eventing_serviceDesc.Streams[0], "/generic.Eventing/StartEventSource", opts...)
   175  	if err != nil {
   176  		return nil, err
   177  	}
   178  	x := &eventingStartEventSourceClient{stream}
   179  	if err := x.ClientStream.SendMsg(in); err != nil {
   180  		return nil, err
   181  	}
   182  	if err := x.ClientStream.CloseSend(); err != nil {
   183  		return nil, err
   184  	}
   185  	return x, nil
   186  }
   187  
   188  type Eventing_StartEventSourceClient interface {
   189  	Recv() (*Event, error)
   190  	grpc.ClientStream
   191  }
   192  
   193  type eventingStartEventSourceClient struct {
   194  	grpc.ClientStream
   195  }
   196  
   197  func (x *eventingStartEventSourceClient) Recv() (*Event, error) {
   198  	m := new(Event)
   199  	if err := x.ClientStream.RecvMsg(m); err != nil {
   200  		return nil, err
   201  	}
   202  	return m, nil
   203  }
   204  
   205  // EventingServer is the server API for Eventing service.
   206  type EventingServer interface {
   207  	StartEventSource(*EventSource, Eventing_StartEventSourceServer) error
   208  }
   209  
   210  // UnimplementedEventingServer can be embedded to have forward compatible implementations.
   211  type UnimplementedEventingServer struct {
   212  }
   213  
   214  func (*UnimplementedEventingServer) StartEventSource(req *EventSource, srv Eventing_StartEventSourceServer) error {
   215  	return status.Errorf(codes.Unimplemented, "method StartEventSource not implemented")
   216  }
   217  
   218  func RegisterEventingServer(s *grpc.Server, srv EventingServer) {
   219  	s.RegisterService(&_Eventing_serviceDesc, srv)
   220  }
   221  
   222  func _Eventing_StartEventSource_Handler(srv interface{}, stream grpc.ServerStream) error {
   223  	m := new(EventSource)
   224  	if err := stream.RecvMsg(m); err != nil {
   225  		return err
   226  	}
   227  	return srv.(EventingServer).StartEventSource(m, &eventingStartEventSourceServer{stream})
   228  }
   229  
   230  type Eventing_StartEventSourceServer interface {
   231  	Send(*Event) error
   232  	grpc.ServerStream
   233  }
   234  
   235  type eventingStartEventSourceServer struct {
   236  	grpc.ServerStream
   237  }
   238  
   239  func (x *eventingStartEventSourceServer) Send(m *Event) error {
   240  	return x.ServerStream.SendMsg(m)
   241  }
   242  
   243  var _Eventing_serviceDesc = grpc.ServiceDesc{
   244  	ServiceName: "generic.Eventing",
   245  	HandlerType: (*EventingServer)(nil),
   246  	Methods:     []grpc.MethodDesc{},
   247  	Streams: []grpc.StreamDesc{
   248  		{
   249  			StreamName:    "StartEventSource",
   250  			Handler:       _Eventing_StartEventSource_Handler,
   251  			ServerStreams: true,
   252  		},
   253  	},
   254  	Metadata: "generic.proto",
   255  }