v1

package
v0.0.5-0...-8e55a6f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2023 License: Apache-2.0, MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CheckoutService_CheckoutNow_FullMethodName   = "/payment.api.checkout.v1.CheckoutService/CheckoutNow"
	CheckoutService_CheckoutOrder_FullMethodName = "/payment.api.checkout.v1.CheckoutService/CheckoutOrder"
)
View Source
const OperationCheckoutServiceCheckoutNow = "/payment.api.checkout.v1.CheckoutService/CheckoutNow"
View Source
const OperationCheckoutServiceCheckoutOrder = "/payment.api.checkout.v1.CheckoutService/CheckoutOrder"

Variables

View Source
var (
	ErrorReason_name = map[int32]string{
		0: "PRODUCT_ACROSS_TENANT",
		1: "PRICE_TYPE_UNSUPPORTED",
		2: "CURRENCY_UNSUPPORTED",
	}
	ErrorReason_value = map[string]int32{
		"PRODUCT_ACROSS_TENANT":  0,
		"PRICE_TYPE_UNSUPPORTED": 1,
		"CURRENCY_UNSUPPORTED":   2,
	}
)

Enum value maps for ErrorReason.

View Source
var CheckoutService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "payment.api.checkout.v1.CheckoutService",
	HandlerType: (*CheckoutServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CheckoutNow",
			Handler:    _CheckoutService_CheckoutNow_Handler,
		},
		{
			MethodName: "CheckoutOrder",
			Handler:    _CheckoutService_CheckoutOrder_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "payment/api/checkout/v1/checkout.proto",
}

CheckoutService_ServiceDesc is the grpc.ServiceDesc for CheckoutService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_payment_api_checkout_v1_checkout_proto protoreflect.FileDescriptor
View Source
var File_payment_api_checkout_v1_error_reason_proto protoreflect.FileDescriptor

Functions

func ErrorCurrencyUnsupportedLocalized

func ErrorCurrencyUnsupportedLocalized(ctx context.Context, data map[string]interface{}, pluralCount interface{}) *errors.Error

func ErrorPriceTypeUnsupportedLocalized

func ErrorPriceTypeUnsupportedLocalized(ctx context.Context, data map[string]interface{}, pluralCount interface{}) *errors.Error

func ErrorProductAcrossTenantLocalized

func ErrorProductAcrossTenantLocalized(ctx context.Context, data map[string]interface{}, pluralCount interface{}) *errors.Error

func IsCurrencyUnsupported

func IsCurrencyUnsupported(err error) bool

func IsPriceTypeUnsupported

func IsPriceTypeUnsupported(err error) bool

func IsProductAcrossTenant

func IsProductAcrossTenant(err error) bool

func RegisterCheckoutServiceHTTPServer

func RegisterCheckoutServiceHTTPServer(s *http.Server, srv CheckoutServiceHTTPServer)

func RegisterCheckoutServiceServer

func RegisterCheckoutServiceServer(s grpc.ServiceRegistrar, srv CheckoutServiceServer)

Types

type CheckOutOrderRequest

type CheckOutOrderRequest struct {
	OrderId      string `protobuf:"bytes,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
	Provider     string `protobuf:"bytes,2,opt,name=provider,proto3" json:"provider,omitempty"`
	CurrencyCode string `protobuf:"bytes,3,opt,name=currency_code,json=currencyCode,proto3" json:"currency_code,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckOutOrderRequest) Descriptor deprecated

func (*CheckOutOrderRequest) Descriptor() ([]byte, []int)

Deprecated: Use CheckOutOrderRequest.ProtoReflect.Descriptor instead.

func (*CheckOutOrderRequest) GetCurrencyCode

func (x *CheckOutOrderRequest) GetCurrencyCode() string

func (*CheckOutOrderRequest) GetOrderId

func (x *CheckOutOrderRequest) GetOrderId() string

func (*CheckOutOrderRequest) GetProvider

func (x *CheckOutOrderRequest) GetProvider() string

func (*CheckOutOrderRequest) ProtoMessage

func (*CheckOutOrderRequest) ProtoMessage()

func (*CheckOutOrderRequest) ProtoReflect

func (x *CheckOutOrderRequest) ProtoReflect() protoreflect.Message

func (*CheckOutOrderRequest) Reset

func (x *CheckOutOrderRequest) Reset()

func (*CheckOutOrderRequest) String

func (x *CheckOutOrderRequest) String() string

func (*CheckOutOrderRequest) Validate

func (m *CheckOutOrderRequest) Validate() error

Validate checks the field values on CheckOutOrderRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*CheckOutOrderRequest) ValidateAll

func (m *CheckOutOrderRequest) ValidateAll() error

ValidateAll checks the field values on CheckOutOrderRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in CheckOutOrderRequestMultiError, or nil if none found.

type CheckOutOrderRequestMultiError

type CheckOutOrderRequestMultiError []error

CheckOutOrderRequestMultiError is an error wrapping multiple validation errors returned by CheckOutOrderRequest.ValidateAll() if the designated constraints aren't met.

func (CheckOutOrderRequestMultiError) AllErrors

func (m CheckOutOrderRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CheckOutOrderRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type CheckOutOrderRequestValidationError

type CheckOutOrderRequestValidationError struct {
	// contains filtered or unexported fields
}

CheckOutOrderRequestValidationError is the validation error returned by CheckOutOrderRequest.Validate if the designated constraints aren't met.

func (CheckOutOrderRequestValidationError) Cause

Cause function returns cause value.

func (CheckOutOrderRequestValidationError) Error

Error satisfies the builtin error interface

func (CheckOutOrderRequestValidationError) ErrorName

ErrorName returns error name.

func (CheckOutOrderRequestValidationError) Field

Field function returns field value.

func (CheckOutOrderRequestValidationError) Key

Key function returns key value.

func (CheckOutOrderRequestValidationError) Reason

Reason function returns reason value.

type CheckoutItemParams

type CheckoutItemParams struct {
	Id         string           `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	PriceId    string           `protobuf:"bytes,10,opt,name=price_id,json=priceId,proto3" json:"price_id,omitempty"`
	Quantity   int64            `protobuf:"varint,11,opt,name=quantity,proto3" json:"quantity,omitempty"`
	BizPayload *structpb.Struct `protobuf:"bytes,200,opt,name=biz_payload,json=bizPayload,proto3" json:"biz_payload,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckoutItemParams) Descriptor deprecated

func (*CheckoutItemParams) Descriptor() ([]byte, []int)

Deprecated: Use CheckoutItemParams.ProtoReflect.Descriptor instead.

func (*CheckoutItemParams) GetBizPayload

func (x *CheckoutItemParams) GetBizPayload() *structpb.Struct

func (*CheckoutItemParams) GetId

func (x *CheckoutItemParams) GetId() string

func (*CheckoutItemParams) GetPriceId

func (x *CheckoutItemParams) GetPriceId() string

func (*CheckoutItemParams) GetQuantity

func (x *CheckoutItemParams) GetQuantity() int64

func (*CheckoutItemParams) ProtoMessage

func (*CheckoutItemParams) ProtoMessage()

func (*CheckoutItemParams) ProtoReflect

func (x *CheckoutItemParams) ProtoReflect() protoreflect.Message

func (*CheckoutItemParams) Reset

func (x *CheckoutItemParams) Reset()

func (*CheckoutItemParams) String

func (x *CheckoutItemParams) String() string

func (*CheckoutItemParams) Validate

func (m *CheckoutItemParams) Validate() error

Validate checks the field values on CheckoutItemParams with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*CheckoutItemParams) ValidateAll

func (m *CheckoutItemParams) ValidateAll() error

ValidateAll checks the field values on CheckoutItemParams with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in CheckoutItemParamsMultiError, or nil if none found.

type CheckoutItemParamsMultiError

type CheckoutItemParamsMultiError []error

CheckoutItemParamsMultiError is an error wrapping multiple validation errors returned by CheckoutItemParams.ValidateAll() if the designated constraints aren't met.

func (CheckoutItemParamsMultiError) AllErrors

func (m CheckoutItemParamsMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CheckoutItemParamsMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type CheckoutItemParamsValidationError

type CheckoutItemParamsValidationError struct {
	// contains filtered or unexported fields
}

CheckoutItemParamsValidationError is the validation error returned by CheckoutItemParams.Validate if the designated constraints aren't met.

func (CheckoutItemParamsValidationError) Cause

Cause function returns cause value.

func (CheckoutItemParamsValidationError) Error

Error satisfies the builtin error interface

func (CheckoutItemParamsValidationError) ErrorName

ErrorName returns error name.

func (CheckoutItemParamsValidationError) Field

Field function returns field value.

func (CheckoutItemParamsValidationError) Key

Key function returns key value.

func (CheckoutItemParamsValidationError) Reason

Reason function returns reason value.

type CheckoutNowReply

type CheckoutNowReply struct {
	Subscription *v1.Subscription `protobuf:"bytes,1,opt,name=subscription,proto3" json:"subscription,omitempty"`
	Order        *v11.Order       `protobuf:"bytes,2,opt,name=order,proto3" json:"order,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckoutNowReply) Descriptor deprecated

func (*CheckoutNowReply) Descriptor() ([]byte, []int)

Deprecated: Use CheckoutNowReply.ProtoReflect.Descriptor instead.

func (*CheckoutNowReply) GetOrder

func (x *CheckoutNowReply) GetOrder() *v11.Order

func (*CheckoutNowReply) GetSubscription

func (x *CheckoutNowReply) GetSubscription() *v1.Subscription

func (*CheckoutNowReply) ProtoMessage

func (*CheckoutNowReply) ProtoMessage()

func (*CheckoutNowReply) ProtoReflect

func (x *CheckoutNowReply) ProtoReflect() protoreflect.Message

func (*CheckoutNowReply) Reset

func (x *CheckoutNowReply) Reset()

func (*CheckoutNowReply) String

func (x *CheckoutNowReply) String() string

func (*CheckoutNowReply) Validate

func (m *CheckoutNowReply) Validate() error

Validate checks the field values on CheckoutNowReply with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*CheckoutNowReply) ValidateAll

func (m *CheckoutNowReply) ValidateAll() error

ValidateAll checks the field values on CheckoutNowReply with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in CheckoutNowReplyMultiError, or nil if none found.

type CheckoutNowReplyMultiError

type CheckoutNowReplyMultiError []error

CheckoutNowReplyMultiError is an error wrapping multiple validation errors returned by CheckoutNowReply.ValidateAll() if the designated constraints aren't met.

func (CheckoutNowReplyMultiError) AllErrors

func (m CheckoutNowReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CheckoutNowReplyMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type CheckoutNowReplyValidationError

type CheckoutNowReplyValidationError struct {
	// contains filtered or unexported fields
}

CheckoutNowReplyValidationError is the validation error returned by CheckoutNowReply.Validate if the designated constraints aren't met.

func (CheckoutNowReplyValidationError) Cause

Cause function returns cause value.

func (CheckoutNowReplyValidationError) Error

Error satisfies the builtin error interface

func (CheckoutNowReplyValidationError) ErrorName

ErrorName returns error name.

func (CheckoutNowReplyValidationError) Field

Field function returns field value.

func (CheckoutNowReplyValidationError) Key

Key function returns key value.

func (CheckoutNowReplyValidationError) Reason

Reason function returns reason value.

type CheckoutNowRequest

type CheckoutNowRequest struct {
	Provider     string                `protobuf:"bytes,2,opt,name=provider,proto3" json:"provider,omitempty"`
	CurrencyCode string                `protobuf:"bytes,3,opt,name=currency_code,json=currencyCode,proto3" json:"currency_code,omitempty"`
	Items        []*CheckoutItemParams `protobuf:"bytes,100,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckoutNowRequest) Descriptor deprecated

func (*CheckoutNowRequest) Descriptor() ([]byte, []int)

Deprecated: Use CheckoutNowRequest.ProtoReflect.Descriptor instead.

func (*CheckoutNowRequest) GetCurrencyCode

func (x *CheckoutNowRequest) GetCurrencyCode() string

func (*CheckoutNowRequest) GetItems

func (x *CheckoutNowRequest) GetItems() []*CheckoutItemParams

func (*CheckoutNowRequest) GetProvider

func (x *CheckoutNowRequest) GetProvider() string

func (*CheckoutNowRequest) ProtoMessage

func (*CheckoutNowRequest) ProtoMessage()

func (*CheckoutNowRequest) ProtoReflect

func (x *CheckoutNowRequest) ProtoReflect() protoreflect.Message

func (*CheckoutNowRequest) Reset

func (x *CheckoutNowRequest) Reset()

func (*CheckoutNowRequest) String

func (x *CheckoutNowRequest) String() string

func (*CheckoutNowRequest) Validate

func (m *CheckoutNowRequest) Validate() error

Validate checks the field values on CheckoutNowRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*CheckoutNowRequest) ValidateAll

func (m *CheckoutNowRequest) ValidateAll() error

ValidateAll checks the field values on CheckoutNowRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in CheckoutNowRequestMultiError, or nil if none found.

type CheckoutNowRequestMultiError

type CheckoutNowRequestMultiError []error

CheckoutNowRequestMultiError is an error wrapping multiple validation errors returned by CheckoutNowRequest.ValidateAll() if the designated constraints aren't met.

func (CheckoutNowRequestMultiError) AllErrors

func (m CheckoutNowRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CheckoutNowRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type CheckoutNowRequestValidationError

type CheckoutNowRequestValidationError struct {
	// contains filtered or unexported fields
}

CheckoutNowRequestValidationError is the validation error returned by CheckoutNowRequest.Validate if the designated constraints aren't met.

func (CheckoutNowRequestValidationError) Cause

Cause function returns cause value.

func (CheckoutNowRequestValidationError) Error

Error satisfies the builtin error interface

func (CheckoutNowRequestValidationError) ErrorName

ErrorName returns error name.

func (CheckoutNowRequestValidationError) Field

Field function returns field value.

func (CheckoutNowRequestValidationError) Key

Key function returns key value.

func (CheckoutNowRequestValidationError) Reason

Reason function returns reason value.

type CheckoutOrderReply

type CheckoutOrderReply struct {
	PaymentProviderInfo *v11.OrderPaymentProviderInfo `protobuf:"bytes,200,opt,name=payment_provider_info,json=paymentProviderInfo,proto3" json:"payment_provider_info,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckoutOrderReply) Descriptor deprecated

func (*CheckoutOrderReply) Descriptor() ([]byte, []int)

Deprecated: Use CheckoutOrderReply.ProtoReflect.Descriptor instead.

func (*CheckoutOrderReply) GetPaymentProviderInfo

func (x *CheckoutOrderReply) GetPaymentProviderInfo() *v11.OrderPaymentProviderInfo

func (*CheckoutOrderReply) ProtoMessage

func (*CheckoutOrderReply) ProtoMessage()

func (*CheckoutOrderReply) ProtoReflect

func (x *CheckoutOrderReply) ProtoReflect() protoreflect.Message

func (*CheckoutOrderReply) Reset

func (x *CheckoutOrderReply) Reset()

func (*CheckoutOrderReply) String

func (x *CheckoutOrderReply) String() string

func (*CheckoutOrderReply) Validate

func (m *CheckoutOrderReply) Validate() error

Validate checks the field values on CheckoutOrderReply with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*CheckoutOrderReply) ValidateAll

func (m *CheckoutOrderReply) ValidateAll() error

ValidateAll checks the field values on CheckoutOrderReply with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in CheckoutOrderReplyMultiError, or nil if none found.

type CheckoutOrderReplyMultiError

type CheckoutOrderReplyMultiError []error

CheckoutOrderReplyMultiError is an error wrapping multiple validation errors returned by CheckoutOrderReply.ValidateAll() if the designated constraints aren't met.

func (CheckoutOrderReplyMultiError) AllErrors

func (m CheckoutOrderReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CheckoutOrderReplyMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type CheckoutOrderReplyValidationError

type CheckoutOrderReplyValidationError struct {
	// contains filtered or unexported fields
}

CheckoutOrderReplyValidationError is the validation error returned by CheckoutOrderReply.Validate if the designated constraints aren't met.

func (CheckoutOrderReplyValidationError) Cause

Cause function returns cause value.

func (CheckoutOrderReplyValidationError) Error

Error satisfies the builtin error interface

func (CheckoutOrderReplyValidationError) ErrorName

ErrorName returns error name.

func (CheckoutOrderReplyValidationError) Field

Field function returns field value.

func (CheckoutOrderReplyValidationError) Key

Key function returns key value.

func (CheckoutOrderReplyValidationError) Reason

Reason function returns reason value.

type CheckoutServiceClient

type CheckoutServiceClient interface {
	CheckoutNow(ctx context.Context, in *CheckoutNowRequest, opts ...grpc.CallOption) (*CheckoutNowReply, error)
	CheckoutOrder(ctx context.Context, in *CheckOutOrderRequest, opts ...grpc.CallOption) (*CheckoutOrderReply, error)
}

CheckoutServiceClient is the client API for CheckoutService 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.

type CheckoutServiceHTTPClient

type CheckoutServiceHTTPClient interface {
	CheckoutNow(ctx context.Context, req *CheckoutNowRequest, opts ...http.CallOption) (rsp *CheckoutNowReply, err error)
	CheckoutOrder(ctx context.Context, req *CheckOutOrderRequest, opts ...http.CallOption) (rsp *CheckoutOrderReply, err error)
}

func NewCheckoutServiceHTTPClient

func NewCheckoutServiceHTTPClient(client *http.Client) CheckoutServiceHTTPClient

type CheckoutServiceHTTPClientImpl

type CheckoutServiceHTTPClientImpl struct {
	// contains filtered or unexported fields
}

func (*CheckoutServiceHTTPClientImpl) CheckoutNow

func (*CheckoutServiceHTTPClientImpl) CheckoutOrder

type CheckoutServiceHTTPServer

type CheckoutServiceHTTPServer interface {
	CheckoutNow(context.Context, *CheckoutNowRequest) (*CheckoutNowReply, error)
	CheckoutOrder(context.Context, *CheckOutOrderRequest) (*CheckoutOrderReply, error)
}

type CheckoutServiceServer

type CheckoutServiceServer interface {
	CheckoutNow(context.Context, *CheckoutNowRequest) (*CheckoutNowReply, error)
	CheckoutOrder(context.Context, *CheckOutOrderRequest) (*CheckoutOrderReply, error)
}

CheckoutServiceServer is the server API for CheckoutService service. All implementations should embed UnimplementedCheckoutServiceServer for forward compatibility

func NewCheckoutServiceClientProxy

func NewCheckoutServiceClientProxy(cc CheckoutServiceClient) CheckoutServiceServer

type ErrorReason

type ErrorReason int32
const (
	ErrorReason_PRODUCT_ACROSS_TENANT  ErrorReason = 0
	ErrorReason_PRICE_TYPE_UNSUPPORTED ErrorReason = 1
	ErrorReason_CURRENCY_UNSUPPORTED   ErrorReason = 2
)

func (ErrorReason) Descriptor

func (ErrorReason) Enum

func (x ErrorReason) Enum() *ErrorReason

func (ErrorReason) EnumDescriptor deprecated

func (ErrorReason) EnumDescriptor() ([]byte, []int)

Deprecated: Use ErrorReason.Descriptor instead.

func (ErrorReason) Number

func (x ErrorReason) Number() protoreflect.EnumNumber

func (ErrorReason) String

func (x ErrorReason) String() string

func (ErrorReason) Type

type UnimplementedCheckoutServiceServer

type UnimplementedCheckoutServiceServer struct {
}

UnimplementedCheckoutServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedCheckoutServiceServer) CheckoutNow

func (UnimplementedCheckoutServiceServer) CheckoutOrder

type UnsafeCheckoutServiceServer

type UnsafeCheckoutServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeCheckoutServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CheckoutServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL