github.com/weaveworks/common@v0.0.0-20230728070032-dd9e68f319d5/server/fake_server.pb.go (about)

     1  // Code generated by protoc-gen-go. DO NOT EDIT.
     2  // source: server/fake_server.proto
     3  
     4  package server
     5  
     6  import (
     7  	context "context"
     8  	fmt "fmt"
     9  	proto "github.com/golang/protobuf/proto"
    10  	empty "github.com/golang/protobuf/ptypes/empty"
    11  	grpc "google.golang.org/grpc"
    12  	codes "google.golang.org/grpc/codes"
    13  	status "google.golang.org/grpc/status"
    14  	math "math"
    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 FailWithHTTPErrorRequest struct {
    29  	Code                 int32    `protobuf:"varint,1,opt,name=Code,proto3" json:"Code,omitempty"`
    30  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
    31  	XXX_unrecognized     []byte   `json:"-"`
    32  	XXX_sizecache        int32    `json:"-"`
    33  }
    34  
    35  func (m *FailWithHTTPErrorRequest) Reset()         { *m = FailWithHTTPErrorRequest{} }
    36  func (m *FailWithHTTPErrorRequest) String() string { return proto.CompactTextString(m) }
    37  func (*FailWithHTTPErrorRequest) ProtoMessage()    {}
    38  func (*FailWithHTTPErrorRequest) Descriptor() ([]byte, []int) {
    39  	return fileDescriptor_2267b95bf2c64cdc, []int{0}
    40  }
    41  
    42  func (m *FailWithHTTPErrorRequest) XXX_Unmarshal(b []byte) error {
    43  	return xxx_messageInfo_FailWithHTTPErrorRequest.Unmarshal(m, b)
    44  }
    45  func (m *FailWithHTTPErrorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    46  	return xxx_messageInfo_FailWithHTTPErrorRequest.Marshal(b, m, deterministic)
    47  }
    48  func (m *FailWithHTTPErrorRequest) XXX_Merge(src proto.Message) {
    49  	xxx_messageInfo_FailWithHTTPErrorRequest.Merge(m, src)
    50  }
    51  func (m *FailWithHTTPErrorRequest) XXX_Size() int {
    52  	return xxx_messageInfo_FailWithHTTPErrorRequest.Size(m)
    53  }
    54  func (m *FailWithHTTPErrorRequest) XXX_DiscardUnknown() {
    55  	xxx_messageInfo_FailWithHTTPErrorRequest.DiscardUnknown(m)
    56  }
    57  
    58  var xxx_messageInfo_FailWithHTTPErrorRequest proto.InternalMessageInfo
    59  
    60  func (m *FailWithHTTPErrorRequest) GetCode() int32 {
    61  	if m != nil {
    62  		return m.Code
    63  	}
    64  	return 0
    65  }
    66  
    67  func init() {
    68  	proto.RegisterType((*FailWithHTTPErrorRequest)(nil), "server.FailWithHTTPErrorRequest")
    69  }
    70  
    71  func init() { proto.RegisterFile("server/fake_server.proto", fileDescriptor_2267b95bf2c64cdc) }
    72  
    73  var fileDescriptor_2267b95bf2c64cdc = []byte{
    74  	// 246 bytes of a gzipped FileDescriptorProto
    75  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x28, 0x4e, 0x2d, 0x2a,
    76  	0x4b, 0x2d, 0xd2, 0x4f, 0x4b, 0xcc, 0x4e, 0x8d, 0x87, 0xb0, 0xf5, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2,
    77  	0x85, 0xd8, 0x20, 0x3c, 0x29, 0xe9, 0xf4, 0xfc, 0xfc, 0xf4, 0x9c, 0x54, 0x7d, 0xb0, 0x68, 0x52,
    78  	0x69, 0x9a, 0x7e, 0x6a, 0x6e, 0x41, 0x49, 0x25, 0x44, 0x91, 0x92, 0x1e, 0x97, 0x84, 0x5b, 0x62,
    79  	0x66, 0x4e, 0x78, 0x66, 0x49, 0x86, 0x47, 0x48, 0x48, 0x80, 0x6b, 0x51, 0x51, 0x7e, 0x51, 0x50,
    80  	0x6a, 0x61, 0x69, 0x6a, 0x71, 0x89, 0x90, 0x10, 0x17, 0x8b, 0x73, 0x7e, 0x4a, 0xaa, 0x04, 0xa3,
    81  	0x02, 0xa3, 0x06, 0x6b, 0x10, 0x98, 0x6d, 0x74, 0x9b, 0x89, 0x8b, 0xcb, 0x2d, 0x31, 0x3b, 0x35,
    82  	0x18, 0x6c, 0xb6, 0x90, 0x35, 0x17, 0x7b, 0x70, 0x69, 0x72, 0x72, 0x6a, 0x6a, 0x8a, 0x90, 0x98,
    83  	0x1e, 0xc4, 0x1e, 0x3d, 0x98, 0x3d, 0x7a, 0xae, 0x20, 0x7b, 0xa4, 0x70, 0x88, 0x2b, 0x31, 0x08,
    84  	0x39, 0x72, 0xf1, 0xc2, 0xec, 0x06, 0xdb, 0x4b, 0x86, 0x11, 0xfe, 0x5c, 0x82, 0x18, 0xce, 0x17,
    85  	0x52, 0xd0, 0x83, 0x86, 0x03, 0x2e, 0x9f, 0xe1, 0x31, 0xd0, 0x92, 0x8b, 0x35, 0x38, 0x27, 0x35,
    86  	0xb5, 0x80, 0x2c, 0xef, 0x70, 0x07, 0x97, 0x14, 0xa5, 0x26, 0xe6, 0x92, 0x69, 0x80, 0x01, 0xa3,
    87  	0x93, 0x6a, 0x94, 0x72, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x79,
    88  	0x6a, 0x62, 0x59, 0x6a, 0x79, 0x7e, 0x51, 0x76, 0xb1, 0x7e, 0x72, 0x7e, 0x6e, 0x6e, 0x7e, 0x9e,
    89  	0x3e, 0xc4, 0x5f, 0x49, 0x6c, 0x60, 0xad, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf9, 0xcd,
    90  	0xa4, 0xf9, 0xfc, 0x01, 0x00, 0x00,
    91  }
    92  
    93  // Reference imports to suppress errors if they are not otherwise used.
    94  var _ context.Context
    95  var _ grpc.ClientConn
    96  
    97  // This is a compile-time assertion to ensure that this generated file
    98  // is compatible with the grpc package it is being compiled against.
    99  const _ = grpc.SupportPackageIsVersion4
   100  
   101  // FakeServerClient is the client API for FakeServer service.
   102  //
   103  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   104  type FakeServerClient interface {
   105  	Succeed(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
   106  	FailWithError(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
   107  	FailWithHTTPError(ctx context.Context, in *FailWithHTTPErrorRequest, opts ...grpc.CallOption) (*empty.Empty, error)
   108  	Sleep(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
   109  	StreamSleep(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (FakeServer_StreamSleepClient, error)
   110  }
   111  
   112  type fakeServerClient struct {
   113  	cc *grpc.ClientConn
   114  }
   115  
   116  func NewFakeServerClient(cc *grpc.ClientConn) FakeServerClient {
   117  	return &fakeServerClient{cc}
   118  }
   119  
   120  func (c *fakeServerClient) Succeed(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) {
   121  	out := new(empty.Empty)
   122  	err := c.cc.Invoke(ctx, "/server.FakeServer/Succeed", in, out, opts...)
   123  	if err != nil {
   124  		return nil, err
   125  	}
   126  	return out, nil
   127  }
   128  
   129  func (c *fakeServerClient) FailWithError(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) {
   130  	out := new(empty.Empty)
   131  	err := c.cc.Invoke(ctx, "/server.FakeServer/FailWithError", in, out, opts...)
   132  	if err != nil {
   133  		return nil, err
   134  	}
   135  	return out, nil
   136  }
   137  
   138  func (c *fakeServerClient) FailWithHTTPError(ctx context.Context, in *FailWithHTTPErrorRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
   139  	out := new(empty.Empty)
   140  	err := c.cc.Invoke(ctx, "/server.FakeServer/FailWithHTTPError", in, out, opts...)
   141  	if err != nil {
   142  		return nil, err
   143  	}
   144  	return out, nil
   145  }
   146  
   147  func (c *fakeServerClient) Sleep(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) {
   148  	out := new(empty.Empty)
   149  	err := c.cc.Invoke(ctx, "/server.FakeServer/Sleep", in, out, opts...)
   150  	if err != nil {
   151  		return nil, err
   152  	}
   153  	return out, nil
   154  }
   155  
   156  func (c *fakeServerClient) StreamSleep(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (FakeServer_StreamSleepClient, error) {
   157  	stream, err := c.cc.NewStream(ctx, &_FakeServer_serviceDesc.Streams[0], "/server.FakeServer/StreamSleep", opts...)
   158  	if err != nil {
   159  		return nil, err
   160  	}
   161  	x := &fakeServerStreamSleepClient{stream}
   162  	if err := x.ClientStream.SendMsg(in); err != nil {
   163  		return nil, err
   164  	}
   165  	if err := x.ClientStream.CloseSend(); err != nil {
   166  		return nil, err
   167  	}
   168  	return x, nil
   169  }
   170  
   171  type FakeServer_StreamSleepClient interface {
   172  	Recv() (*empty.Empty, error)
   173  	grpc.ClientStream
   174  }
   175  
   176  type fakeServerStreamSleepClient struct {
   177  	grpc.ClientStream
   178  }
   179  
   180  func (x *fakeServerStreamSleepClient) Recv() (*empty.Empty, error) {
   181  	m := new(empty.Empty)
   182  	if err := x.ClientStream.RecvMsg(m); err != nil {
   183  		return nil, err
   184  	}
   185  	return m, nil
   186  }
   187  
   188  // FakeServerServer is the server API for FakeServer service.
   189  type FakeServerServer interface {
   190  	Succeed(context.Context, *empty.Empty) (*empty.Empty, error)
   191  	FailWithError(context.Context, *empty.Empty) (*empty.Empty, error)
   192  	FailWithHTTPError(context.Context, *FailWithHTTPErrorRequest) (*empty.Empty, error)
   193  	Sleep(context.Context, *empty.Empty) (*empty.Empty, error)
   194  	StreamSleep(*empty.Empty, FakeServer_StreamSleepServer) error
   195  }
   196  
   197  // UnimplementedFakeServerServer can be embedded to have forward compatible implementations.
   198  type UnimplementedFakeServerServer struct {
   199  }
   200  
   201  func (*UnimplementedFakeServerServer) Succeed(ctx context.Context, req *empty.Empty) (*empty.Empty, error) {
   202  	return nil, status.Errorf(codes.Unimplemented, "method Succeed not implemented")
   203  }
   204  func (*UnimplementedFakeServerServer) FailWithError(ctx context.Context, req *empty.Empty) (*empty.Empty, error) {
   205  	return nil, status.Errorf(codes.Unimplemented, "method FailWithError not implemented")
   206  }
   207  func (*UnimplementedFakeServerServer) FailWithHTTPError(ctx context.Context, req *FailWithHTTPErrorRequest) (*empty.Empty, error) {
   208  	return nil, status.Errorf(codes.Unimplemented, "method FailWithHTTPError not implemented")
   209  }
   210  func (*UnimplementedFakeServerServer) Sleep(ctx context.Context, req *empty.Empty) (*empty.Empty, error) {
   211  	return nil, status.Errorf(codes.Unimplemented, "method Sleep not implemented")
   212  }
   213  func (*UnimplementedFakeServerServer) StreamSleep(req *empty.Empty, srv FakeServer_StreamSleepServer) error {
   214  	return status.Errorf(codes.Unimplemented, "method StreamSleep not implemented")
   215  }
   216  
   217  func RegisterFakeServerServer(s *grpc.Server, srv FakeServerServer) {
   218  	s.RegisterService(&_FakeServer_serviceDesc, srv)
   219  }
   220  
   221  func _FakeServer_Succeed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   222  	in := new(empty.Empty)
   223  	if err := dec(in); err != nil {
   224  		return nil, err
   225  	}
   226  	if interceptor == nil {
   227  		return srv.(FakeServerServer).Succeed(ctx, in)
   228  	}
   229  	info := &grpc.UnaryServerInfo{
   230  		Server:     srv,
   231  		FullMethod: "/server.FakeServer/Succeed",
   232  	}
   233  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   234  		return srv.(FakeServerServer).Succeed(ctx, req.(*empty.Empty))
   235  	}
   236  	return interceptor(ctx, in, info, handler)
   237  }
   238  
   239  func _FakeServer_FailWithError_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   240  	in := new(empty.Empty)
   241  	if err := dec(in); err != nil {
   242  		return nil, err
   243  	}
   244  	if interceptor == nil {
   245  		return srv.(FakeServerServer).FailWithError(ctx, in)
   246  	}
   247  	info := &grpc.UnaryServerInfo{
   248  		Server:     srv,
   249  		FullMethod: "/server.FakeServer/FailWithError",
   250  	}
   251  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   252  		return srv.(FakeServerServer).FailWithError(ctx, req.(*empty.Empty))
   253  	}
   254  	return interceptor(ctx, in, info, handler)
   255  }
   256  
   257  func _FakeServer_FailWithHTTPError_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   258  	in := new(FailWithHTTPErrorRequest)
   259  	if err := dec(in); err != nil {
   260  		return nil, err
   261  	}
   262  	if interceptor == nil {
   263  		return srv.(FakeServerServer).FailWithHTTPError(ctx, in)
   264  	}
   265  	info := &grpc.UnaryServerInfo{
   266  		Server:     srv,
   267  		FullMethod: "/server.FakeServer/FailWithHTTPError",
   268  	}
   269  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   270  		return srv.(FakeServerServer).FailWithHTTPError(ctx, req.(*FailWithHTTPErrorRequest))
   271  	}
   272  	return interceptor(ctx, in, info, handler)
   273  }
   274  
   275  func _FakeServer_Sleep_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   276  	in := new(empty.Empty)
   277  	if err := dec(in); err != nil {
   278  		return nil, err
   279  	}
   280  	if interceptor == nil {
   281  		return srv.(FakeServerServer).Sleep(ctx, in)
   282  	}
   283  	info := &grpc.UnaryServerInfo{
   284  		Server:     srv,
   285  		FullMethod: "/server.FakeServer/Sleep",
   286  	}
   287  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   288  		return srv.(FakeServerServer).Sleep(ctx, req.(*empty.Empty))
   289  	}
   290  	return interceptor(ctx, in, info, handler)
   291  }
   292  
   293  func _FakeServer_StreamSleep_Handler(srv interface{}, stream grpc.ServerStream) error {
   294  	m := new(empty.Empty)
   295  	if err := stream.RecvMsg(m); err != nil {
   296  		return err
   297  	}
   298  	return srv.(FakeServerServer).StreamSleep(m, &fakeServerStreamSleepServer{stream})
   299  }
   300  
   301  type FakeServer_StreamSleepServer interface {
   302  	Send(*empty.Empty) error
   303  	grpc.ServerStream
   304  }
   305  
   306  type fakeServerStreamSleepServer struct {
   307  	grpc.ServerStream
   308  }
   309  
   310  func (x *fakeServerStreamSleepServer) Send(m *empty.Empty) error {
   311  	return x.ServerStream.SendMsg(m)
   312  }
   313  
   314  var _FakeServer_serviceDesc = grpc.ServiceDesc{
   315  	ServiceName: "server.FakeServer",
   316  	HandlerType: (*FakeServerServer)(nil),
   317  	Methods: []grpc.MethodDesc{
   318  		{
   319  			MethodName: "Succeed",
   320  			Handler:    _FakeServer_Succeed_Handler,
   321  		},
   322  		{
   323  			MethodName: "FailWithError",
   324  			Handler:    _FakeServer_FailWithError_Handler,
   325  		},
   326  		{
   327  			MethodName: "FailWithHTTPError",
   328  			Handler:    _FakeServer_FailWithHTTPError_Handler,
   329  		},
   330  		{
   331  			MethodName: "Sleep",
   332  			Handler:    _FakeServer_Sleep_Handler,
   333  		},
   334  	},
   335  	Streams: []grpc.StreamDesc{
   336  		{
   337  			StreamName:    "StreamSleep",
   338  			Handler:       _FakeServer_StreamSleep_Handler,
   339  			ServerStreams: true,
   340  		},
   341  	},
   342  	Metadata: "server/fake_server.proto",
   343  }