mirror of
				https://github.com/go-micro/go-micro.git
				synced 2025-10-30 23:27:41 +02:00 
			
		
		
		
	
		
			
				
	
	
		
			162 lines
		
	
	
		
			5.0 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			162 lines
		
	
	
		
			5.0 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
| // Code generated by protoc-gen-go. DO NOT EDIT.
 | |
| // source: hello.proto
 | |
| 
 | |
| /*
 | |
| Package greeter is a generated protocol buffer package.
 | |
| 
 | |
| It is generated from these files:
 | |
| 	hello.proto
 | |
| 
 | |
| It has these top-level messages:
 | |
| 	Request
 | |
| 	Response
 | |
| */
 | |
| package greeter
 | |
| 
 | |
| import proto "github.com/golang/protobuf/proto"
 | |
| import fmt "fmt"
 | |
| import math "math"
 | |
| import _ "google.golang.org/genproto/googleapis/api/annotations"
 | |
| 
 | |
| import (
 | |
| 	context "golang.org/x/net/context"
 | |
| 	grpc "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 {
 | |
| 	Msg string `protobuf:"bytes,1,opt,name=msg" json:"msg,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) GetMsg() string {
 | |
| 	if m != nil {
 | |
| 		return m.Msg
 | |
| 	}
 | |
| 	return ""
 | |
| }
 | |
| 
 | |
| func init() {
 | |
| 	proto.RegisterType((*Request)(nil), "greeter.Request")
 | |
| 	proto.RegisterType((*Response)(nil), "greeter.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 Say service
 | |
| 
 | |
| type SayClient interface {
 | |
| 	Hello(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
 | |
| }
 | |
| 
 | |
| type sayClient struct {
 | |
| 	cc *grpc.ClientConn
 | |
| }
 | |
| 
 | |
| func NewSayClient(cc *grpc.ClientConn) SayClient {
 | |
| 	return &sayClient{cc}
 | |
| }
 | |
| 
 | |
| func (c *sayClient) Hello(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
 | |
| 	out := new(Response)
 | |
| 	err := grpc.Invoke(ctx, "/greeter.Say/Hello", in, out, c.cc, opts...)
 | |
| 	if err != nil {
 | |
| 		return nil, err
 | |
| 	}
 | |
| 	return out, nil
 | |
| }
 | |
| 
 | |
| // Server API for Say service
 | |
| 
 | |
| type SayServer interface {
 | |
| 	Hello(context.Context, *Request) (*Response, error)
 | |
| }
 | |
| 
 | |
| func RegisterSayServer(s *grpc.Server, srv SayServer) {
 | |
| 	s.RegisterService(&_Say_serviceDesc, srv)
 | |
| }
 | |
| 
 | |
| func _Say_Hello_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.(SayServer).Hello(ctx, in)
 | |
| 	}
 | |
| 	info := &grpc.UnaryServerInfo{
 | |
| 		Server:     srv,
 | |
| 		FullMethod: "/greeter.Say/Hello",
 | |
| 	}
 | |
| 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 | |
| 		return srv.(SayServer).Hello(ctx, req.(*Request))
 | |
| 	}
 | |
| 	return interceptor(ctx, in, info, handler)
 | |
| }
 | |
| 
 | |
| var _Say_serviceDesc = grpc.ServiceDesc{
 | |
| 	ServiceName: "greeter.Say",
 | |
| 	HandlerType: (*SayServer)(nil),
 | |
| 	Methods: []grpc.MethodDesc{
 | |
| 		{
 | |
| 			MethodName: "Hello",
 | |
| 			Handler:    _Say_Hello_Handler,
 | |
| 		},
 | |
| 	},
 | |
| 	Streams:  []grpc.StreamDesc{},
 | |
| 	Metadata: "hello.proto",
 | |
| }
 | |
| 
 | |
| func init() { proto.RegisterFile("hello.proto", fileDescriptor0) }
 | |
| 
 | |
| var fileDescriptor0 = []byte{
 | |
| 	// 176 bytes of a gzipped FileDescriptorProto
 | |
| 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xce, 0x48, 0xcd, 0xc9,
 | |
| 	0xc9, 0xd7, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x4f, 0x2f, 0x4a, 0x4d, 0x2d, 0x49, 0x2d,
 | |
| 	0x92, 0x92, 0x49, 0xcf, 0xcf, 0x4f, 0xcf, 0x49, 0xd5, 0x4f, 0x2c, 0xc8, 0xd4, 0x4f, 0xcc, 0x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