code.vegaprotocol.io/vega@v0.79.0/protos/blockexplorer/api/v1/blockexplorer_grpc.pb.go (about) 1 // Code generated by protoc-gen-go-grpc. DO NOT EDIT. 2 // versions: 3 // - protoc-gen-go-grpc v1.2.0 4 // - protoc (unknown) 5 // source: blockexplorer/api/v1/blockexplorer.proto 6 7 package v1 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 // BlockExplorerServiceClient is the client API for BlockExplorerService service. 22 // 23 // 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. 24 type BlockExplorerServiceClient interface { 25 // Get transaction 26 // 27 // Get a transaction from the Vega blockchain 28 GetTransaction(ctx context.Context, in *GetTransactionRequest, opts ...grpc.CallOption) (*GetTransactionResponse, error) 29 // List transactions 30 // 31 // List transactions from the Vega blockchain from the newest to the oldest transactions. 32 ListTransactions(ctx context.Context, in *ListTransactionsRequest, opts ...grpc.CallOption) (*ListTransactionsResponse, error) 33 // Info 34 // 35 // Get information about the block explorer. 36 // Response contains a semver formatted version of the data node and the commit hash, from which the block explorer was built 37 Info(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error) 38 } 39 40 type blockExplorerServiceClient struct { 41 cc grpc.ClientConnInterface 42 } 43 44 func NewBlockExplorerServiceClient(cc grpc.ClientConnInterface) BlockExplorerServiceClient { 45 return &blockExplorerServiceClient{cc} 46 } 47 48 func (c *blockExplorerServiceClient) GetTransaction(ctx context.Context, in *GetTransactionRequest, opts ...grpc.CallOption) (*GetTransactionResponse, error) { 49 out := new(GetTransactionResponse) 50 err := c.cc.Invoke(ctx, "/blockexplorer.api.v1.BlockExplorerService/GetTransaction", in, out, opts...) 51 if err != nil { 52 return nil, err 53 } 54 return out, nil 55 } 56 57 func (c *blockExplorerServiceClient) ListTransactions(ctx context.Context, in *ListTransactionsRequest, opts ...grpc.CallOption) (*ListTransactionsResponse, error) { 58 out := new(ListTransactionsResponse) 59 err := c.cc.Invoke(ctx, "/blockexplorer.api.v1.BlockExplorerService/ListTransactions", in, out, opts...) 60 if err != nil { 61 return nil, err 62 } 63 return out, nil 64 } 65 66 func (c *blockExplorerServiceClient) Info(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error) { 67 out := new(InfoResponse) 68 err := c.cc.Invoke(ctx, "/blockexplorer.api.v1.BlockExplorerService/Info", in, out, opts...) 69 if err != nil { 70 return nil, err 71 } 72 return out, nil 73 } 74 75 // BlockExplorerServiceServer is the server API for BlockExplorerService service. 76 // All implementations must embed UnimplementedBlockExplorerServiceServer 77 // for forward compatibility 78 type BlockExplorerServiceServer interface { 79 // Get transaction 80 // 81 // Get a transaction from the Vega blockchain 82 GetTransaction(context.Context, *GetTransactionRequest) (*GetTransactionResponse, error) 83 // List transactions 84 // 85 // List transactions from the Vega blockchain from the newest to the oldest transactions. 86 ListTransactions(context.Context, *ListTransactionsRequest) (*ListTransactionsResponse, error) 87 // Info 88 // 89 // Get information about the block explorer. 90 // Response contains a semver formatted version of the data node and the commit hash, from which the block explorer was built 91 Info(context.Context, *InfoRequest) (*InfoResponse, error) 92 mustEmbedUnimplementedBlockExplorerServiceServer() 93 } 94 95 // UnimplementedBlockExplorerServiceServer must be embedded to have forward compatible implementations. 96 type UnimplementedBlockExplorerServiceServer struct { 97 } 98 99 func (UnimplementedBlockExplorerServiceServer) GetTransaction(context.Context, *GetTransactionRequest) (*GetTransactionResponse, error) { 100 return nil, status.Errorf(codes.Unimplemented, "method GetTransaction not implemented") 101 } 102 func (UnimplementedBlockExplorerServiceServer) ListTransactions(context.Context, *ListTransactionsRequest) (*ListTransactionsResponse, error) { 103 return nil, status.Errorf(codes.Unimplemented, "method ListTransactions not implemented") 104 } 105 func (UnimplementedBlockExplorerServiceServer) Info(context.Context, *InfoRequest) (*InfoResponse, error) { 106 return nil, status.Errorf(codes.Unimplemented, "method Info not implemented") 107 } 108 func (UnimplementedBlockExplorerServiceServer) mustEmbedUnimplementedBlockExplorerServiceServer() {} 109 110 // UnsafeBlockExplorerServiceServer may be embedded to opt out of forward compatibility for this service. 111 // Use of this interface is not recommended, as added methods to BlockExplorerServiceServer will 112 // result in compilation errors. 113 type UnsafeBlockExplorerServiceServer interface { 114 mustEmbedUnimplementedBlockExplorerServiceServer() 115 } 116 117 func RegisterBlockExplorerServiceServer(s grpc.ServiceRegistrar, srv BlockExplorerServiceServer) { 118 s.RegisterService(&BlockExplorerService_ServiceDesc, srv) 119 } 120 121 func _BlockExplorerService_GetTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 122 in := new(GetTransactionRequest) 123 if err := dec(in); err != nil { 124 return nil, err 125 } 126 if interceptor == nil { 127 return srv.(BlockExplorerServiceServer).GetTransaction(ctx, in) 128 } 129 info := &grpc.UnaryServerInfo{ 130 Server: srv, 131 FullMethod: "/blockexplorer.api.v1.BlockExplorerService/GetTransaction", 132 } 133 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 134 return srv.(BlockExplorerServiceServer).GetTransaction(ctx, req.(*GetTransactionRequest)) 135 } 136 return interceptor(ctx, in, info, handler) 137 } 138 139 func _BlockExplorerService_ListTransactions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 140 in := new(ListTransactionsRequest) 141 if err := dec(in); err != nil { 142 return nil, err 143 } 144 if interceptor == nil { 145 return srv.(BlockExplorerServiceServer).ListTransactions(ctx, in) 146 } 147 info := &grpc.UnaryServerInfo{ 148 Server: srv, 149 FullMethod: "/blockexplorer.api.v1.BlockExplorerService/ListTransactions", 150 } 151 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 152 return srv.(BlockExplorerServiceServer).ListTransactions(ctx, req.(*ListTransactionsRequest)) 153 } 154 return interceptor(ctx, in, info, handler) 155 } 156 157 func _BlockExplorerService_Info_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 158 in := new(InfoRequest) 159 if err := dec(in); err != nil { 160 return nil, err 161 } 162 if interceptor == nil { 163 return srv.(BlockExplorerServiceServer).Info(ctx, in) 164 } 165 info := &grpc.UnaryServerInfo{ 166 Server: srv, 167 FullMethod: "/blockexplorer.api.v1.BlockExplorerService/Info", 168 } 169 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 170 return srv.(BlockExplorerServiceServer).Info(ctx, req.(*InfoRequest)) 171 } 172 return interceptor(ctx, in, info, handler) 173 } 174 175 // BlockExplorerService_ServiceDesc is the grpc.ServiceDesc for BlockExplorerService service. 176 // It's only intended for direct use with grpc.RegisterService, 177 // and not to be introspected or modified (even as a copy) 178 var BlockExplorerService_ServiceDesc = grpc.ServiceDesc{ 179 ServiceName: "blockexplorer.api.v1.BlockExplorerService", 180 HandlerType: (*BlockExplorerServiceServer)(nil), 181 Methods: []grpc.MethodDesc{ 182 { 183 MethodName: "GetTransaction", 184 Handler: _BlockExplorerService_GetTransaction_Handler, 185 }, 186 { 187 MethodName: "ListTransactions", 188 Handler: _BlockExplorerService_ListTransactions_Handler, 189 }, 190 { 191 MethodName: "Info", 192 Handler: _BlockExplorerService_Info_Handler, 193 }, 194 }, 195 Streams: []grpc.StreamDesc{}, 196 Metadata: "blockexplorer/api/v1/blockexplorer.proto", 197 }