github.com/btccom/go-micro/v2@v2.9.3/api/service/proto/api.pb.go (about)

     1  // Code generated by protoc-gen-go. DO NOT EDIT.
     2  // source: api/service/proto/api.proto
     3  
     4  package go_micro_api
     5  
     6  import (
     7  	context "context"
     8  	fmt "fmt"
     9  	proto "github.com/golang/protobuf/proto"
    10  	grpc "google.golang.org/grpc"
    11  	codes "google.golang.org/grpc/codes"
    12  	status "google.golang.org/grpc/status"
    13  	math "math"
    14  )
    15  
    16  // Reference imports to suppress errors if they are not otherwise used.
    17  var _ = proto.Marshal
    18  var _ = fmt.Errorf
    19  var _ = math.Inf
    20  
    21  // This is a compile-time assertion to ensure that this generated file
    22  // is compatible with the proto package it is being compiled against.
    23  // A compilation error at this line likely means your copy of the
    24  // proto package needs to be updated.
    25  const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
    26  
    27  type Endpoint struct {
    28  	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
    29  	Host                 []string `protobuf:"bytes,2,rep,name=host,proto3" json:"host,omitempty"`
    30  	Path                 []string `protobuf:"bytes,3,rep,name=path,proto3" json:"path,omitempty"`
    31  	Method               []string `protobuf:"bytes,4,rep,name=method,proto3" json:"method,omitempty"`
    32  	Stream               bool     `protobuf:"varint,5,opt,name=stream,proto3" json:"stream,omitempty"`
    33  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
    34  	XXX_unrecognized     []byte   `json:"-"`
    35  	XXX_sizecache        int32    `json:"-"`
    36  }
    37  
    38  func (m *Endpoint) Reset()         { *m = Endpoint{} }
    39  func (m *Endpoint) String() string { return proto.CompactTextString(m) }
    40  func (*Endpoint) ProtoMessage()    {}
    41  func (*Endpoint) Descriptor() ([]byte, []int) {
    42  	return fileDescriptor_c4a48b6b680b5c31, []int{0}
    43  }
    44  
    45  func (m *Endpoint) XXX_Unmarshal(b []byte) error {
    46  	return xxx_messageInfo_Endpoint.Unmarshal(m, b)
    47  }
    48  func (m *Endpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    49  	return xxx_messageInfo_Endpoint.Marshal(b, m, deterministic)
    50  }
    51  func (m *Endpoint) XXX_Merge(src proto.Message) {
    52  	xxx_messageInfo_Endpoint.Merge(m, src)
    53  }
    54  func (m *Endpoint) XXX_Size() int {
    55  	return xxx_messageInfo_Endpoint.Size(m)
    56  }
    57  func (m *Endpoint) XXX_DiscardUnknown() {
    58  	xxx_messageInfo_Endpoint.DiscardUnknown(m)
    59  }
    60  
    61  var xxx_messageInfo_Endpoint proto.InternalMessageInfo
    62  
    63  func (m *Endpoint) GetName() string {
    64  	if m != nil {
    65  		return m.Name
    66  	}
    67  	return ""
    68  }
    69  
    70  func (m *Endpoint) GetHost() []string {
    71  	if m != nil {
    72  		return m.Host
    73  	}
    74  	return nil
    75  }
    76  
    77  func (m *Endpoint) GetPath() []string {
    78  	if m != nil {
    79  		return m.Path
    80  	}
    81  	return nil
    82  }
    83  
    84  func (m *Endpoint) GetMethod() []string {
    85  	if m != nil {
    86  		return m.Method
    87  	}
    88  	return nil
    89  }
    90  
    91  func (m *Endpoint) GetStream() bool {
    92  	if m != nil {
    93  		return m.Stream
    94  	}
    95  	return false
    96  }
    97  
    98  type EmptyResponse struct {
    99  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   100  	XXX_unrecognized     []byte   `json:"-"`
   101  	XXX_sizecache        int32    `json:"-"`
   102  }
   103  
   104  func (m *EmptyResponse) Reset()         { *m = EmptyResponse{} }
   105  func (m *EmptyResponse) String() string { return proto.CompactTextString(m) }
   106  func (*EmptyResponse) ProtoMessage()    {}
   107  func (*EmptyResponse) Descriptor() ([]byte, []int) {
   108  	return fileDescriptor_c4a48b6b680b5c31, []int{1}
   109  }
   110  
   111  func (m *EmptyResponse) XXX_Unmarshal(b []byte) error {
   112  	return xxx_messageInfo_EmptyResponse.Unmarshal(m, b)
   113  }
   114  func (m *EmptyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   115  	return xxx_messageInfo_EmptyResponse.Marshal(b, m, deterministic)
   116  }
   117  func (m *EmptyResponse) XXX_Merge(src proto.Message) {
   118  	xxx_messageInfo_EmptyResponse.Merge(m, src)
   119  }
   120  func (m *EmptyResponse) XXX_Size() int {
   121  	return xxx_messageInfo_EmptyResponse.Size(m)
   122  }
   123  func (m *EmptyResponse) XXX_DiscardUnknown() {
   124  	xxx_messageInfo_EmptyResponse.DiscardUnknown(m)
   125  }
   126  
   127  var xxx_messageInfo_EmptyResponse proto.InternalMessageInfo
   128  
   129  func init() {
   130  	proto.RegisterType((*Endpoint)(nil), "go.micro.api.Endpoint")
   131  	proto.RegisterType((*EmptyResponse)(nil), "go.micro.api.EmptyResponse")
   132  }
   133  
   134  func init() { proto.RegisterFile("api/service/proto/api.proto", fileDescriptor_c4a48b6b680b5c31) }
   135  
   136  var fileDescriptor_c4a48b6b680b5c31 = []byte{
   137  	// 212 bytes of a gzipped FileDescriptorProto
   138  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0xd0, 0xc1, 0x4a, 0x03, 0x31,
   139  	0x10, 0x80, 0x61, 0xd7, 0xad, 0x65, 0x1d, 0x14, 0x21, 0x87, 0x12, 0xec, 0x65, 0xd9, 0x53, 0x4f,
   140  	0x59, 0xd0, 0x27, 0x28, 0xda, 0x17, 0xd8, 0x37, 0x88, 0xed, 0xd0, 0x9d, 0x43, 0x32, 0x43, 0x32,
   141  	0x14, 0x7c, 0x08, 0xdf, 0x59, 0x12, 0x2b, 0x2c, 0x5e, 0xbd, 0xfd, 0xf3, 0x1d, 0x86, 0x61, 0x60,
   142  	0xeb, 0x85, 0xc6, 0x8c, 0xe9, 0x42, 0x47, 0x1c, 0x25, 0xb1, 0xf2, 0xe8, 0x85, 0x5c, 0x2d, 0xf3,
   143  	0x70, 0x66, 0x17, 0xe8, 0x98, 0xd8, 0x79, 0xa1, 0xe1, 0x02, 0xdd, 0x21, 0x9e, 0x84, 0x29, 0xaa,
   144  	0x31, 0xb0, 0x8a, 0x3e, 0xa0, 0x6d, 0xfa, 0x66, 0x77, 0x3f, 0xd5, 0x2e, 0x36, 0x73, 0x56, 0x7b,
   145  	0xdb, 0xb7, 0xc5, 0x4a, 0x17, 0x13, 0xaf, 0xb3, 0x6d, 0x7f, 0xac, 0xb4, 0xd9, 0xc0, 0x3a, 0xa0,
   146  	0xce, 0x7c, 0xb2, 0xab, 0xaa, 0xd7, 0xa9, 0x78, 0xd6, 0x84, 0x3e, 0xd8, 0xbb, 0xbe, 0xd9, 0x75,
   147  	0xd3, 0x75, 0x1a, 0x9e, 0xe0, 0xf1, 0x10, 0x44, 0x3f, 0x27, 0xcc, 0xc2, 0x31, 0xe3, 0xcb, 0x57,
   148  	0x03, 0xed, 0x5e, 0xc8, 0xec, 0xa1, 0x9b, 0xf0, 0x4c, 0x59, 0x31, 0x99, 0x8d, 0x5b, 0xde, 0xea,
   149  	0x7e, 0x0f, 0x7d, 0xde, 0xfe, 0xf1, 0xe5, 0xa2, 0xe1, 0xc6, 0xbc, 0x01, 0xbc, 0x63, 0xfa, 0xdf,
   150  	0x92, 0x8f, 0x75, 0xfd, 0xd6, 0xeb, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x46, 0x62, 0x67, 0x30,
   151  	0x4c, 0x01, 0x00, 0x00,
   152  }
   153  
   154  // Reference imports to suppress errors if they are not otherwise used.
   155  var _ context.Context
   156  var _ grpc.ClientConn
   157  
   158  // This is a compile-time assertion to ensure that this generated file
   159  // is compatible with the grpc package it is being compiled against.
   160  const _ = grpc.SupportPackageIsVersion4
   161  
   162  // ApiClient is the client API for Api service.
   163  //
   164  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   165  type ApiClient interface {
   166  	Register(ctx context.Context, in *Endpoint, opts ...grpc.CallOption) (*EmptyResponse, error)
   167  	Deregister(ctx context.Context, in *Endpoint, opts ...grpc.CallOption) (*EmptyResponse, error)
   168  }
   169  
   170  type apiClient struct {
   171  	cc *grpc.ClientConn
   172  }
   173  
   174  func NewApiClient(cc *grpc.ClientConn) ApiClient {
   175  	return &apiClient{cc}
   176  }
   177  
   178  func (c *apiClient) Register(ctx context.Context, in *Endpoint, opts ...grpc.CallOption) (*EmptyResponse, error) {
   179  	out := new(EmptyResponse)
   180  	err := c.cc.Invoke(ctx, "/go.micro.api.Api/Register", in, out, opts...)
   181  	if err != nil {
   182  		return nil, err
   183  	}
   184  	return out, nil
   185  }
   186  
   187  func (c *apiClient) Deregister(ctx context.Context, in *Endpoint, opts ...grpc.CallOption) (*EmptyResponse, error) {
   188  	out := new(EmptyResponse)
   189  	err := c.cc.Invoke(ctx, "/go.micro.api.Api/Deregister", in, out, opts...)
   190  	if err != nil {
   191  		return nil, err
   192  	}
   193  	return out, nil
   194  }
   195  
   196  // ApiServer is the server API for Api service.
   197  type ApiServer interface {
   198  	Register(context.Context, *Endpoint) (*EmptyResponse, error)
   199  	Deregister(context.Context, *Endpoint) (*EmptyResponse, error)
   200  }
   201  
   202  // UnimplementedApiServer can be embedded to have forward compatible implementations.
   203  type UnimplementedApiServer struct {
   204  }
   205  
   206  func (*UnimplementedApiServer) Register(ctx context.Context, req *Endpoint) (*EmptyResponse, error) {
   207  	return nil, status.Errorf(codes.Unimplemented, "method Register not implemented")
   208  }
   209  func (*UnimplementedApiServer) Deregister(ctx context.Context, req *Endpoint) (*EmptyResponse, error) {
   210  	return nil, status.Errorf(codes.Unimplemented, "method Deregister not implemented")
   211  }
   212  
   213  func RegisterApiServer(s *grpc.Server, srv ApiServer) {
   214  	s.RegisterService(&_Api_serviceDesc, srv)
   215  }
   216  
   217  func _Api_Register_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   218  	in := new(Endpoint)
   219  	if err := dec(in); err != nil {
   220  		return nil, err
   221  	}
   222  	if interceptor == nil {
   223  		return srv.(ApiServer).Register(ctx, in)
   224  	}
   225  	info := &grpc.UnaryServerInfo{
   226  		Server:     srv,
   227  		FullMethod: "/go.micro.api.Api/Register",
   228  	}
   229  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   230  		return srv.(ApiServer).Register(ctx, req.(*Endpoint))
   231  	}
   232  	return interceptor(ctx, in, info, handler)
   233  }
   234  
   235  func _Api_Deregister_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   236  	in := new(Endpoint)
   237  	if err := dec(in); err != nil {
   238  		return nil, err
   239  	}
   240  	if interceptor == nil {
   241  		return srv.(ApiServer).Deregister(ctx, in)
   242  	}
   243  	info := &grpc.UnaryServerInfo{
   244  		Server:     srv,
   245  		FullMethod: "/go.micro.api.Api/Deregister",
   246  	}
   247  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   248  		return srv.(ApiServer).Deregister(ctx, req.(*Endpoint))
   249  	}
   250  	return interceptor(ctx, in, info, handler)
   251  }
   252  
   253  var _Api_serviceDesc = grpc.ServiceDesc{
   254  	ServiceName: "go.micro.api.Api",
   255  	HandlerType: (*ApiServer)(nil),
   256  	Methods: []grpc.MethodDesc{
   257  		{
   258  			MethodName: "Register",
   259  			Handler:    _Api_Register_Handler,
   260  		},
   261  		{
   262  			MethodName: "Deregister",
   263  			Handler:    _Api_Deregister_Handler,
   264  		},
   265  	},
   266  	Streams:  []grpc.StreamDesc{},
   267  	Metadata: "api/service/proto/api.proto",
   268  }