Documentation
¶
Index ¶
- Variables
- type API
- func (a *API) Do(req *http.Request) (*http.Response, error)
- func (a *API) GenerateFingerprint(location string) DeviceFingerprint
- func (a *API) GenerateFingerprintString(location string) (string, error)
- func (a *API) GetCookie(name string) string
- func (a *API) GetCookies() []*http.Cookie
- func (a *API) GetCredentials() Credentials
- func (a *API) GetUserAgent() useragent.UserAgent
- func (a *API) Login(ctx context.Context) error
- func (a *API) SetCookies(cookies []*http.Cookie)
- type Browser
- type Credentials
- type DeviceFingerprint
- type Fonts
- type FormFields
- type Language
- type Latency
- type Options
- type Plugins
- type Screen
- type System
- type Timezone
- type Token
- type TokenMerchantBinding
- type TokenRules
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrRateLimited = errors.New("rate limited")
)
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
Options
// contains filtered or unexported fields
}
func (*API) GenerateFingerprint ¶ added in v0.0.5
func (a *API) GenerateFingerprint(location string) DeviceFingerprint
func (*API) GenerateFingerprintString ¶ added in v0.0.5
func (*API) GetCookies ¶
func (*API) GetCredentials ¶
func (a *API) GetCredentials() Credentials
func (*API) GetUserAgent ¶
func (*API) SetCookies ¶
type Credentials ¶
type DeviceFingerprint ¶ added in v0.0.5
type DeviceFingerprint struct {
UserAgent string `json:"userAgent"`
Timezone Timezone `json:"timezone"`
Screen Screen `json:"screen"`
Language Language `json:"language"`
Fonts Fonts `json:"fonts"`
Plugins Plugins `json:"plugins"`
CookieEnabled string `json:"cookieEnabled"`
JavaEnabled string `json:"javaEnabled"`
Canvas string `json:"canvas"`
TrueBrowser string `json:"trueBrowser"`
Tcn string `json:"tcn"`
Browser Browser `json:"browser"`
System System `json:"system"`
Latency Latency `json:"latency"`
FormFields FormFields `json:"formFields"`
Version string `json:"version"`
Timestamp string `json:"timestamp"`
Checksum string `json:"checksum"`
Rt []string `json:"rt"`
}
type FormFields ¶ added in v0.0.5
type Options ¶
type Options struct {
Logger *slog.Logger
Credentials Credentials
BrowserUserDataPath string
BrowserBinary string
}
type Plugins ¶ added in v0.0.5
type Plugins struct {
InstalledPlugins []string `json:"installedPlugins"`
}
type Token ¶ added in v0.0.5
type Token struct {
Token string `json:"token"`
Cvv string `json:"cvv"`
ExpirationDate string `json:"expirationDate"`
LastFour string `json:"lastFour"`
TokenReferenceID string `json:"tokenReferenceId"`
CreatedTimestamp string `json:"createdTimestamp"`
TokenName string `json:"tokenName"`
TokenStatus string `json:"tokenStatus"`
TokenType string `json:"tokenType"`
TokenRules TokenRules `json:"tokenRules"`
CardReferenceID string `json:"cardReferenceId"`
}
type TokenMerchantBinding ¶ added in v0.0.5
type TokenRules ¶ added in v0.0.5
type TokenRules struct {
AllowAuthorizations bool `json:"allowAuthorizations"`
MerchantBinding TokenMerchantBinding `json:"merchantBinding"`
}
Click to show internal directories.
Click to hide internal directories.