github.com/micro/go-micro/examples@v0.0.0-20210105173217-bf4ab679e18b/template/fnc/proto/example/example.pb.go (about)

     1  // Code generated by protoc-gen-go. DO NOT EDIT.
     2  // source: github.com/micro/go-micro/examples/template/fnc/proto/example/example.proto
     3  
     4  /*
     5  Package go_micro_fnc_template is a generated protocol buffer package.
     6  
     7  It is generated from these files:
     8  	github.com/micro/go-micro/examples/template/fnc/proto/example/example.proto
     9  
    10  It has these top-level messages:
    11  	Message
    12  	Request
    13  	Response
    14  */
    15  package go_micro_fnc_template
    16  
    17  import proto "github.com/golang/protobuf/proto"
    18  import fmt "fmt"
    19  import math "math"
    20  
    21  import (
    22  	context "golang.org/x/net/context"
    23  	grpc "google.golang.org/grpc"
    24  )
    25  
    26  // Reference imports to suppress errors if they are not otherwise used.
    27  var _ = proto.Marshal
    28  var _ = fmt.Errorf
    29  var _ = math.Inf
    30  
    31  // This is a compile-time assertion to ensure that this generated file
    32  // is compatible with the proto package it is being compiled against.
    33  // A compilation error at this line likely means your copy of the
    34  // proto package needs to be updated.
    35  const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
    36  
    37  type Message struct {
    38  	Say string `protobuf:"bytes,1,opt,name=say" json:"say,omitempty"`
    39  }
    40  
    41  func (m *Message) Reset()                    { *m = Message{} }
    42  func (m *Message) String() string            { return proto.CompactTextString(m) }
    43  func (*Message) ProtoMessage()               {}
    44  func (*Message) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
    45  
    46  func (m *Message) GetSay() string {
    47  	if m != nil {
    48  		return m.Say
    49  	}
    50  	return ""
    51  }
    52  
    53  type Request struct {
    54  	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
    55  }
    56  
    57  func (m *Request) Reset()                    { *m = Request{} }
    58  func (m *Request) String() string            { return proto.CompactTextString(m) }
    59  func (*Request) ProtoMessage()               {}
    60  func (*Request) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
    61  
    62  func (m *Request) GetName() string {
    63  	if m != nil {
    64  		return m.Name
    65  	}
    66  	return ""
    67  }
    68  
    69  type Response struct {
    70  	Msg string `protobuf:"bytes,1,opt,name=msg" json:"msg,omitempty"`
    71  }
    72  
    73  func (m *Response) Reset()                    { *m = Response{} }
    74  func (m *Response) String() string            { return proto.CompactTextString(m) }
    75  func (*Response) ProtoMessage()               {}
    76  func (*Response) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
    77  
    78  func (m *Response) GetMsg() string {
    79  	if m != nil {
    80  		return m.Msg
    81  	}
    82  	return ""
    83  }
    84  
    85  func init() {
    86  	proto.RegisterType((*Message)(nil), "go.micro.fnc.template.Message")
    87  	proto.RegisterType((*Request)(nil), "go.micro.fnc.template.Request")
    88  	proto.RegisterType((*Response)(nil), "go.micro.fnc.template.Response")
    89  }
    90  
    91  // Reference imports to suppress errors if they are not otherwise used.
    92  var _ context.Context
    93  var _ grpc.ClientConn
    94  
    95  // This is a compile-time assertion to ensure that this generated file
    96  // is compatible with the grpc package it is being compiled against.
    97  const _ = grpc.SupportPackageIsVersion4
    98  
    99  // Client API for Example service
   100  
   101  type ExampleClient interface {
   102  	Call(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
   103  }
   104  
   105  type exampleClient struct {
   106  	cc *grpc.ClientConn
   107  }
   108  
   109  func NewExampleClient(cc *grpc.ClientConn) ExampleClient {
   110  	return &exampleClient{cc}
   111  }
   112  
   113  func (c *exampleClient) Call(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
   114  	out := new(Response)
   115  	err := grpc.Invoke(ctx, "/go.micro.fnc.template.Example/Call", in, out, c.cc, opts...)
   116  	if err != nil {
   117  		return nil, err
   118  	}
   119  	return out, nil
   120  }
   121  
   122  // Server API for Example service
   123  
   124  type ExampleServer interface {
   125  	Call(context.Context, *Request) (*Response, error)
   126  }
   127  
   128  func RegisterExampleServer(s *grpc.Server, srv ExampleServer) {
   129  	s.RegisterService(&_Example_serviceDesc, srv)
   130  }
   131  
   132  func _Example_Call_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   133  	in := new(Request)
   134  	if err := dec(in); err != nil {
   135  		return nil, err
   136  	}
   137  	if interceptor == nil {
   138  		return srv.(ExampleServer).Call(ctx, in)
   139  	}
   140  	info := &grpc.UnaryServerInfo{
   141  		Server:     srv,
   142  		FullMethod: "/go.micro.fnc.template.Example/Call",
   143  	}
   144  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   145  		return srv.(ExampleServer).Call(ctx, req.(*Request))
   146  	}
   147  	return interceptor(ctx, in, info, handler)
   148  }
   149  
   150  var _Example_serviceDesc = grpc.ServiceDesc{
   151  	ServiceName: "go.micro.fnc.template.Example",
   152  	HandlerType: (*ExampleServer)(nil),
   153  	Methods: []grpc.MethodDesc{
   154  		{
   155  			MethodName: "Call",
   156  			Handler:    _Example_Call_Handler,
   157  		},
   158  	},
   159  	Streams:  []grpc.StreamDesc{},
   160  	Metadata: "github.com/micro/go-micro/examples/template/fnc/proto/example/example.proto",
   161  }
   162  
   163  func init() {
   164  	proto.RegisterFile("github.com/micro/go-micro/examples/template/fnc/proto/example/example.proto", fileDescriptor0)
   165  }
   166  
   167  var fileDescriptor0 = []byte{
   168  	// 197 bytes of a gzipped FileDescriptorProto
   169  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x8f, 0xbd, 0x6a, 0xc3, 0x30,
   170  	0x14, 0x85, 0x6b, 0x6a, 0xea, 0xf6, 0x4e, 0x45, 0x50, 0x28, 0xfd, 0x47, 0x53, 0x27, 0x09, 0xda,
   171  	0x37, 0x48, 0xc8, 0x90, 0x21, 0x8b, 0xc9, 0x0b, 0xc8, 0xe2, 0x5a, 0x31, 0xe8, 0x2f, 0xbe, 0x32,
   172  	0x24, 0x6f, 0x1f, 0x22, 0xdb, 0x99, 0x92, 0x49, 0x07, 0x7d, 0x7c, 0x9c, 0x73, 0x61, 0x61, 0xba,
   173  	0xb4, 0x1b, 0x1a, 0xa1, 0x83, 0x93, 0xae, 0xd3, 0x7d, 0x90, 0x78, 0x50, 0x2e, 0x5a, 0x24, 0x99,
   174  	0xd0, 0x45, 0xab, 0x12, 0xca, 0xd6, 0x6b, 0x19, 0xfb, 0x90, 0x2e, 0x6c, 0x7e, 0x45, 0xfe, 0x65,
   175  	0x2f, 0x26, 0x88, 0xec, 0x8a, 0xd6, 0x6b, 0x31, 0x6b, 0xfc, 0x1d, 0xaa, 0x0d, 0x12, 0x29, 0x83,
   176  	0xec, 0x19, 0xee, 0x49, 0x1d, 0x5f, 0x8b, 0x9f, 0xe2, 0xf7, 0xa9, 0x3e, 0x47, 0xfe, 0x09, 0x55,
   177  	0x8d, 0xfb, 0x01, 0x29, 0x31, 0x06, 0xa5, 0x57, 0x0e, 0x27, 0x9a, 0x33, 0xff, 0x80, 0xc7, 0x1a,
   178  	0x29, 0x06, 0x4f, 0x59, 0x76, 0x64, 0x66, 0xd9, 0x91, 0xf9, 0xdb, 0x42, 0xb5, 0x1a, 0x17, 0xb0,
   179  	0x35, 0x94, 0x4b, 0x65, 0x2d, 0xfb, 0x12, 0x57, 0x47, 0x88, 0xa9, 0xe4, 0xed, 0xfb, 0x26, 0x1f,
   180  	0x5b, 0xf8, 0x5d, 0xf3, 0x90, 0xaf, 0xf9, 0x3f, 0x05, 0x00, 0x00, 0xff, 0xff, 0xd3, 0xd0, 0x2b,
   181  	0x1a, 0x13, 0x01, 0x00, 0x00,
   182  }