Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientSession ¶
type LinkCodeRedeemResponse ¶
type LinkCodeRedeemResponse struct {
*protos.BaseResponse `json:",inline"`
Status string `json:"status"`
UserID int64 `json:"userID"`
Token string `json:"token"`
}
type LinkCodeResponse ¶
type LinkCodeResponse struct {
*protos.BaseResponse `json:",inline"`
Code string
ExpireAt int64
}
type LinkResponse ¶
type LinkResponse struct {
*protos.BaseResponse `json:",inline"`
UserID int `json:"userID"`
ProToken string `json:"token"`
}
type OkResponse ¶
type OkResponse struct {
Status string `json:"status"`
}
type PaymentMethodsResponse ¶
type PaymentMethodsResponse struct {
*protos.BaseResponse `json:",inline"`
Providers map[string][]*protos.PaymentMethod `json:"providers"`
Plans []*protos.Plan `json:"plans"`
Logo map[string]interface{} `json:"icons"`
}
type PaymentRedirectResponse ¶
type PaymentRedirectResponse struct {
*protos.BaseResponse `json:",inline"`
Redirect string `json:"redirect"`
}
type PlansResponse ¶
type PlansResponse struct {
*protos.BaseResponse `json:",inline"`
Plans []*protos.Plan `json:"plans"`
}
type ProClient ¶
type ProClient interface {
webclient.RESTClient
Client
EmailExists(ctx context.Context, email string) (*protos.BaseResponse, error)
DesktopPaymentMethods(ctx context.Context) ([]*protos.PaymentMethod, error)
PaymentMethods(ctx context.Context) (*PaymentMethodsResponse, error)
PaymentMethodsV4(ctx context.Context) (*PaymentMethodsResponse, error)
PaymentRedirect(ctx context.Context, req *protos.PaymentRedirectRequest) (*PaymentRedirectResponse, error)
FetchPaymentMethodsAndCache(ctx context.Context) (*PaymentMethodsResponse, error)
Plans(ctx context.Context) ([]*protos.Plan, error)
PollUserData(ctx context.Context, session ClientSession, maxElapsedTime time.Duration, client Client)
RedeemResellerCode(ctx context.Context, req *protos.RedeemResellerCodeRequest) (*protos.BaseResponse, error)
RetryCreateUser(ctx context.Context, ss ClientSession, maxElapsedTime time.Duration)
UserCreate(ctx context.Context) (*UserDataResponse, error)
UserData(ctx context.Context) (*UserDataResponse, error)
PurchaseRequest(ctx context.Context, data map[string]interface{}) (*PurchaseResponse, error)
RestorePurchase(ctx context.Context, req map[string]interface{}) (*OkResponse, error)
EmailRequest(ctx context.Context, email string) (*OkResponse, error)
ReferralAttach(ctx context.Context, refCode string) (bool, error)
//Device Linking
LinkCodeApprove(ctx context.Context, code string) (*protos.BaseResponse, error)
LinkCodeRequest(ctx context.Context, deviceName string) (*LinkCodeResponse, error)
LinkCodeRedeem(ctx context.Context, deviceName string, deviceCode string) (*LinkCodeRedeemResponse, error)
UserLinkCodeRequest(ctx context.Context, email string) (bool, error)
UserLinkValidate(ctx context.Context, code string) (*UserRecovery, error)
DeviceRemove(ctx context.Context, deviceId string) (*LinkResponse, error)
DeviceAdd(ctx context.Context, deviceName string) (bool, error)
}
type PurchaseResponse ¶
type RestorePurchaseRequest ¶
type RestorePurchaseRequest struct {
Provider string
Token string
DeviceName string
Email string
Code string
}
Request
type UserDataResponse ¶
type UserDataResponse struct {
*protos.BaseResponse `json:",inline"`
*protos.User `json:",inline"`
}
type UserRecovery ¶
Click to show internal directories.
Click to hide internal directories.