// Code generated by protoc-gen-go. // source: greet.proto // DO NOT EDIT! /* Package unary is a generated protocol buffer package. It is generated from these files: greet.proto It has these top-level messages: Request Response */ package unary import ( "fmt" "math" "github.com/golang/protobuf/proto" "golang.org/x/net/context" "google.golang.org/grpc" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type Request struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` } func (m *Request) Reset() { *m = Request{} } func (m *Request) String() string { return proto.CompactTextString(m) } func (*Request) ProtoMessage() {} func (*Request) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } func (m *Request) GetName() string { if m != nil { return m.Name } return "" } type Response struct { Greet string `protobuf:"bytes,1,opt,name=greet" json:"greet,omitempty"` } func (m *Response) Reset() { *m = Response{} } func (m *Response) String() string { return proto.CompactTextString(m) } func (*Response) ProtoMessage() {} func (*Response) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } func (m *Response) GetGreet() string { if m != nil { return m.Greet } return "" } func init() { proto.RegisterType((*Request)(nil), "unary.Request") proto.RegisterType((*Response)(nil), "unary.Response") } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context var _ grpc.ClientConn // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 // Client API for Greeter service type GreeterClient interface { Greet(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) } type greeterClient struct { cc *grpc.ClientConn } func NewGreeterClient(cc *grpc.ClientConn) GreeterClient { return &greeterClient{cc} } func (c *greeterClient) Greet(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) { out := new(Response) err := grpc.Invoke(ctx, "/unary.Greeter/greet", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } // Server API for Greeter service type GreeterServer interface { Greet(context.Context, *Request) (*Response, error) } func RegisterGreeterServer(s *grpc.Server, srv GreeterServer) { s.RegisterService(&_Greeter_serviceDesc, srv) } func _Greeter_Greet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Request) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(GreeterServer).Greet(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/unary.Greeter/Greet", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(GreeterServer).Greet(ctx, req.(*Request)) } return interceptor(ctx, in, info, handler) } var _Greeter_serviceDesc = grpc.ServiceDesc{ ServiceName: "unary.Greeter", HandlerType: (*GreeterServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "greet", Handler: _Greeter_Greet_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "greet.proto", } func init() { proto.RegisterFile("greet.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ // 126 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x4e, 0x2f, 0x4a, 0x4d, 0x2d, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x2d, 0xcd, 0x4b, 0x2c, 0xaa, 0x54, 0x92, 0xe5, 0x62, 0x0f, 0x4a, 0x2d, 0x2c, 0x4d, 0x2d, 0x2e, 0x11, 0x12, 0xe2, 0x62, 0xc9, 0x4b, 0xcc, 0x4d, 0x95, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0x02, 0xb3, 0x95, 0x14, 0xb8, 0x38, 0x82, 0x52, 0x8b, 0x0b, 0xf2, 0xf3, 0x8a, 0x53, 0x85, 0x44, 0xb8, 0x58, 0xc1, 0x06, 0x40, 0x15, 0x40, 0x38, 0x46, 0xc6, 0x5c, 0xec, 0xee, 0x20, 0x46, 0x6a, 0x91, 0x90, 0x06, 0x54, 0x81, 0x10, 0x9f, 0x1e, 0xd8, 0x70, 0x3d, 0xa8, 0xc9, 0x52, 0xfc, 0x70, 0x3e, 0xc4, 0xa8, 0x24, 0x36, 0xb0, 0x1b, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xb8, 0x6d, 0x30, 0xb0, 0x92, 0x00, 0x00, 0x00, }