api

package
v0.0.0-...-b63d85c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2025 License: Unlicense Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HumanHTTPError

func HumanHTTPError(code int) string

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(opts ClientOptions) (*Client, error)

func (*Client) Search

func (c *Client) Search(ctx context.Context, reqBody Request) (*Response, int, error)

type ClientOptions

type ClientOptions struct {
	Endpoint  string
	ProxyURL  string
	NoProxy   bool
	Insecure  bool
	Timeout   time.Duration
	UserAgent string
	Logger    *util.Logger
}

type HTTPError

type HTTPError struct {
	StatusCode int
	Body       string
}

func AsHTTPError

func AsHTTPError(err error) (*HTTPError, bool)

func (*HTTPError) Error

func (e *HTTPError) Error() string

type QueryBlock

type QueryBlock struct {
	Include []string `json:"include,omitempty"`
	Exclude []string `json:"exclude,omitempty"`
}

type Request

type Request struct {
	APIKey     string      `json:"apiKey"`
	Domains    *QueryBlock `json:"domains,omitempty"`
	Subdomains *QueryBlock `json:"subdomains,omitempty"`
}

func BuildRequest

func BuildRequest(in RequestInput) Request

type RequestInput

type RequestInput struct {
	APIKey           string
	DomainInclude    []string
	DomainExclude    []string
	SubdomainInclude []string
	SubdomainExclude []string
}

type Response

type Response struct {
	DomainsCount int      `json:"domainsCount"`
	DomainsList  []string `json:"domainsList"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL