Versions in this module Expand all Collapse all v0 v0.1.0 Feb 14, 2026 Changes in this version + const DefaultBaseURL + const DefaultTimeout + func Bool(v bool) *bool + func Float64(v float64) *float64 + func Int(v int) *int + func IsAuthenticationError(err error) bool + func IsNotFoundError(err error) bool + func IsPermissionError(err error) bool + func IsRateLimitError(err error) bool + func IsValidationError(err error) bool + func String(v string) *string + type APIKey struct + CreatedAt *string + ID string + Name *string + PlainTextToken *string + type AnalyticsParams struct + EndDate *string + Period string + StartDate *string + type AnalyticsService struct + func (s *AnalyticsService) DomainBreakdown(ctx context.Context, params *AnalyticsParams) (*DomainBreakdownResponse, error) + func (s *AnalyticsService) Requests(ctx context.Context, params *AnalyticsParams) (*TimeSeriesResponse, error) + func (s *AnalyticsService) RequestsTotal(ctx context.Context, params *AnalyticsParams) (*TotalResponse, error) + func (s *AnalyticsService) Traffic(ctx context.Context, params *AnalyticsParams) (*TimeSeriesResponse, error) + func (s *AnalyticsService) TrafficTotal(ctx context.Context, params *AnalyticsParams) (*TotalResponse, error) + type AuthService struct + func (s *AuthService) DisconnectSocial(ctx context.Context, provider string) error + func (s *AuthService) Login(ctx context.Context, params LoginParams) (*LoginResponse, error) + func (s *AuthService) Logout(ctx context.Context) error + func (s *AuthService) OAuthRedirect(ctx context.Context, provider string) (any, error) + func (s *AuthService) Register(ctx context.Context, params RegisterParams) (*RegisterResponse, error) + func (s *AuthService) SocialAccounts(ctx context.Context) ([]SocialAccount, error) + func (s *AuthService) SupportedProviders(ctx context.Context) ([]SupportedProvider, error) + func (s *AuthService) User(ctx context.Context) (*User, error) + type BulkDeleteResponse struct + Deleted int + Failed int + NotFound int + Requested int + Skipped int + type ChangePasswordParams struct + CurrentPassword string + Password string + PasswordConfirmation string + TwofaCode *string + type City struct + Availability *string + Code string + ConnectionType *string + CountryCode string + Name string + RegionCode *string + type CityParams struct + RegionCode *string + type Client struct + Analytics *AnalyticsService + Auth *AuthService + Coupons *CouponsService + Email *EmailService + Locations *LocationsService + Payments *PaymentsService + Plans *PlansService + Profile *ProfileService + ProxyPresets *ProxyPresetsService + SubUserGroups *SubUserGroupsService + SubUsers *SubUsersService + TwoFactor *TwoFactorService + func NewClient(apiKey string, opts ...Option) *Client + type Country struct + Availability string + Code string + ConnectionType string + Name string + type Coupon struct + Code string + Data any + Discount *float64 + FinalAmount *float64 + ID string + Type string + type CouponParams struct + Code string + Currency *string + OrderSum *float64 + PlanID *string + type CouponResponse struct + Coupon *Coupon + Success bool + type CouponsService struct + func (s *CouponsService) Apply(ctx context.Context, params CouponParams) (*CouponResponse, error) + func (s *CouponsService) Redeem(ctx context.Context, code string) (*CouponResponse, error) + func (s *CouponsService) Validate(ctx context.Context, params CouponParams) (*CouponResponse, error) + type CreatePaymentParams struct + CouponCode *string + CryptocurrencyCode string + Gate string + PlanID string + Type string + type CreateProxyPresetParams struct + Data map[string]any + Name string + type CreateSubUserGroupParams struct + Description *string + Name string + type CreateSubUserParams struct + IsTrafficLimited bool + Name *string + Notes *string + ProxyPassword string + SubUserGroupID *string + TrafficLimit *string + type CryptoInfo struct + Code string + Currency string + Icon *string + Label *string + Network string + type Cryptocurrency struct + Code string + Currency string + Icon *string + Label *string + Network string + type DomainBreakdownItem struct + Bandwidth int + Domain string + Requests int + type DomainBreakdownResponse struct + Items []DomainBreakdownItem + type EmailChangeResponse struct + Message string + type EmailService struct + func (s *EmailService) CancelChange(ctx context.Context) (*EmailChangeResponse, error) + func (s *EmailService) ConfirmChange(ctx context.Context, token string) (*EmailChangeResponse, error) + func (s *EmailService) RequestChange(ctx context.Context, params RequestEmailChangeParams) (*EmailChangeResponse, error) + func (s *EmailService) ResendVerification(ctx context.Context) (*EmailChangeResponse, error) + type Error struct + Errors any + Message string + StatusCode int + func (e *Error) Error() string + type ISP struct + Availability *string + Code string + ConnectionType *string + CountryCode string + Name string + type LocationParams struct + ConnectionType *string + Limit *int + Name *string + Offset *int + type LocationsService struct + func (s *LocationsService) Cities(ctx context.Context, params *CityParams) ([]City, error) + func (s *LocationsService) Countries(ctx context.Context, params *LocationParams) ([]Country, error) + func (s *LocationsService) ISPs(ctx context.Context, params *RegionParams) ([]ISP, error) + func (s *LocationsService) Regions(ctx context.Context, params *RegionParams) ([]Region, error) + func (s *LocationsService) Zipcodes(ctx context.Context, params *ZipcodeParams) ([]Zipcode, error) + type LoginParams struct + Email string + Password string + TwofaCode *string + type LoginResponse struct + AccessToken string + Requires2FA bool + TokenType string + type Option func(*Client) + func WithBaseURL(url string) Option + func WithHTTPClient(hc *http.Client) Option + func WithTimeout(d time.Duration) Option + type Payment struct + Amount *float64 + CreatedAt *string + Currency *string + ID string + Status string + Type string + type PaymentCreateResponse struct + PaymentID string + Success bool + type PaymentDetails struct + AmountUSD float64 + CompletedAt *string + Crypto CryptoInfo + CryptoAmount float64 + ExpiresAt *string + PayAddress string + Status string + TxHash *string + type PaymentsService struct + func (s *PaymentsService) Check(ctx context.Context, id string) (*PaymentDetails, error) + func (s *PaymentsService) Create(ctx context.Context, params CreatePaymentParams) (*PaymentCreateResponse, error) + func (s *PaymentsService) Cryptocurrencies(ctx context.Context) ([]Cryptocurrency, error) + func (s *PaymentsService) Get(ctx context.Context, id string) (*PaymentDetails, error) + func (s *PaymentsService) Invoice(ctx context.Context, id string, format string) (*http.Response, error) + func (s *PaymentsService) List(ctx context.Context) ([]Payment, error) + type PlansService struct + func (s *PlansService) GetRegular(ctx context.Context, name string) (*RegularPlan, error) + func (s *PlansService) GetSubscription(ctx context.Context, name string) (*SubscriptionPlan, error) + func (s *PlansService) ListRegular(ctx context.Context) ([]RegularPlan, error) + func (s *PlansService) ListSubscriptions(ctx context.Context) ([]SubscriptionPlan, error) + func (s *PlansService) PricingRegular(ctx context.Context) ([]any, error) + func (s *PlansService) PricingSubscriptions(ctx context.Context) ([]any, error) + type Preferences struct + Data map[string]any + type ProfileService struct + func (s *ProfileService) CreateAPIKey(ctx context.Context, name *string) (*APIKey, error) + func (s *ProfileService) DeleteAPIKey(ctx context.Context, id string) error + func (s *ProfileService) GetPreferences(ctx context.Context) (*Preferences, error) + func (s *ProfileService) ListAPIKeys(ctx context.Context) ([]APIKey, error) + func (s *ProfileService) RegenerateAPIKey(ctx context.Context, id string) (*APIKey, error) + func (s *ProfileService) UpdatePreferences(ctx context.Context, preferences map[string]any) (*Preferences, error) + type ProxyPreset struct + CreatedAt *string + Data map[string]any + ID string + Name string + type ProxyPresetsService struct + func (s *ProxyPresetsService) Create(ctx context.Context, params CreateProxyPresetParams) (*ProxyPreset, error) + func (s *ProxyPresetsService) Delete(ctx context.Context, id string) error + func (s *ProxyPresetsService) Get(ctx context.Context, id string) (*ProxyPreset, error) + func (s *ProxyPresetsService) List(ctx context.Context) ([]ProxyPreset, error) + func (s *ProxyPresetsService) Update(ctx context.Context, id string, params UpdateProxyPresetParams) (*ProxyPreset, error) + type RateLimitError struct + Errors any + Message string + RetryAfter int + StatusCode int + func AsRateLimitError(err error) (*RateLimitError, bool) + func (e *RateLimitError) Error() string + type RecoveryCodes struct + Codes []string + type Region struct + Availability *string + Code string + ConnectionType *string + CountryCode string + Name string + type RegionParams struct + CountryCode *string + type RegisterParams struct + Email string + Name string + Password string + PasswordConfirmation string + ReferralCode *string + UTMCampaign *string + UTMMedium *string + UTMSource *string + type RegisterResponse struct + AccessToken string + Message string + TokenType string + type RegularPlan struct + Currency string + GB int + ID string + Name string + PricePerGB float64 + PriceTotal float64 + type RequestEmailChangeParams struct + Email string + TwofaCode *string + type ResetUsageResponse struct + Reset int + type SocialAccount struct + ConnectedAt *string + Email *string + Provider string + type SubUser struct + CreatedAt string + IsDefaultUser bool + IsTrafficLimited bool + LifecycleStatus string + Name *string + Notes *string + ProxyUsername string + SubUserGroupID *string + TrafficLimit int + UUID string + UsedTraffic int + type SubUserGroup struct + CreatedAt string + Description *string + ID string + Name string + SubUsers []any + SubUsersCount int + type SubUserGroupsService struct + func (s *SubUserGroupsService) Create(ctx context.Context, params CreateSubUserGroupParams) (*SubUserGroup, error) + func (s *SubUserGroupsService) Delete(ctx context.Context, id string) error + func (s *SubUserGroupsService) Get(ctx context.Context, id string) (*SubUserGroup, error) + func (s *SubUserGroupsService) List(ctx context.Context) ([]SubUserGroup, error) + func (s *SubUserGroupsService) Update(ctx context.Context, id string, params UpdateSubUserGroupParams) (*SubUserGroup, error) + type SubUsersService struct + func (s *SubUsersService) BulkDelete(ctx context.Context, ids []string) (*BulkDeleteResponse, error) + func (s *SubUsersService) BulkMoveToGroup(ctx context.Context, ids []string, groupID *string) (any, error) + func (s *SubUsersService) Create(ctx context.Context, params CreateSubUserParams) (*SubUser, error) + func (s *SubUsersService) Delete(ctx context.Context, id string) error + func (s *SubUsersService) Get(ctx context.Context, id string) (*SubUser, error) + func (s *SubUsersService) List(ctx context.Context) ([]SubUser, error) + func (s *SubUsersService) ResetUsage(ctx context.Context, ids []string) (*ResetUsageResponse, error) + func (s *SubUsersService) Update(ctx context.Context, id string, params UpdateSubUserParams) (*SubUser, error) + type SubscriptionPlan struct + GB int + ID string + Name string + Period string + PricePerGB float64 + PriceTotal float64 + RolloverEnabled bool + type SupportedProvider struct + Name string + Slug string + type TimeSeriesResponse struct + Data []int + Labels []string + type TotalResponse struct + Total int + type TrafficInfo struct + RegularBytes int + RegularHuman string + Subscription *string + SubscriptionBytes int + SubscriptionExpiresAt *string + SubscriptionHuman string + SubscriptionStartsAt *string + TotalBytes int + TotalHuman string + type TwoFactorEnableResponse struct + QR string + RecoveryCodes []string + Secret string + type TwoFactorService struct + func (s *TwoFactorService) ChangePassword(ctx context.Context, params ChangePasswordParams) (any, error) + func (s *TwoFactorService) Confirm(ctx context.Context, code string) (any, error) + func (s *TwoFactorService) Disable(ctx context.Context, twofaCode string) (any, error) + func (s *TwoFactorService) DisableByRecovery(ctx context.Context, recoveryCode string) (any, error) + func (s *TwoFactorService) Enable(ctx context.Context) (*TwoFactorEnableResponse, error) + func (s *TwoFactorService) QRCode(ctx context.Context) (*TwoFactorEnableResponse, error) + func (s *TwoFactorService) RecoveryCodes(ctx context.Context) (*RecoveryCodes, error) + func (s *TwoFactorService) Status(ctx context.Context) (*TwoFactorStatus, error) + type TwoFactorStatus struct + Enabled bool + type UpdateProxyPresetParams struct + Data map[string]any + Name *string + type UpdateSubUserGroupParams struct + Description *string + Name *string + type UpdateSubUserParams struct + IsTrafficLimited *bool + Name *string + Notes *string + ProxyPassword *string + TrafficLimit *string + type User struct + Email string + Name string + Traffic TrafficInfo + UUID string + type Zipcode struct + Availability *string + CityCode *string + Code string + ConnectionType *string + CountryCode string + Name string + type ZipcodeParams struct + CityCode *string + CountryCode *string