Versions in this module Expand all Collapse all v0 v0.1.1 Oct 19, 2026 v0.1.0 Oct 14, 2026 Changes in this version + const APIRoot + const ASCIIWhitespace + const DefaultAPITimeout + const DefaultBaseURL + const DefaultCheckTimeout + const DefaultPageSize + const DefaultProvider + const DefaultTarget + var ByOffset = Paging + var ByPageNumber = Paging + var ErrAPI = errors.New("nodemaven: api") + var ErrAuth = errors.New("nodemaven: auth") + var ErrCheck = errors.New("nodemaven: check") + var ErrCredentials = errors.New("nodemaven: credentials") + var ErrNotFound = errors.New("nodemaven: not found") + var ErrParam = errors.New("nodemaven: parameter") + var ErrProvider = errors.New("nodemaven: provider") + var ErrRateLimit = errors.New("nodemaven: rate limit") + var ISPCitiesPaging = Paging + var WhitelistPaging = Paging + func Available() []string + type BrowserProxy struct + Password string + Server string + Username string + func (b BrowserProxy) GoString() string + func (b BrowserProxy) String() string + type Check struct + Elapsed time.Duration + ExitIP string + Headers []Header + Meaning string + Reason string + Server string + Status int + func (c *Check) Header(name string) (string, bool) + func (c *Check) OK() bool + func (c *Check) String() string + type Client struct + func NewClient(opts ...ClientOption) (*Client, error) + func (c *Client) All(ctx context.Context, page *Page) ([]any, error) + func (c *Client) Cities(ctx context.Context, filters url.Values) (*Page, error) + func (c *Client) Countries(ctx context.Context, filters url.Values) (*Page, error) + func (c *Client) CreateSubUser(ctx context.Context, proxyUsername, proxyPassword string, extra map[string]any) (any, error) + func (c *Client) DeleteSubUser(ctx context.Context, id any) (any, error) + func (c *Client) DeleteWhitelistIP(ctx context.Context, ipID any) (any, error) + func (c *Client) DomainStatistics(ctx context.Context, proxyUsername string, filters url.Values) (*Page, error) + func (c *Client) GoString() string + func (c *Client) ISPCities(ctx context.Context, filters url.Values) (*Page, error) + func (c *Client) ISPRegions(ctx context.Context, filters url.Values) (*Page, error) + func (c *Client) ISPs(ctx context.Context, filters url.Values) (*Page, error) + func (c *Client) Iterate(ctx context.Context, page *Page) *Rows + func (c *Client) Me(ctx context.Context) (map[string]any, error) + func (c *Client) Regions(ctx context.Context, filters url.Values) (*Page, error) + func (c *Client) ResetSubUserUsage(ctx context.Context, ids []any) (any, error) + func (c *Client) StatisticsData(ctx context.Context, proxyUsername string, filters url.Values) (map[string]any, error) + func (c *Client) StatisticsRequests(ctx context.Context, proxyUsername string, filters url.Values) (map[string]any, error) + func (c *Client) String() string + func (c *Client) SubUsers(ctx context.Context, filters url.Values) (*Page, error) + func (c *Client) UpdateSubUser(ctx context.Context, id any, changes map[string]any) (any, error) + func (c *Client) UpsertWhitelistIP(ctx context.Context, ip string, portsCount int, extra map[string]any) (map[string]any, error) + func (c *Client) Validate(ctx context.Context, proxy *Proxy) ([]string, error) + func (c *Client) WhitelistIP(ctx context.Context, ipID any) (map[string]any, error) + func (c *Client) WhitelistIPs(ctx context.Context, filters url.Values) (*Page, error) + func (c *Client) ZipCodeCities(ctx context.Context, filters url.Values) (*Page, error) + func (c *Client) ZipCodeRegions(ctx context.Context, filters url.Values) (*Page, error) + func (c *Client) ZipCodes(ctx context.Context, filters url.Values) (*Page, error) + type ClientOption func(*clientSettings) + func WithAPIKey(key string) ClientOption + func WithBaseURL(base string) ClientOption + func WithHTTPClient(client *http.Client) ClientOption + func WithTimeout(timeout time.Duration) ClientOption + type Connect struct + ExitIPHeaders []string + Password string + Reactions map[string]string + Server string + Target string + Timeout time.Duration + Username string + func NewConnect(server, username, password string) Connect + func (c Connect) GoString() string + func (c Connect) Send(ctx context.Context) (*Check, error) + func (c Connect) String() string + type Error struct + Kind error + Message string + Status int + func (e *Error) Error() string + func (e *Error) Is(target error) bool + func (e *Error) Unwrap() error + type Header struct + Name string + Value string + type Option func(*settings) + func WithHost(host string) Option + func WithLogin(login string) Option + func WithParam(name, value string) Option + func WithPassword(password string) Option + func WithPort(port int) Option + func WithProvider(p *Provider) Option + type Page struct + Count *int64 + Next string + Previous string + Rows []any + func (p *Page) Len() int + type Paging struct + CursorCountsRows bool + CursorKey string + DefaultSize int + EndsWithNotFound bool + FirstCursor int + SizeKey string + type Param struct + Name string + Value string + type Provider struct + func Load(id string) (*Provider, error) + func LoadFile(path string) (*Provider, error) + func LoadFileAs(path, id string) (*Provider, error) + func LoadString(text, id string) (*Provider, error) + func NewProvider(spec ProviderSpec) (*Provider, error) + func (p *Provider) Allowed(name string) []string + func (p *Provider) ExitIPHeaders() []string + func (p *Provider) Host() string + func (p *Provider) ID() string + func (p *Provider) IsMeasured() bool + func (p *Provider) KnownParams() []string + func (p *Provider) Label() string + func (p *Provider) Normalized(name, value string) string + func (p *Provider) Normalizes(name string) bool + func (p *Provider) Notes() string + func (p *Provider) PairSeparator() string + func (p *Provider) Port() int + func (p *Provider) Reaction(status int) string + func (p *Provider) Separator() string + func (p *Provider) SessionParam() string + func (p *Provider) Spell(name string) string + func (p *Provider) Status() string + type ProviderSpec struct + Aliases map[string]string + ConnectReactions map[int]string + ExitIPHeaders []string + Host string + ID string + KnownParams []string + Label string + Normalize []string + Notes string + PairSeparator string + Port int + Prefix string + Separator string + SessionParam string + Status string + Values map[string][]string + type Proxy struct + func New(opts ...Option) (*Proxy, error) + func (p *Proxy) Browser() BrowserProxy + func (p *Proxy) Check(ctx context.Context) (*Check, error) + func (p *Proxy) Connect() Connect + func (p *Proxy) GoString() string + func (p *Proxy) HTTPProxy() func(*http.Request) (*url.URL, error) + func (p *Proxy) Param(name string) (string, bool) + func (p *Proxy) Params() []Param + func (p *Proxy) Provider() *Provider + func (p *Proxy) ProxyURL() *url.URL + func (p *Proxy) Server() string + func (p *Proxy) Session(id string) (*Proxy, error) + func (p *Proxy) Sessions(count int) ([]*Proxy, error) + func (p *Proxy) SessionsOfLength(count, length int) ([]*Proxy, error) + func (p *Proxy) String() string + func (p *Proxy) URL() string + func (p *Proxy) URLWithScheme(scheme string) string + func (p *Proxy) Username() string + func (p *Proxy) With(name, value string) (*Proxy, error) + func (p *Proxy) Without(name string) (*Proxy, error) + type Rows struct + MaxPages int + func (r *Rows) Err() error + func (r *Rows) Next() bool + func (r *Rows) Row() any