github.com/InjectiveLabs/sdk-go@v1.53.0/exchange/insurance_rpc/pb/goadesign_goagen_injective_insurance_rpc_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 v3.19.4 5 // source: goadesign_goagen_injective_insurance_rpc.proto 6 7 package injective_insurance_rpcpb 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 // InjectiveInsuranceRPCClient is the client API for InjectiveInsuranceRPC 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 InjectiveInsuranceRPCClient interface { 25 // Funds lists all insurance funds. 26 Funds(ctx context.Context, in *FundsRequest, opts ...grpc.CallOption) (*FundsResponse, error) 27 // Funds returns an insurance fund for a given insurance fund token denom. 28 Fund(ctx context.Context, in *FundRequest, opts ...grpc.CallOption) (*FundResponse, error) 29 // PendingRedemptions lists all pending redemptions according to a filter 30 Redemptions(ctx context.Context, in *RedemptionsRequest, opts ...grpc.CallOption) (*RedemptionsResponse, error) 31 } 32 33 type injectiveInsuranceRPCClient struct { 34 cc grpc.ClientConnInterface 35 } 36 37 func NewInjectiveInsuranceRPCClient(cc grpc.ClientConnInterface) InjectiveInsuranceRPCClient { 38 return &injectiveInsuranceRPCClient{cc} 39 } 40 41 func (c *injectiveInsuranceRPCClient) Funds(ctx context.Context, in *FundsRequest, opts ...grpc.CallOption) (*FundsResponse, error) { 42 out := new(FundsResponse) 43 err := c.cc.Invoke(ctx, "/injective_insurance_rpc.InjectiveInsuranceRPC/Funds", in, out, opts...) 44 if err != nil { 45 return nil, err 46 } 47 return out, nil 48 } 49 50 func (c *injectiveInsuranceRPCClient) Fund(ctx context.Context, in *FundRequest, opts ...grpc.CallOption) (*FundResponse, error) { 51 out := new(FundResponse) 52 err := c.cc.Invoke(ctx, "/injective_insurance_rpc.InjectiveInsuranceRPC/Fund", in, out, opts...) 53 if err != nil { 54 return nil, err 55 } 56 return out, nil 57 } 58 59 func (c *injectiveInsuranceRPCClient) Redemptions(ctx context.Context, in *RedemptionsRequest, opts ...grpc.CallOption) (*RedemptionsResponse, error) { 60 out := new(RedemptionsResponse) 61 err := c.cc.Invoke(ctx, "/injective_insurance_rpc.InjectiveInsuranceRPC/Redemptions", in, out, opts...) 62 if err != nil { 63 return nil, err 64 } 65 return out, nil 66 } 67 68 // InjectiveInsuranceRPCServer is the server API for InjectiveInsuranceRPC service. 69 // All implementations must embed UnimplementedInjectiveInsuranceRPCServer 70 // for forward compatibility 71 type InjectiveInsuranceRPCServer interface { 72 // Funds lists all insurance funds. 73 Funds(context.Context, *FundsRequest) (*FundsResponse, error) 74 // Funds returns an insurance fund for a given insurance fund token denom. 75 Fund(context.Context, *FundRequest) (*FundResponse, error) 76 // PendingRedemptions lists all pending redemptions according to a filter 77 Redemptions(context.Context, *RedemptionsRequest) (*RedemptionsResponse, error) 78 mustEmbedUnimplementedInjectiveInsuranceRPCServer() 79 } 80 81 // UnimplementedInjectiveInsuranceRPCServer must be embedded to have forward compatible implementations. 82 type UnimplementedInjectiveInsuranceRPCServer struct { 83 } 84 85 func (UnimplementedInjectiveInsuranceRPCServer) Funds(context.Context, *FundsRequest) (*FundsResponse, error) { 86 return nil, status.Errorf(codes.Unimplemented, "method Funds not implemented") 87 } 88 func (UnimplementedInjectiveInsuranceRPCServer) Fund(context.Context, *FundRequest) (*FundResponse, error) { 89 return nil, status.Errorf(codes.Unimplemented, "method Fund not implemented") 90 } 91 func (UnimplementedInjectiveInsuranceRPCServer) Redemptions(context.Context, *RedemptionsRequest) (*RedemptionsResponse, error) { 92 return nil, status.Errorf(codes.Unimplemented, "method Redemptions not implemented") 93 } 94 func (UnimplementedInjectiveInsuranceRPCServer) mustEmbedUnimplementedInjectiveInsuranceRPCServer() {} 95 96 // UnsafeInjectiveInsuranceRPCServer may be embedded to opt out of forward compatibility for this service. 97 // Use of this interface is not recommended, as added methods to InjectiveInsuranceRPCServer will 98 // result in compilation errors. 99 type UnsafeInjectiveInsuranceRPCServer interface { 100 mustEmbedUnimplementedInjectiveInsuranceRPCServer() 101 } 102 103 func RegisterInjectiveInsuranceRPCServer(s grpc.ServiceRegistrar, srv InjectiveInsuranceRPCServer) { 104 s.RegisterService(&InjectiveInsuranceRPC_ServiceDesc, srv) 105 } 106 107 func _InjectiveInsuranceRPC_Funds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 108 in := new(FundsRequest) 109 if err := dec(in); err != nil { 110 return nil, err 111 } 112 if interceptor == nil { 113 return srv.(InjectiveInsuranceRPCServer).Funds(ctx, in) 114 } 115 info := &grpc.UnaryServerInfo{ 116 Server: srv, 117 FullMethod: "/injective_insurance_rpc.InjectiveInsuranceRPC/Funds", 118 } 119 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 120 return srv.(InjectiveInsuranceRPCServer).Funds(ctx, req.(*FundsRequest)) 121 } 122 return interceptor(ctx, in, info, handler) 123 } 124 125 func _InjectiveInsuranceRPC_Fund_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 126 in := new(FundRequest) 127 if err := dec(in); err != nil { 128 return nil, err 129 } 130 if interceptor == nil { 131 return srv.(InjectiveInsuranceRPCServer).Fund(ctx, in) 132 } 133 info := &grpc.UnaryServerInfo{ 134 Server: srv, 135 FullMethod: "/injective_insurance_rpc.InjectiveInsuranceRPC/Fund", 136 } 137 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 138 return srv.(InjectiveInsuranceRPCServer).Fund(ctx, req.(*FundRequest)) 139 } 140 return interceptor(ctx, in, info, handler) 141 } 142 143 func _InjectiveInsuranceRPC_Redemptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 144 in := new(RedemptionsRequest) 145 if err := dec(in); err != nil { 146 return nil, err 147 } 148 if interceptor == nil { 149 return srv.(InjectiveInsuranceRPCServer).Redemptions(ctx, in) 150 } 151 info := &grpc.UnaryServerInfo{ 152 Server: srv, 153 FullMethod: "/injective_insurance_rpc.InjectiveInsuranceRPC/Redemptions", 154 } 155 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 156 return srv.(InjectiveInsuranceRPCServer).Redemptions(ctx, req.(*RedemptionsRequest)) 157 } 158 return interceptor(ctx, in, info, handler) 159 } 160 161 // InjectiveInsuranceRPC_ServiceDesc is the grpc.ServiceDesc for InjectiveInsuranceRPC 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 InjectiveInsuranceRPC_ServiceDesc = grpc.ServiceDesc{ 165 ServiceName: "injective_insurance_rpc.InjectiveInsuranceRPC", 166 HandlerType: (*InjectiveInsuranceRPCServer)(nil), 167 Methods: []grpc.MethodDesc{ 168 { 169 MethodName: "Funds", 170 Handler: _InjectiveInsuranceRPC_Funds_Handler, 171 }, 172 { 173 MethodName: "Fund", 174 Handler: _InjectiveInsuranceRPC_Fund_Handler, 175 }, 176 { 177 MethodName: "Redemptions", 178 Handler: _InjectiveInsuranceRPC_Redemptions_Handler, 179 }, 180 }, 181 Streams: []grpc.StreamDesc{}, 182 Metadata: "goadesign_goagen_injective_insurance_rpc.proto", 183 }