Documentation
¶
Index ¶
- func NewAppleIAPClient(ctx context.Context, retryOpts helper.RetryOptions, d IAPClientDependencies, ...) (contract.AppleIAPClient, error)
- func NewGoogleIAPClient(ctx context.Context, retryOpts helper.RetryOptions, d IAPClientDependencies, ...) (contract.GoogleIAPClient, error)
- type Client
- type ClientOption
- func WithAppleBundleID(x string) ClientOption
- func WithAppleIssuerID(x string) ClientOption
- func WithAppleKeyContent(x []byte) ClientOption
- func WithAppleKeyID(x string) ClientOption
- func WithGoogleJSONKey(x []byte) ClientOption
- func WithGoogleJSONKeyTest(x []byte) ClientOption
- func WithGooglePackage(x string) ClientOption
- func WithGooglePackageTest(x string) ClientOption
- func WithLoaded(x Loaded) ClientOption
- func WithTimeout(x time.Duration) ClientOption
- type ClientOptions
- type DefaultTool
- type Dependencies
- type IAPClientDependencies
- type Loaded
- type Tool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAppleIAPClient ¶
func NewAppleIAPClient(ctx context.Context, retryOpts helper.RetryOptions, d IAPClientDependencies, opts ClientOptions) (contract.AppleIAPClient, error)
func NewGoogleIAPClient ¶
func NewGoogleIAPClient(ctx context.Context, retryOpts helper.RetryOptions, d IAPClientDependencies, opts ClientOptions) (contract.GoogleIAPClient, error)
Types ¶
type Client ¶
type Client interface {
contract.IAPOperator
}
func NewClient ¶
func NewClient(d Dependencies, opts ClientOptions) (Client, error)
func NewNoopClient ¶
func NewNoopClient() Client
type ClientOption ¶
type ClientOption = contract.Opt[ClientOptions]
func WithAppleBundleID ¶
func WithAppleBundleID(x string) ClientOption
func WithAppleIssuerID ¶
func WithAppleIssuerID(x string) ClientOption
func WithAppleKeyContent ¶
func WithAppleKeyContent(x []byte) ClientOption
func WithAppleKeyID ¶
func WithAppleKeyID(x string) ClientOption
func WithGoogleJSONKey ¶
func WithGoogleJSONKey(x []byte) ClientOption
func WithGoogleJSONKeyTest ¶
func WithGoogleJSONKeyTest(x []byte) ClientOption
func WithGooglePackage ¶
func WithGooglePackage(x string) ClientOption
func WithGooglePackageTest ¶
func WithGooglePackageTest(x string) ClientOption
func WithLoaded ¶
func WithLoaded(x Loaded) ClientOption
func WithTimeout ¶
func WithTimeout(x time.Duration) ClientOption
type ClientOptions ¶
func ApplyClientOptions ¶
func ApplyClientOptions(opts *ClientOptions, modifiers ...ClientOption) ClientOptions
type DefaultTool ¶
func NewTool ¶
func NewTool(c Client, opts contract.ToolOptions[Client]) *DefaultTool
func (*DefaultTool) VerifyApple ¶
func (d *DefaultTool) VerifyApple(ctx context.Context, opts contract.VerifyAppleOptions) (*contract.VerifiedPurchase, error)
VerifyApple verifies an Apple purchase using the wrapped client.
func (*DefaultTool) VerifyGoogle ¶
func (d *DefaultTool) VerifyGoogle(ctx context.Context, opts contract.VerifyGoogleOptions) (*contract.VerifiedPurchase, error)
VerifyGoogle verifies a Google purchase using the wrapped client.
type Dependencies ¶
type Dependencies struct {
A contract.AppleIAPClient
G contract.GoogleIAPClient
E contract.EnvironmentOperator
}
type IAPClientDependencies ¶
type IAPClientDependencies struct {
E contract.EnvironmentOperator
}
type Tool ¶
type Tool interface {
contract.IAPOperator
}
Click to show internal directories.
Click to hide internal directories.