iap

package
v0.1.1113 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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

type ClientOptions struct {
	Loaded
	Timeout time.Duration
}

func ApplyClientOptions

func ApplyClientOptions(opts *ClientOptions, modifiers ...ClientOption) ClientOptions

type DefaultTool

type DefaultTool struct {
	T *contract.Tool[Client]
}

func NewTool

func NewTool(c Client, opts contract.ToolOptions[Client]) *DefaultTool

func (*DefaultTool) VerifyApple

VerifyApple verifies an Apple purchase using the wrapped client.

func (*DefaultTool) VerifyGoogle

VerifyGoogle verifies a Google purchase using the wrapped client.

type IAPClientDependencies

type IAPClientDependencies struct {
	E contract.EnvironmentOperator
}

type Loaded

type Loaded struct {
	AppleKeyContent   []byte
	AppleKeyID        string
	AppleIssuerID     string
	AppleBundleID     string
	GoogleJSONKey     []byte
	GoogleJSONKeyTest []byte
	GooglePackage     string
	GooglePackageTest string
}

type Tool

type Tool interface {
	contract.IAPOperator
}

Jump to

Keyboard shortcuts

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