...

Source file src/github.com/grpc-ecosystem/grpc-gateway/examples/internal/helloworld/helloworld.pb.go

Documentation: github.com/grpc-ecosystem/grpc-gateway/examples/internal/helloworld

     1  // Code generated by protoc-gen-go. DO NOT EDIT.
     2  // source: examples/internal/helloworld/helloworld.proto
     3  
     4  package helloworld
     5  
     6  import (
     7  	context "context"
     8  	fmt "fmt"
     9  	proto "github.com/golang/protobuf/proto"
    10  	wrappers "github.com/golang/protobuf/ptypes/wrappers"
    11  	_ "google.golang.org/genproto/googleapis/api/annotations"
    12  	grpc "google.golang.org/grpc"
    13  	codes "google.golang.org/grpc/codes"
    14  	status "google.golang.org/grpc/status"
    15  	math "math"
    16  )
    17  
    18  // Reference imports to suppress errors if they are not otherwise used.
    19  var _ = proto.Marshal
    20  var _ = fmt.Errorf
    21  var _ = math.Inf
    22  
    23  // This is a compile-time assertion to ensure that this generated file
    24  // is compatible with the proto package it is being compiled against.
    25  // A compilation error at this line likely means your copy of the
    26  // proto package needs to be updated.
    27  const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
    28  
    29  type HelloRequest struct {
    30  	Name                 string                `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
    31  	StrVal               *wrappers.StringValue `protobuf:"bytes,2,opt,name=strVal,proto3" json:"strVal,omitempty"`
    32  	FloatVal             *wrappers.FloatValue  `protobuf:"bytes,3,opt,name=floatVal,proto3" json:"floatVal,omitempty"`
    33  	DoubleVal            *wrappers.DoubleValue `protobuf:"bytes,4,opt,name=doubleVal,proto3" json:"doubleVal,omitempty"`
    34  	BoolVal              *wrappers.BoolValue   `protobuf:"bytes,5,opt,name=boolVal,proto3" json:"boolVal,omitempty"`
    35  	BytesVal             *wrappers.BytesValue  `protobuf:"bytes,6,opt,name=bytesVal,proto3" json:"bytesVal,omitempty"`
    36  	Int32Val             *wrappers.Int32Value  `protobuf:"bytes,7,opt,name=int32Val,proto3" json:"int32Val,omitempty"`
    37  	Uint32Val            *wrappers.UInt32Value `protobuf:"bytes,8,opt,name=uint32Val,proto3" json:"uint32Val,omitempty"`
    38  	Int64Val             *wrappers.Int64Value  `protobuf:"bytes,9,opt,name=int64Val,proto3" json:"int64Val,omitempty"`
    39  	Uint64Val            *wrappers.UInt64Value `protobuf:"bytes,10,opt,name=uint64Val,proto3" json:"uint64Val,omitempty"`
    40  	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
    41  	XXX_unrecognized     []byte                `json:"-"`
    42  	XXX_sizecache        int32                 `json:"-"`
    43  }
    44  
    45  func (m *HelloRequest) Reset()         { *m = HelloRequest{} }
    46  func (m *HelloRequest) String() string { return proto.CompactTextString(m) }
    47  func (*HelloRequest) ProtoMessage()    {}
    48  func (*HelloRequest) Descriptor() ([]byte, []int) {
    49  	return fileDescriptor_fd8fde893e1fcf9f, []int{0}
    50  }
    51  
    52  func (m *HelloRequest) XXX_Unmarshal(b []byte) error {
    53  	return xxx_messageInfo_HelloRequest.Unmarshal(m, b)
    54  }
    55  func (m *HelloRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    56  	return xxx_messageInfo_HelloRequest.Marshal(b, m, deterministic)
    57  }
    58  func (m *HelloRequest) XXX_Merge(src proto.Message) {
    59  	xxx_messageInfo_HelloRequest.Merge(m, src)
    60  }
    61  func (m *HelloRequest) XXX_Size() int {
    62  	return xxx_messageInfo_HelloRequest.Size(m)
    63  }
    64  func (m *HelloRequest) XXX_DiscardUnknown() {
    65  	xxx_messageInfo_HelloRequest.DiscardUnknown(m)
    66  }
    67  
    68  var xxx_messageInfo_HelloRequest proto.InternalMessageInfo
    69  
    70  func (m *HelloRequest) GetName() string {
    71  	if m != nil {
    72  		return m.Name
    73  	}
    74  	return ""
    75  }
    76  
    77  func (m *HelloRequest) GetStrVal() *wrappers.StringValue {
    78  	if m != nil {
    79  		return m.StrVal
    80  	}
    81  	return nil
    82  }
    83  
    84  func (m *HelloRequest) GetFloatVal() *wrappers.FloatValue {
    85  	if m != nil {
    86  		return m.FloatVal
    87  	}
    88  	return nil
    89  }
    90  
    91  func (m *HelloRequest) GetDoubleVal() *wrappers.DoubleValue {
    92  	if m != nil {
    93  		return m.DoubleVal
    94  	}
    95  	return nil
    96  }
    97  
    98  func (m *HelloRequest) GetBoolVal() *wrappers.BoolValue {
    99  	if m != nil {
   100  		return m.BoolVal
   101  	}
   102  	return nil
   103  }
   104  
   105  func (m *HelloRequest) GetBytesVal() *wrappers.BytesValue {
   106  	if m != nil {
   107  		return m.BytesVal
   108  	}
   109  	return nil
   110  }
   111  
   112  func (m *HelloRequest) GetInt32Val() *wrappers.Int32Value {
   113  	if m != nil {
   114  		return m.Int32Val
   115  	}
   116  	return nil
   117  }
   118  
   119  func (m *HelloRequest) GetUint32Val() *wrappers.UInt32Value {
   120  	if m != nil {
   121  		return m.Uint32Val
   122  	}
   123  	return nil
   124  }
   125  
   126  func (m *HelloRequest) GetInt64Val() *wrappers.Int64Value {
   127  	if m != nil {
   128  		return m.Int64Val
   129  	}
   130  	return nil
   131  }
   132  
   133  func (m *HelloRequest) GetUint64Val() *wrappers.UInt64Value {
   134  	if m != nil {
   135  		return m.Uint64Val
   136  	}
   137  	return nil
   138  }
   139  
   140  type HelloReply struct {
   141  	Message              string   `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
   142  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   143  	XXX_unrecognized     []byte   `json:"-"`
   144  	XXX_sizecache        int32    `json:"-"`
   145  }
   146  
   147  func (m *HelloReply) Reset()         { *m = HelloReply{} }
   148  func (m *HelloReply) String() string { return proto.CompactTextString(m) }
   149  func (*HelloReply) ProtoMessage()    {}
   150  func (*HelloReply) Descriptor() ([]byte, []int) {
   151  	return fileDescriptor_fd8fde893e1fcf9f, []int{1}
   152  }
   153  
   154  func (m *HelloReply) XXX_Unmarshal(b []byte) error {
   155  	return xxx_messageInfo_HelloReply.Unmarshal(m, b)
   156  }
   157  func (m *HelloReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   158  	return xxx_messageInfo_HelloReply.Marshal(b, m, deterministic)
   159  }
   160  func (m *HelloReply) XXX_Merge(src proto.Message) {
   161  	xxx_messageInfo_HelloReply.Merge(m, src)
   162  }
   163  func (m *HelloReply) XXX_Size() int {
   164  	return xxx_messageInfo_HelloReply.Size(m)
   165  }
   166  func (m *HelloReply) XXX_DiscardUnknown() {
   167  	xxx_messageInfo_HelloReply.DiscardUnknown(m)
   168  }
   169  
   170  var xxx_messageInfo_HelloReply proto.InternalMessageInfo
   171  
   172  func (m *HelloReply) GetMessage() string {
   173  	if m != nil {
   174  		return m.Message
   175  	}
   176  	return ""
   177  }
   178  
   179  func init() {
   180  	proto.RegisterType((*HelloRequest)(nil), "helloworld.HelloRequest")
   181  	proto.RegisterType((*HelloReply)(nil), "helloworld.HelloReply")
   182  }
   183  
   184  func init() {
   185  	proto.RegisterFile("examples/internal/helloworld/helloworld.proto", fileDescriptor_fd8fde893e1fcf9f)
   186  }
   187  
   188  var fileDescriptor_fd8fde893e1fcf9f = []byte{
   189  	// 482 bytes of a gzipped FileDescriptorProto
   190  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0x3d, 0x6f, 0xd4, 0x30,
   191  	0x1c, 0xc6, 0x75, 0xe1, 0xb8, 0x17, 0x97, 0xc9, 0x42, 0xa7, 0x28, 0x9c, 0x50, 0x75, 0x03, 0xea,
   192  	0x42, 0x22, 0x5d, 0x4f, 0x45, 0x62, 0xac, 0x10, 0x2f, 0x6b, 0x2a, 0x3a, 0xdc, 0xe6, 0xa8, 0xff,
   193  	0x1e, 0x91, 0x7c, 0x71, 0xf0, 0x0b, 0x25, 0xaa, 0xb2, 0xb0, 0xb1, 0x21, 0xf1, 0x1d, 0xf8, 0x3a,
   194  	0x0c, 0x8c, 0xac, 0x7c, 0x10, 0xe4, 0x7f, 0xec, 0x73, 0x50, 0x49, 0x37, 0x3b, 0xcf, 0xf3, 0xf3,
   195  	0x63, 0xe7, 0xff, 0x90, 0xe7, 0xf0, 0x99, 0xed, 0x6b, 0x0e, 0x2a, 0x2b, 0x2b, 0x0d, 0xb2, 0x62,
   196  	0x3c, 0xfb, 0x00, 0x9c, 0x8b, 0x1b, 0x21, 0xf9, 0x55, 0x6f, 0x99, 0xd6, 0x52, 0x68, 0x41, 0x49,
   197  	0xf8, 0x92, 0x2c, 0x77, 0x42, 0xec, 0x38, 0x64, 0xac, 0x2e, 0x33, 0x56, 0x55, 0x42, 0x33, 0x5d,
   198  	0x8a, 0x4a, 0x75, 0xce, 0xe4, 0xa9, 0x53, 0x71, 0x57, 0x98, 0xeb, 0xec, 0x46, 0xb2, 0xba, 0x06,
   199  	0xe9, 0xf4, 0xd5, 0x8f, 0x31, 0x79, 0xf4, 0xd6, 0x1e, 0x96, 0xc3, 0x47, 0x03, 0x4a, 0x53, 0x4a,
   200  	0xc6, 0x15, 0xdb, 0x43, 0x3c, 0x3a, 0x1e, 0x9d, 0xcc, 0x73, 0x5c, 0xd3, 0x0d, 0x99, 0x28, 0x2d,
   201  	0x2f, 0x19, 0x8f, 0xa3, 0xe3, 0xd1, 0xc9, 0xd1, 0x7a, 0x99, 0x76, 0xa7, 0xa6, 0xfe, 0xd4, 0xf4,
   202  	0x42, 0xcb, 0xb2, 0xda, 0x5d, 0x32, 0x6e, 0x20, 0x77, 0x5e, 0xfa, 0x82, 0xcc, 0xae, 0xb9, 0x60,
   203  	0xda, 0x72, 0x0f, 0x90, 0x7b, 0x72, 0x87, 0x7b, 0xed, 0x0c, 0x06, 0xf2, 0x83, 0x99, 0xbe, 0x24,
   204  	0xf3, 0x2b, 0x61, 0x0a, 0x0e, 0x96, 0x1c, 0x0f, 0x24, 0xbe, 0xf2, 0x0e, 0x03, 0x79, 0xb0, 0xd3,
   205  	0x0d, 0x99, 0x16, 0x42, 0x70, 0x4b, 0x3e, 0x44, 0x32, 0xb9, 0x43, 0x9e, 0x77, 0xba, 0x81, 0xdc,
   206  	0x5b, 0xed, 0x55, 0x8b, 0x46, 0x83, 0xb2, 0xd8, 0x64, 0xe0, 0xaa, 0xe7, 0xce, 0x60, 0xaf, 0xea,
   207  	0xcd, 0x16, 0x2c, 0x2b, 0x7d, 0xba, 0xb6, 0xe0, 0x74, 0x00, 0x7c, 0xe7, 0x0c, 0x16, 0xf4, 0x66,
   208  	0xfb, 0x46, 0x73, 0x20, 0x67, 0x03, 0x6f, 0x7c, 0xdf, 0x43, 0x83, 0xdd, 0x85, 0x9e, 0x6d, 0x2c,
   209  	0x3a, 0x1f, 0x0e, 0x45, 0x83, 0x0b, 0xc5, 0xb5, 0x0f, 0xed, 0x48, 0x72, 0x4f, 0xa8, 0x47, 0x83,
   210  	0x7d, 0xf5, 0x8c, 0x10, 0xd7, 0x93, 0x9a, 0x37, 0x34, 0x26, 0xd3, 0x3d, 0x28, 0xc5, 0x76, 0xbe,
   211  	0x28, 0x7e, 0xbb, 0xfe, 0x1d, 0x91, 0xe9, 0x1b, 0x09, 0xa0, 0x41, 0xd2, 0x9f, 0x11, 0x99, 0x5d,
   212  	0xb0, 0x06, 0x39, 0x1a, 0xa7, 0xbd, 0x1a, 0xf7, 0x2b, 0x97, 0x2c, 0xfe, 0xa3, 0xd4, 0xbc, 0x59,
   213  	0x7d, 0x8b, 0xbe, 0xfc, 0xfa, 0xf3, 0x3d, 0xfa, 0x1a, 0xd1, 0xa3, 0x4c, 0xb1, 0x26, 0xbb, 0xb5,
   214  	0x65, 0x6c, 0xb7, 0x0b, 0xfa, 0x18, 0xb7, 0x4a, 0xcb, 0x4f, 0x8c, 0x67, 0xb7, 0x5d, 0xdd, 0xda,
   215  	0x6d, 0x42, 0x63, 0xfc, 0x8e, 0x3d, 0x42, 0xc5, 0x37, 0xaa, 0xdd, 0x2e, 0x69, 0x82, 0x5a, 0x57,
   216  	0x14, 0x14, 0x0f, 0x9d, 0x69, 0xb7, 0x31, 0x5d, 0xa0, 0x6a, 0xeb, 0x80, 0x9a, 0xeb, 0x45, 0x38,
   217  	0x13, 0x07, 0xde, 0x49, 0x6e, 0xf4, 0x41, 0xc3, 0xb9, 0xa0, 0xe6, 0x27, 0x14, 0xf2, 0x4c, 0x10,
   218  	0x4d, 0x50, 0x7b, 0xe4, 0xd9, 0xc6, 0x93, 0xf8, 0x9b, 0xff, 0x25, 0x9d, 0x78, 0x18, 0x42, 0x5b,
   219  	0x4c, 0x70, 0x4c, 0xa7, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xca, 0x80, 0x5f, 0x77, 0x30, 0x04,
   220  	0x00, 0x00,
   221  }
   222  
   223  // Reference imports to suppress errors if they are not otherwise used.
   224  var _ context.Context
   225  var _ grpc.ClientConnInterface
   226  
   227  // This is a compile-time assertion to ensure that this generated file
   228  // is compatible with the grpc package it is being compiled against.
   229  const _ = grpc.SupportPackageIsVersion6
   230  
   231  // GreeterClient is the client API for Greeter service.
   232  //
   233  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   234  type GreeterClient interface {
   235  	SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error)
   236  }
   237  
   238  type greeterClient struct {
   239  	cc grpc.ClientConnInterface
   240  }
   241  
   242  func NewGreeterClient(cc grpc.ClientConnInterface) GreeterClient {
   243  	return &greeterClient{cc}
   244  }
   245  
   246  func (c *greeterClient) SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error) {
   247  	out := new(HelloReply)
   248  	err := c.cc.Invoke(ctx, "/helloworld.Greeter/SayHello", in, out, opts...)
   249  	if err != nil {
   250  		return nil, err
   251  	}
   252  	return out, nil
   253  }
   254  
   255  // GreeterServer is the server API for Greeter service.
   256  type GreeterServer interface {
   257  	SayHello(context.Context, *HelloRequest) (*HelloReply, error)
   258  }
   259  
   260  // UnimplementedGreeterServer can be embedded to have forward compatible implementations.
   261  type UnimplementedGreeterServer struct {
   262  }
   263  
   264  func (*UnimplementedGreeterServer) SayHello(ctx context.Context, req *HelloRequest) (*HelloReply, error) {
   265  	return nil, status.Errorf(codes.Unimplemented, "method SayHello not implemented")
   266  }
   267  
   268  func RegisterGreeterServer(s *grpc.Server, srv GreeterServer) {
   269  	s.RegisterService(&_Greeter_serviceDesc, srv)
   270  }
   271  
   272  func _Greeter_SayHello_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   273  	in := new(HelloRequest)
   274  	if err := dec(in); err != nil {
   275  		return nil, err
   276  	}
   277  	if interceptor == nil {
   278  		return srv.(GreeterServer).SayHello(ctx, in)
   279  	}
   280  	info := &grpc.UnaryServerInfo{
   281  		Server:     srv,
   282  		FullMethod: "/helloworld.Greeter/SayHello",
   283  	}
   284  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   285  		return srv.(GreeterServer).SayHello(ctx, req.(*HelloRequest))
   286  	}
   287  	return interceptor(ctx, in, info, handler)
   288  }
   289  
   290  var _Greeter_serviceDesc = grpc.ServiceDesc{
   291  	ServiceName: "helloworld.Greeter",
   292  	HandlerType: (*GreeterServer)(nil),
   293  	Methods: []grpc.MethodDesc{
   294  		{
   295  			MethodName: "SayHello",
   296  			Handler:    _Greeter_SayHello_Handler,
   297  		},
   298  	},
   299  	Streams:  []grpc.StreamDesc{},
   300  	Metadata: "examples/internal/helloworld/helloworld.proto",
   301  }
   302  

View as plain text