Documentation ¶
Index ¶
- type Client
- func (c *Client) AuthCodeURL() string
- func (c *Client) CancelSubscription(pkg, prod, token string) error
- func (c *Client) Setup(authCode string) (*oauth2.Token, error)
- func (c *Client) SetupWithToken(tok *oauth2.Token)
- func (c *Client) ValidateProduct(pkg, prod, token string) (*Product, error)
- func (c *Client) ValidateSubscription(pkg, prod, token string) (*Subscription, error)
- type ConsumptionState
- type Product
- type PurchaseState
- type Subscription
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client provides Cafebazaar in-app billing API.
func (*Client) AuthCodeURL ¶
AuthCodeURL returns URL to which user must be redirected to be asked for permission.
func (*Client) CancelSubscription ¶
CancelSubscription cancels a subscription purchase.
func (*Client) SetupWithToken ¶
func (*Client) ValidateProduct ¶
ValidateProduct checks the purchase and consumption status of an in-app product.
func (*Client) ValidateSubscription ¶
func (c *Client) ValidateSubscription(pkg, prod, token string) (*Subscription, error)
ValidateSubscription checks the purchase and consumption status of a subscription.
type ConsumptionState ¶
type ConsumptionState int
ConsumptionState is the data type for consumption states.
const ( Consumed ConsumptionState = 0 NotConsumed ConsumptionState = 1 )
List of consumption states.
type Product ¶
type Product struct { Kind string `json:"kind"` PurchaseTimeMillis int64 `json:"purchaseTime"` PurchaseState PurchaseState `json:"purchaseState"` ConsumptionState ConsumptionState `json:"consumptionState"` DeveloperPayload string `json:"developerPayload"` }
Product indicates the status of an in-app product purchase.
type PurchaseState ¶
type PurchaseState int
PurchaseState is the data type for purchase states.
const ( PurchaseDone PurchaseState = 0 PurchaseRefunded PurchaseState = 1 )
List of purchase states.
Click to show internal directories.
Click to hide internal directories.