iaps

package
v1.1.23 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IAPApple

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

IAPApple Apple驗證器

func NewIAPApple

func NewIAPApple(config *IAPAppleConfig) *IAPApple

NewIAPApple 建立Apple驗證器

func (*IAPApple) Finalize

func (this *IAPApple) Finalize()

Finalize 結束處理

func (*IAPApple) Initialize

func (this *IAPApple) Initialize() error

Initialize 初始化處理

func (*IAPApple) Verify

func (this *IAPApple) Verify(productID, certificate string) error

Verify 驗證憑證

type IAPAppleConfig

type IAPAppleConfig struct {
	Key      string        `yaml:"key"`      // 密鑰字串
	KeyID    string        `yaml:"keyID"`    // 密鑰ID
	Bundle   string        `yaml:"bundle"`   // 軟體包名稱
	Issuer   string        `yaml:"issuer"`   // 發行人名稱
	Sandbox  bool          `yaml:"sandbox"`  // 沙盒旗標
	Capacity int           `yaml:"capacity"` // 通道容量
	Retry    int           `yaml:"retry"`    // 重試次數
	Timeout  time.Duration `yaml:"timeout"`  // 驗證逾時時間
	Interval time.Duration `yaml:"interval"` // 驗證間隔時間
}

IAPAppleConfig Apple驗證設定資料

type IAPGoogle

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

IAPGoogle Google驗證器

func NewIAPGoogle

func NewIAPGoogle(config *IAPGoogleConfig) *IAPGoogle

NewIAPGoogle 建立Google驗證器

func (*IAPGoogle) Finalize

func (this *IAPGoogle) Finalize()

Finalize 結束處理

func (*IAPGoogle) Initialize

func (this *IAPGoogle) Initialize() error

Initialize 初始化處理

func (*IAPGoogle) Verify

func (this *IAPGoogle) Verify(productID, certificate string) error

Verify 驗證憑證

type IAPGoogleConfig

type IAPGoogleConfig struct {
	Key      string        `yaml:"key"`      // 密鑰字串
	Bundle   string        `yaml:"bundle"`   // 軟體包名稱
	Capacity int           `yaml:"capacity"` // 通道容量
	Timeout  time.Duration `yaml:"timeout"`  // 驗證逾時時間
	Interval time.Duration `yaml:"interval"` // 驗證間隔時間
}

IAPGoogleConfig Google驗證設定資料

type IAPOneStore added in v1.1.15

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

IAPOneStore OneStore驗證器

func NewIAPOneStore added in v1.1.15

func NewIAPOneStore(config *IAPOneStoreConfig) *IAPOneStore

NewIAPOneStore 建立OneStore驗證器

func (*IAPOneStore) Finalize added in v1.1.15

func (this *IAPOneStore) Finalize()

Finalize 結束處理

func (*IAPOneStore) Initialize added in v1.1.15

func (this *IAPOneStore) Initialize() error

Initialize 初始化處理

func (*IAPOneStore) Verify added in v1.1.15

func (this *IAPOneStore) Verify(productID, certificate string) error

Verify 驗證憑證

type IAPOneStoreConfig added in v1.1.15

type IAPOneStoreConfig struct {
	Global       bool          `yaml:"global"`       // true表示全球市場, false表示僅限韓國
	ClientID     string        `yaml:"clientID"`     // ClientID, 同時也就是 PackageName
	ClientSecret string        `yaml:"clientSecret"` // ClientSecret
	Sandbox      bool          `yaml:"sandbox"`      // 沙盒旗標
	Capacity     int           `yaml:"capacity"`     // 通道容量
	Retry        int           `yaml:"retry"`        // 重試次數
	Timeout      time.Duration `yaml:"timeout"`      // 驗證逾時時間
	Interval     time.Duration `yaml:"interval"`     // 驗證間隔時間
}

IAPOneStoreConfig OneStore驗證設定資料

Jump to

Keyboard shortcuts

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