Documentation ¶
Overview ¶
Package pricesrpc is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterPricesHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterPricesHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PricesClient) error
- func RegisterPricesHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterPricesHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PricesServer) error
- func RegisterPricesServer(s grpc.ServiceRegistrar, srv PricesServer)
- type GetPaymentDetailsRequest
- func (*GetPaymentDetailsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetPaymentDetailsRequest) GetHttpRequestText() string
- func (x *GetPaymentDetailsRequest) GetPath() string
- func (*GetPaymentDetailsRequest) ProtoMessage()
- func (x *GetPaymentDetailsRequest) ProtoReflect() protoreflect.Message
- func (x *GetPaymentDetailsRequest) Reset()
- func (x *GetPaymentDetailsRequest) String() string
- type GetPaymentDetailsResponse
- func (*GetPaymentDetailsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetPaymentDetailsResponse) GetPriceSats() int64
- func (x *GetPaymentDetailsResponse) GetRecipientLud16() string
- func (*GetPaymentDetailsResponse) ProtoMessage()
- func (x *GetPaymentDetailsResponse) ProtoReflect() protoreflect.Message
- func (x *GetPaymentDetailsResponse) Reset()
- func (x *GetPaymentDetailsResponse) String() string
- type PricesClient
- type PricesServer
- type UnimplementedPricesServer
- type UnsafePricesServer
Constants ¶
This section is empty.
Variables ¶
var File_prices_proto protoreflect.FileDescriptor
var Prices_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pricesrpc.Prices", HandlerType: (*PricesServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetPaymentDetails", Handler: _Prices_GetPaymentDetails_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "prices.proto", }
Prices_ServiceDesc is the grpc.ServiceDesc for Prices service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPricesHandler ¶
RegisterPricesHandler registers the http handlers for service Prices to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterPricesHandlerClient ¶
func RegisterPricesHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PricesClient) error
RegisterPricesHandlerClient registers the http handlers for service Prices to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PricesClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PricesClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "PricesClient" to call the correct interceptors.
func RegisterPricesHandlerFromEndpoint ¶
func RegisterPricesHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterPricesHandlerFromEndpoint is same as RegisterPricesHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterPricesHandlerServer ¶
func RegisterPricesHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PricesServer) error
RegisterPricesHandlerServer registers the http handlers for service Prices to "mux". UnaryRPC :call PricesServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPricesHandlerFromEndpoint instead.
func RegisterPricesServer ¶
func RegisterPricesServer(s grpc.ServiceRegistrar, srv PricesServer)
Types ¶
type GetPaymentDetailsRequest ¶
type GetPaymentDetailsRequest struct { Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` HttpRequestText string `protobuf:"bytes,2,opt,name=http_request_text,json=httpRequestText,proto3" json:"http_request_text,omitempty"` // contains filtered or unexported fields }
func (*GetPaymentDetailsRequest) Descriptor
deprecated
func (*GetPaymentDetailsRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetPaymentDetailsRequest.ProtoReflect.Descriptor instead.
func (*GetPaymentDetailsRequest) GetHttpRequestText ¶
func (x *GetPaymentDetailsRequest) GetHttpRequestText() string
func (*GetPaymentDetailsRequest) GetPath ¶
func (x *GetPaymentDetailsRequest) GetPath() string
func (*GetPaymentDetailsRequest) ProtoMessage ¶
func (*GetPaymentDetailsRequest) ProtoMessage()
func (*GetPaymentDetailsRequest) ProtoReflect ¶
func (x *GetPaymentDetailsRequest) ProtoReflect() protoreflect.Message
func (*GetPaymentDetailsRequest) Reset ¶
func (x *GetPaymentDetailsRequest) Reset()
func (*GetPaymentDetailsRequest) String ¶
func (x *GetPaymentDetailsRequest) String() string
type GetPaymentDetailsResponse ¶
type GetPaymentDetailsResponse struct { RecipientLud16 string `protobuf:"bytes,1,opt,name=recipient_lud16,json=recipientLud16,proto3" json:"recipient_lud16,omitempty"` PriceSats int64 `protobuf:"varint,2,opt,name=price_sats,json=priceSats,proto3" json:"price_sats,omitempty"` // contains filtered or unexported fields }
func (*GetPaymentDetailsResponse) Descriptor
deprecated
func (*GetPaymentDetailsResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetPaymentDetailsResponse.ProtoReflect.Descriptor instead.
func (*GetPaymentDetailsResponse) GetPriceSats ¶
func (x *GetPaymentDetailsResponse) GetPriceSats() int64
func (*GetPaymentDetailsResponse) GetRecipientLud16 ¶
func (x *GetPaymentDetailsResponse) GetRecipientLud16() string
func (*GetPaymentDetailsResponse) ProtoMessage ¶
func (*GetPaymentDetailsResponse) ProtoMessage()
func (*GetPaymentDetailsResponse) ProtoReflect ¶
func (x *GetPaymentDetailsResponse) ProtoReflect() protoreflect.Message
func (*GetPaymentDetailsResponse) Reset ¶
func (x *GetPaymentDetailsResponse) Reset()
func (*GetPaymentDetailsResponse) String ¶
func (x *GetPaymentDetailsResponse) String() string
type PricesClient ¶
type PricesClient interface {
GetPaymentDetails(ctx context.Context, in *GetPaymentDetailsRequest, opts ...grpc.CallOption) (*GetPaymentDetailsResponse, error)
}
PricesClient is the client API for Prices service.
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.
func NewPricesClient ¶
func NewPricesClient(cc grpc.ClientConnInterface) PricesClient
type PricesServer ¶
type PricesServer interface { GetPaymentDetails(context.Context, *GetPaymentDetailsRequest) (*GetPaymentDetailsResponse, error) // contains filtered or unexported methods }
PricesServer is the server API for Prices service. All implementations must embed UnimplementedPricesServer for forward compatibility
type UnimplementedPricesServer ¶
type UnimplementedPricesServer struct { }
UnimplementedPricesServer must be embedded to have forward compatible implementations.
func (UnimplementedPricesServer) GetPaymentDetails ¶
func (UnimplementedPricesServer) GetPaymentDetails(context.Context, *GetPaymentDetailsRequest) (*GetPaymentDetailsResponse, error)
type UnsafePricesServer ¶
type UnsafePricesServer interface {
// contains filtered or unexported methods
}
UnsafePricesServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PricesServer will result in compilation errors.