github.com/MetalBlockchain/metalgo@v1.11.9/proto/pb/aliasreader/aliasreader_grpc.pb.go (about)

     1  // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
     2  // versions:
     3  // - protoc-gen-go-grpc v1.3.0
     4  // - protoc             (unknown)
     5  // source: aliasreader/aliasreader.proto
     6  
     7  package aliasreader
     8  
     9  import (
    10  	context "context"
    11  	grpc "google.golang.org/grpc"
    12  	codes "google.golang.org/grpc/codes"
    13  	status "google.golang.org/grpc/status"
    14  )
    15  
    16  // This is a compile-time assertion to ensure that this generated file
    17  // is compatible with the grpc package it is being compiled against.
    18  // Requires gRPC-Go v1.32.0 or later.
    19  const _ = grpc.SupportPackageIsVersion7
    20  
    21  const (
    22  	AliasReader_Lookup_FullMethodName       = "/aliasreader.AliasReader/Lookup"
    23  	AliasReader_PrimaryAlias_FullMethodName = "/aliasreader.AliasReader/PrimaryAlias"
    24  	AliasReader_Aliases_FullMethodName      = "/aliasreader.AliasReader/Aliases"
    25  )
    26  
    27  // AliasReaderClient is the client API for AliasReader service.
    28  //
    29  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
    30  type AliasReaderClient interface {
    31  	Lookup(ctx context.Context, in *Alias, opts ...grpc.CallOption) (*ID, error)
    32  	PrimaryAlias(ctx context.Context, in *ID, opts ...grpc.CallOption) (*Alias, error)
    33  	Aliases(ctx context.Context, in *ID, opts ...grpc.CallOption) (*AliasList, error)
    34  }
    35  
    36  type aliasReaderClient struct {
    37  	cc grpc.ClientConnInterface
    38  }
    39  
    40  func NewAliasReaderClient(cc grpc.ClientConnInterface) AliasReaderClient {
    41  	return &aliasReaderClient{cc}
    42  }
    43  
    44  func (c *aliasReaderClient) Lookup(ctx context.Context, in *Alias, opts ...grpc.CallOption) (*ID, error) {
    45  	out := new(ID)
    46  	err := c.cc.Invoke(ctx, AliasReader_Lookup_FullMethodName, in, out, opts...)
    47  	if err != nil {
    48  		return nil, err
    49  	}
    50  	return out, nil
    51  }
    52  
    53  func (c *aliasReaderClient) PrimaryAlias(ctx context.Context, in *ID, opts ...grpc.CallOption) (*Alias, error) {
    54  	out := new(Alias)
    55  	err := c.cc.Invoke(ctx, AliasReader_PrimaryAlias_FullMethodName, in, out, opts...)
    56  	if err != nil {
    57  		return nil, err
    58  	}
    59  	return out, nil
    60  }
    61  
    62  func (c *aliasReaderClient) Aliases(ctx context.Context, in *ID, opts ...grpc.CallOption) (*AliasList, error) {
    63  	out := new(AliasList)
    64  	err := c.cc.Invoke(ctx, AliasReader_Aliases_FullMethodName, in, out, opts...)
    65  	if err != nil {
    66  		return nil, err
    67  	}
    68  	return out, nil
    69  }
    70  
    71  // AliasReaderServer is the server API for AliasReader service.
    72  // All implementations must embed UnimplementedAliasReaderServer
    73  // for forward compatibility
    74  type AliasReaderServer interface {
    75  	Lookup(context.Context, *Alias) (*ID, error)
    76  	PrimaryAlias(context.Context, *ID) (*Alias, error)
    77  	Aliases(context.Context, *ID) (*AliasList, error)
    78  	mustEmbedUnimplementedAliasReaderServer()
    79  }
    80  
    81  // UnimplementedAliasReaderServer must be embedded to have forward compatible implementations.
    82  type UnimplementedAliasReaderServer struct {
    83  }
    84  
    85  func (UnimplementedAliasReaderServer) Lookup(context.Context, *Alias) (*ID, error) {
    86  	return nil, status.Errorf(codes.Unimplemented, "method Lookup not implemented")
    87  }
    88  func (UnimplementedAliasReaderServer) PrimaryAlias(context.Context, *ID) (*Alias, error) {
    89  	return nil, status.Errorf(codes.Unimplemented, "method PrimaryAlias not implemented")
    90  }
    91  func (UnimplementedAliasReaderServer) Aliases(context.Context, *ID) (*AliasList, error) {
    92  	return nil, status.Errorf(codes.Unimplemented, "method Aliases not implemented")
    93  }
    94  func (UnimplementedAliasReaderServer) mustEmbedUnimplementedAliasReaderServer() {}
    95  
    96  // UnsafeAliasReaderServer may be embedded to opt out of forward compatibility for this service.
    97  // Use of this interface is not recommended, as added methods to AliasReaderServer will
    98  // result in compilation errors.
    99  type UnsafeAliasReaderServer interface {
   100  	mustEmbedUnimplementedAliasReaderServer()
   101  }
   102  
   103  func RegisterAliasReaderServer(s grpc.ServiceRegistrar, srv AliasReaderServer) {
   104  	s.RegisterService(&AliasReader_ServiceDesc, srv)
   105  }
   106  
   107  func _AliasReader_Lookup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   108  	in := new(Alias)
   109  	if err := dec(in); err != nil {
   110  		return nil, err
   111  	}
   112  	if interceptor == nil {
   113  		return srv.(AliasReaderServer).Lookup(ctx, in)
   114  	}
   115  	info := &grpc.UnaryServerInfo{
   116  		Server:     srv,
   117  		FullMethod: AliasReader_Lookup_FullMethodName,
   118  	}
   119  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   120  		return srv.(AliasReaderServer).Lookup(ctx, req.(*Alias))
   121  	}
   122  	return interceptor(ctx, in, info, handler)
   123  }
   124  
   125  func _AliasReader_PrimaryAlias_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   126  	in := new(ID)
   127  	if err := dec(in); err != nil {
   128  		return nil, err
   129  	}
   130  	if interceptor == nil {
   131  		return srv.(AliasReaderServer).PrimaryAlias(ctx, in)
   132  	}
   133  	info := &grpc.UnaryServerInfo{
   134  		Server:     srv,
   135  		FullMethod: AliasReader_PrimaryAlias_FullMethodName,
   136  	}
   137  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   138  		return srv.(AliasReaderServer).PrimaryAlias(ctx, req.(*ID))
   139  	}
   140  	return interceptor(ctx, in, info, handler)
   141  }
   142  
   143  func _AliasReader_Aliases_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   144  	in := new(ID)
   145  	if err := dec(in); err != nil {
   146  		return nil, err
   147  	}
   148  	if interceptor == nil {
   149  		return srv.(AliasReaderServer).Aliases(ctx, in)
   150  	}
   151  	info := &grpc.UnaryServerInfo{
   152  		Server:     srv,
   153  		FullMethod: AliasReader_Aliases_FullMethodName,
   154  	}
   155  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   156  		return srv.(AliasReaderServer).Aliases(ctx, req.(*ID))
   157  	}
   158  	return interceptor(ctx, in, info, handler)
   159  }
   160  
   161  // AliasReader_ServiceDesc is the grpc.ServiceDesc for AliasReader service.
   162  // It's only intended for direct use with grpc.RegisterService,
   163  // and not to be introspected or modified (even as a copy)
   164  var AliasReader_ServiceDesc = grpc.ServiceDesc{
   165  	ServiceName: "aliasreader.AliasReader",
   166  	HandlerType: (*AliasReaderServer)(nil),
   167  	Methods: []grpc.MethodDesc{
   168  		{
   169  			MethodName: "Lookup",
   170  			Handler:    _AliasReader_Lookup_Handler,
   171  		},
   172  		{
   173  			MethodName: "PrimaryAlias",
   174  			Handler:    _AliasReader_PrimaryAlias_Handler,
   175  		},
   176  		{
   177  			MethodName: "Aliases",
   178  			Handler:    _AliasReader_Aliases_Handler,
   179  		},
   180  	},
   181  	Streams:  []grpc.StreamDesc{},
   182  	Metadata: "aliasreader/aliasreader.proto",
   183  }