Documentation ¶
Index ¶
- Constants
- func NewNativePaymentsServiceHandler(svc NativePaymentsServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- func NewPaymentsServiceHandler(svc PaymentsServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- type NativePaymentsServiceClient
- type NativePaymentsServiceHandler
- type PaymentsServiceClient
- type PaymentsServiceHandler
- type UnimplementedNativePaymentsServiceHandler
- func (UnimplementedNativePaymentsServiceHandler) GetApplePayConfig(context.Context, *connect.Request[v1.OrderConfigRequest]) (*connect.Response[v1.ApplePayConfig], error)
- func (UnimplementedNativePaymentsServiceHandler) GetCardPaymentConfig(context.Context, *connect.Request[v1.OrderConfigRequest]) (*connect.Response[v1.CardPaymentConfig], error)
- func (UnimplementedNativePaymentsServiceHandler) MakePayment(context.Context, *connect.Request[v1.PaymentRequest]) (*connect.Response[v1.PaymentResponse], error)
- type UnimplementedPaymentsServiceHandler
- func (UnimplementedPaymentsServiceHandler) GetOrderStatus(context.Context, *connect.Request[v1.OrderStatusRequest]) (*connect.Response[v1.OrderStatusResponse], error)
- func (UnimplementedPaymentsServiceHandler) GetPaymentProfile(context.Context, *connect.Request[v1.PaymentProfileRequest]) (*connect.Response[v1.PaymentProfileResponse], error)
- func (UnimplementedPaymentsServiceHandler) IsLimitReached(context.Context, *connect.Request[v1.OperationLimitRequest]) (*connect.Response[v1.OperationLimitResponse], error)
- func (UnimplementedPaymentsServiceHandler) NewReplenishOrder(context.Context, *connect.Request[v1.OrderReplenishRequest]) (*connect.Response[v1.OrderStatusResponse], error)
- func (UnimplementedPaymentsServiceHandler) NewTransferOrder(context.Context, *connect.Request[v1.TransferOrderRequest]) (*connect.Response[v1.OrderStatusResponse], error)
Constants ¶
const ( // NativePaymentsServiceGetApplePayConfigProcedure is the fully-qualified name of the // NativePaymentsService's GetApplePayConfig RPC. NativePaymentsServiceGetApplePayConfigProcedure = "/linq.money.payments.v1.NativePaymentsService/GetApplePayConfig" // NativePaymentsServiceGetCardPaymentConfigProcedure is the fully-qualified name of the // NativePaymentsService's GetCardPaymentConfig RPC. NativePaymentsServiceGetCardPaymentConfigProcedure = "/linq.money.payments.v1.NativePaymentsService/GetCardPaymentConfig" // NativePaymentsServiceMakePaymentProcedure is the fully-qualified name of the // NativePaymentsService's MakePayment RPC. NativePaymentsServiceMakePaymentProcedure = "/linq.money.payments.v1.NativePaymentsService/MakePayment" )
These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.
const ( // PaymentsServiceNewReplenishOrderProcedure is the fully-qualified name of the PaymentsService's // newReplenishOrder RPC. PaymentsServiceNewReplenishOrderProcedure = "/linq.money.payments.v1.PaymentsService/newReplenishOrder" // PaymentsServiceNewTransferOrderProcedure is the fully-qualified name of the PaymentsService's // newTransferOrder RPC. PaymentsServiceNewTransferOrderProcedure = "/linq.money.payments.v1.PaymentsService/newTransferOrder" // PaymentsServiceGetOrderStatusProcedure is the fully-qualified name of the PaymentsService's // getOrderStatus RPC. PaymentsServiceGetOrderStatusProcedure = "/linq.money.payments.v1.PaymentsService/getOrderStatus" // PaymentsServiceGetPaymentProfileProcedure is the fully-qualified name of the PaymentsService's // getPaymentProfile RPC. PaymentsServiceGetPaymentProfileProcedure = "/linq.money.payments.v1.PaymentsService/getPaymentProfile" // PaymentsServiceIsLimitReachedProcedure is the fully-qualified name of the PaymentsService's // IsLimitReached RPC. PaymentsServiceIsLimitReachedProcedure = "/linq.money.payments.v1.PaymentsService/IsLimitReached" )
These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.
const (
// NativePaymentsServiceName is the fully-qualified name of the NativePaymentsService service.
NativePaymentsServiceName = "linq.money.payments.v1.NativePaymentsService"
)
const (
// PaymentsServiceName is the fully-qualified name of the PaymentsService service.
PaymentsServiceName = "linq.money.payments.v1.PaymentsService"
)
Variables ¶
This section is empty.
Functions ¶
func NewNativePaymentsServiceHandler ¶
func NewNativePaymentsServiceHandler(svc NativePaymentsServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewNativePaymentsServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.
By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.
func NewPaymentsServiceHandler ¶
func NewPaymentsServiceHandler(svc PaymentsServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewPaymentsServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.
By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.
Types ¶
type NativePaymentsServiceClient ¶
type NativePaymentsServiceClient interface { // Apple pay config for order GetApplePayConfig(context.Context, *connect.Request[v1.OrderConfigRequest]) (*connect.Response[v1.ApplePayConfig], error) // Card payment config GetCardPaymentConfig(context.Context, *connect.Request[v1.OrderConfigRequest]) (*connect.Response[v1.CardPaymentConfig], error) // Native payment MakePayment(context.Context, *connect.Request[v1.PaymentRequest]) (*connect.Response[v1.PaymentResponse], error) }
NativePaymentsServiceClient is a client for the linq.money.payments.v1.NativePaymentsService service.
func NewNativePaymentsServiceClient ¶
func NewNativePaymentsServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) NativePaymentsServiceClient
NewNativePaymentsServiceClient constructs a client for the linq.money.payments.v1.NativePaymentsService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.
The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).
type NativePaymentsServiceHandler ¶
type NativePaymentsServiceHandler interface { // Apple pay config for order GetApplePayConfig(context.Context, *connect.Request[v1.OrderConfigRequest]) (*connect.Response[v1.ApplePayConfig], error) // Card payment config GetCardPaymentConfig(context.Context, *connect.Request[v1.OrderConfigRequest]) (*connect.Response[v1.CardPaymentConfig], error) // Native payment MakePayment(context.Context, *connect.Request[v1.PaymentRequest]) (*connect.Response[v1.PaymentResponse], error) }
NativePaymentsServiceHandler is an implementation of the linq.money.payments.v1.NativePaymentsService service.
type PaymentsServiceClient ¶
type PaymentsServiceClient interface { // Creates new order for the user with amount and currency // In case order was not processed a new request will return // already existing order with the same ID NewReplenishOrder(context.Context, *connect.Request[v1.OrderReplenishRequest]) (*connect.Response[v1.OrderStatusResponse], error) // Creates new order for transfer tokens between accounts NewTransferOrder(context.Context, *connect.Request[v1.TransferOrderRequest]) (*connect.Response[v1.OrderStatusResponse], error) // Returns actual status of the requested order // May be useful for confirming that order processed and futher actions allowed GetOrderStatus(context.Context, *connect.Request[v1.OrderStatusRequest]) (*connect.Response[v1.OrderStatusResponse], error) // Returns payment profile details GetPaymentProfile(context.Context, *connect.Request[v1.PaymentProfileRequest]) (*connect.Response[v1.PaymentProfileResponse], error) // Returns status of operational limit IsLimitReached(context.Context, *connect.Request[v1.OperationLimitRequest]) (*connect.Response[v1.OperationLimitResponse], error) }
PaymentsServiceClient is a client for the linq.money.payments.v1.PaymentsService service.
func NewPaymentsServiceClient ¶
func NewPaymentsServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) PaymentsServiceClient
NewPaymentsServiceClient constructs a client for the linq.money.payments.v1.PaymentsService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.
The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).
type PaymentsServiceHandler ¶
type PaymentsServiceHandler interface { // Creates new order for the user with amount and currency // In case order was not processed a new request will return // already existing order with the same ID NewReplenishOrder(context.Context, *connect.Request[v1.OrderReplenishRequest]) (*connect.Response[v1.OrderStatusResponse], error) // Creates new order for transfer tokens between accounts NewTransferOrder(context.Context, *connect.Request[v1.TransferOrderRequest]) (*connect.Response[v1.OrderStatusResponse], error) // Returns actual status of the requested order // May be useful for confirming that order processed and futher actions allowed GetOrderStatus(context.Context, *connect.Request[v1.OrderStatusRequest]) (*connect.Response[v1.OrderStatusResponse], error) // Returns payment profile details GetPaymentProfile(context.Context, *connect.Request[v1.PaymentProfileRequest]) (*connect.Response[v1.PaymentProfileResponse], error) // Returns status of operational limit IsLimitReached(context.Context, *connect.Request[v1.OperationLimitRequest]) (*connect.Response[v1.OperationLimitResponse], error) }
PaymentsServiceHandler is an implementation of the linq.money.payments.v1.PaymentsService service.
type UnimplementedNativePaymentsServiceHandler ¶
type UnimplementedNativePaymentsServiceHandler struct{}
UnimplementedNativePaymentsServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedNativePaymentsServiceHandler) GetApplePayConfig ¶
func (UnimplementedNativePaymentsServiceHandler) GetApplePayConfig(context.Context, *connect.Request[v1.OrderConfigRequest]) (*connect.Response[v1.ApplePayConfig], error)
func (UnimplementedNativePaymentsServiceHandler) GetCardPaymentConfig ¶
func (UnimplementedNativePaymentsServiceHandler) GetCardPaymentConfig(context.Context, *connect.Request[v1.OrderConfigRequest]) (*connect.Response[v1.CardPaymentConfig], error)
func (UnimplementedNativePaymentsServiceHandler) MakePayment ¶
func (UnimplementedNativePaymentsServiceHandler) MakePayment(context.Context, *connect.Request[v1.PaymentRequest]) (*connect.Response[v1.PaymentResponse], error)
type UnimplementedPaymentsServiceHandler ¶
type UnimplementedPaymentsServiceHandler struct{}
UnimplementedPaymentsServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedPaymentsServiceHandler) GetOrderStatus ¶
func (UnimplementedPaymentsServiceHandler) GetOrderStatus(context.Context, *connect.Request[v1.OrderStatusRequest]) (*connect.Response[v1.OrderStatusResponse], error)
func (UnimplementedPaymentsServiceHandler) GetPaymentProfile ¶
func (UnimplementedPaymentsServiceHandler) GetPaymentProfile(context.Context, *connect.Request[v1.PaymentProfileRequest]) (*connect.Response[v1.PaymentProfileResponse], error)
func (UnimplementedPaymentsServiceHandler) IsLimitReached ¶
func (UnimplementedPaymentsServiceHandler) IsLimitReached(context.Context, *connect.Request[v1.OperationLimitRequest]) (*connect.Response[v1.OperationLimitResponse], error)
func (UnimplementedPaymentsServiceHandler) NewReplenishOrder ¶
func (UnimplementedPaymentsServiceHandler) NewReplenishOrder(context.Context, *connect.Request[v1.OrderReplenishRequest]) (*connect.Response[v1.OrderStatusResponse], error)
func (UnimplementedPaymentsServiceHandler) NewTransferOrder ¶
func (UnimplementedPaymentsServiceHandler) NewTransferOrder(context.Context, *connect.Request[v1.TransferOrderRequest]) (*connect.Response[v1.OrderStatusResponse], error)