api

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: MIT Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package api provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAccountCreateApikeyRequest

func NewAccountCreateApikeyRequest(server string, body AccountCreateApikeyJSONRequestBody) (*http.Request, error)

NewAccountCreateApikeyRequest calls the generic AccountCreateApikey builder with application/json body

func NewAccountCreateApikeyRequestWithBody

func NewAccountCreateApikeyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewAccountCreateApikeyRequestWithBody constructs an http.Request for the AccountCreateApikey method, with any body, and a specified content type

func NewAccountIdentityRequest

func NewAccountIdentityRequest(server string) (*http.Request, error)

NewAccountIdentityRequest constructs an http.Request for the AccountIdentity method

func NewAccountListApikeysRequest

func NewAccountListApikeysRequest(server string) (*http.Request, error)

NewAccountListApikeysRequest constructs an http.Request for the AccountListApikeys method

func NewAccountOrgMembersRequest

func NewAccountOrgMembersRequest(server string) (*http.Request, error)

NewAccountOrgMembersRequest constructs an http.Request for the AccountOrgMembers method

func NewAccountOrgRequest

func NewAccountOrgRequest(server string) (*http.Request, error)

NewAccountOrgRequest constructs an http.Request for the AccountOrg method

func NewAccountRevealApikeyRequest

func NewAccountRevealApikeyRequest(server string, id ApikeyIDParam) (*http.Request, error)

NewAccountRevealApikeyRequest constructs an http.Request for the AccountRevealApikey method

func NewAccountRevokeApikeyRequest

func NewAccountRevokeApikeyRequest(server string, id ApikeyIDParam) (*http.Request, error)

NewAccountRevokeApikeyRequest constructs an http.Request for the AccountRevokeApikey method

func NewAccountRotateApikeyRequest

func NewAccountRotateApikeyRequest(server string, id ApikeyIDParam) (*http.Request, error)

NewAccountRotateApikeyRequest constructs an http.Request for the AccountRotateApikey method

func NewDatabaseChecksumV2Request

func NewDatabaseChecksumV2Request(server string, params *DatabaseChecksumV2Params) (*http.Request, error)

NewDatabaseChecksumV2Request constructs an http.Request for the DatabaseChecksumV2 method

func NewDatabaseMetadataV2Request

func NewDatabaseMetadataV2Request(server string, params *DatabaseMetadataV2Params) (*http.Request, error)

NewDatabaseMetadataV2Request constructs an http.Request for the DatabaseMetadataV2 method

func NewDownloadDatabaseV2Request

func NewDownloadDatabaseV2Request(server string, params *DownloadDatabaseV2Params) (*http.Request, error)

NewDownloadDatabaseV2Request constructs an http.Request for the DownloadDatabaseV2 method

func NewListDatabasesRequest

func NewListDatabasesRequest(server string) (*http.Request, error)

NewListDatabasesRequest constructs an http.Request for the ListDatabases method

func NewListDownloadsRequest

func NewListDownloadsRequest(server string, params *ListDownloadsParams) (*http.Request, error)

NewListDownloadsRequest constructs an http.Request for the ListDownloads method

func NewLookupAsnRequest

func NewLookupAsnRequest(server string, asn string) (*http.Request, error)

NewLookupAsnRequest constructs an http.Request for the LookupAsn method

func NewLookupBatchRequest

func NewLookupBatchRequest(server string, body LookupBatchJSONRequestBody) (*http.Request, error)

NewLookupBatchRequest calls the generic LookupBatch builder with application/json body

func NewLookupBatchRequestWithBody

func NewLookupBatchRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewLookupBatchRequestWithBody constructs an http.Request for the LookupBatch method, with any body, and a specified content type

func NewLookupDomainRequest

func NewLookupDomainRequest(server string, domain string) (*http.Request, error)

NewLookupDomainRequest constructs an http.Request for the LookupDomain method

func NewLookupIPRequest

func NewLookupIPRequest(server string, ip string, params *LookupIPParams) (*http.Request, error)

NewLookupIPRequest constructs an http.Request for the LookupIP method

func NewLookupMyIPRequest

func NewLookupMyIPRequest(server string, params *LookupMyIPParams) (*http.Request, error)

NewLookupMyIPRequest constructs an http.Request for the LookupMyIP method

func NewMyEntitlementRequest

func NewMyEntitlementRequest(server string) (*http.Request, error)

NewMyEntitlementRequest constructs an http.Request for the MyEntitlement method

func NewOauthAuthorizeRequest

func NewOauthAuthorizeRequest(server string, params *OauthAuthorizeParams) (*http.Request, error)

NewOauthAuthorizeRequest constructs an http.Request for the OauthAuthorize method

func NewOauthDeviceAuthorizationRequestWithBody

func NewOauthDeviceAuthorizationRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewOauthDeviceAuthorizationRequestWithBody constructs an http.Request for the OauthDeviceAuthorization method, with any body, and a specified content type

func NewOauthDeviceAuthorizationRequestWithFormdataBody

func NewOauthDeviceAuthorizationRequestWithFormdataBody(server string, body OauthDeviceAuthorizationFormdataRequestBody) (*http.Request, error)

NewOauthDeviceAuthorizationRequestWithFormdataBody calls the generic OauthDeviceAuthorization builder with application/x-www-form-urlencoded body

func NewOauthMetadataRequest

func NewOauthMetadataRequest(server string) (*http.Request, error)

NewOauthMetadataRequest constructs an http.Request for the OauthMetadata method

func NewOauthRegisterRequest

func NewOauthRegisterRequest(server string, body OauthRegisterJSONRequestBody) (*http.Request, error)

NewOauthRegisterRequest calls the generic OauthRegister builder with application/json body

func NewOauthRegisterRequestWithBody

func NewOauthRegisterRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewOauthRegisterRequestWithBody constructs an http.Request for the OauthRegister method, with any body, and a specified content type

func NewOauthRevokeRequestWithBody

func NewOauthRevokeRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewOauthRevokeRequestWithBody constructs an http.Request for the OauthRevoke method, with any body, and a specified content type

func NewOauthRevokeRequestWithFormdataBody

func NewOauthRevokeRequestWithFormdataBody(server string, body OauthRevokeFormdataRequestBody) (*http.Request, error)

NewOauthRevokeRequestWithFormdataBody calls the generic OauthRevoke builder with application/x-www-form-urlencoded body

func NewOauthTokenRequestWithBody

func NewOauthTokenRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewOauthTokenRequestWithBody constructs an http.Request for the OauthToken method, with any body, and a specified content type

func NewOauthTokenRequestWithFormdataBody

func NewOauthTokenRequestWithFormdataBody(server string, body OauthTokenFormdataRequestBody) (*http.Request, error)

NewOauthTokenRequestWithFormdataBody calls the generic OauthToken builder with application/x-www-form-urlencoded body

Types

type AbuseContact

type AbuseContact struct {
	// Address Its postal address. On a paid plan or a free key's full answers.
	Address *string `json:"address,omitempty"`

	// Country ISO 3166 country code. On a paid plan or a free key's full answers.
	Country *string `json:"country,omitempty"`

	// Email Where to report abuse from the address. On a paid plan or a free key's full answers.
	Email string `json:"email"`

	// Name The contact. On a paid plan or a free key's full answers.
	Name *string `json:"name,omitempty"`

	// Network The registry block it was derived from. On a paid plan or a free key's full answers.
	Network *string `json:"network,omitempty"`

	// Phone Its phone number. On a paid plan or a free key's full answers.
	Phone *string `json:"phone,omitempty"`

	// UnvalidatedSince Since when it has not. On a paid plan or a free key's full answers.
	UnvalidatedSince *string `json:"unvalidated_since,omitempty"`

	// Validated ARIN reports the contact answered its yearly validation. On a paid plan or a free key's full answers.
	Validated *bool `json:"validated,omitempty"`
}

AbuseContact Where to report abuse, from IP Abuse Contact.

type AccountCreateApikeyJSONRequestBody

type AccountCreateApikeyJSONRequestBody = AccountCreateApikeyRequest

AccountCreateApikeyJSONRequestBody defines body for AccountCreateApikey for application/json ContentType.

type AccountCreateApikeyRequest

type AccountCreateApikeyRequest struct {
	// AllowedScopes What the new key may do. Omit for a key that carries no named scope, which is the safe default.
	AllowedScopes *[]string `json:"allowed_scopes,omitempty"`

	// Name A label you will recognize later. Shown wherever the key is listed.
	Name string `json:"name"`
}

AccountCreateApikeyRequest defines model for AccountCreateApikeyRequest.

type AccountCreateApikeyResponse

type AccountCreateApikeyResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *AccountCreatedApikey
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *AccountInvalid
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *AccountUnauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *AccountForbidden
}

func ParseAccountCreateApikeyResponse

func ParseAccountCreateApikeyResponse(rsp *http.Response) (*AccountCreateApikeyResponse, error)

ParseAccountCreateApikeyResponse parses an HTTP response from a AccountCreateApikeyWithResponse call

func (AccountCreateApikeyResponse) ContentType

func (r AccountCreateApikeyResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (AccountCreateApikeyResponse) GetBody

func (r AccountCreateApikeyResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (AccountCreateApikeyResponse) GetJSON200

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (AccountCreateApikeyResponse) GetJSON400

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (AccountCreateApikeyResponse) GetJSON401

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (AccountCreateApikeyResponse) GetJSON403

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (AccountCreateApikeyResponse) Status

Status returns HTTPResponse.Status

func (AccountCreateApikeyResponse) StatusCode

func (r AccountCreateApikeyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AccountCreatedApikey

type AccountCreatedApikey struct {
	AllowedCidrs  *[]string          `json:"allowed_cidrs,omitempty"`
	AllowedScopes *[]string          `json:"allowed_scopes,omitempty"`
	ID            openapi_types.UUID `json:"id"`

	// Key The secret. Returned once, here, and never again.
	Key       string  `json:"key"`
	KeyPrefix *string `json:"key_prefix,omitempty"`
	Name      *string `json:"name,omitempty"`
	Rc        string  `json:"rc"`
}

AccountCreatedApikey defines model for AccountCreatedApikey.

type AccountForbidden

type AccountForbidden = AccountRc

AccountForbidden defines model for AccountForbidden.

type AccountIdentityResponse

type AccountIdentityResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *Identity
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *AccountUnauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *AccountForbidden
}

func ParseAccountIdentityResponse

func ParseAccountIdentityResponse(rsp *http.Response) (*AccountIdentityResponse, error)

ParseAccountIdentityResponse parses an HTTP response from a AccountIdentityWithResponse call

func (AccountIdentityResponse) ContentType

func (r AccountIdentityResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (AccountIdentityResponse) GetBody

func (r AccountIdentityResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (AccountIdentityResponse) GetJSON200

func (r AccountIdentityResponse) GetJSON200() *Identity

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (AccountIdentityResponse) GetJSON401

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (AccountIdentityResponse) GetJSON403

func (r AccountIdentityResponse) GetJSON403() *AccountForbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (AccountIdentityResponse) Status

func (r AccountIdentityResponse) Status() string

Status returns HTTPResponse.Status

func (AccountIdentityResponse) StatusCode

func (r AccountIdentityResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AccountInvalid

type AccountInvalid = AccountRc

AccountInvalid defines model for AccountInvalid.

type AccountListApikeysResponse

type AccountListApikeysResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *ApikeyList
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *AccountUnauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *AccountForbidden
}

func ParseAccountListApikeysResponse

func ParseAccountListApikeysResponse(rsp *http.Response) (*AccountListApikeysResponse, error)

ParseAccountListApikeysResponse parses an HTTP response from a AccountListApikeysWithResponse call

func (AccountListApikeysResponse) ContentType

func (r AccountListApikeysResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (AccountListApikeysResponse) GetBody

func (r AccountListApikeysResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (AccountListApikeysResponse) GetJSON200

func (r AccountListApikeysResponse) GetJSON200() *ApikeyList

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (AccountListApikeysResponse) GetJSON401

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (AccountListApikeysResponse) GetJSON403

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (AccountListApikeysResponse) Status

Status returns HTTPResponse.Status

func (AccountListApikeysResponse) StatusCode

func (r AccountListApikeysResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AccountNotFound

type AccountNotFound = AccountRc

AccountNotFound defines model for AccountNotFound.

type AccountOrg

type AccountOrg struct {
	Created *time.Time         `json:"created,omitempty"`
	ID      openapi_types.UUID `json:"id"`
	Name    *string            `json:"name,omitempty"`
}

AccountOrg defines model for AccountOrg.

type AccountOrgMembersResponse

type AccountOrgMembersResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *AccountRc
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *AccountUnauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *AccountForbidden
}

func ParseAccountOrgMembersResponse

func ParseAccountOrgMembersResponse(rsp *http.Response) (*AccountOrgMembersResponse, error)

ParseAccountOrgMembersResponse parses an HTTP response from a AccountOrgMembersWithResponse call

func (AccountOrgMembersResponse) ContentType

func (r AccountOrgMembersResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (AccountOrgMembersResponse) GetBody

func (r AccountOrgMembersResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (AccountOrgMembersResponse) GetJSON200

func (r AccountOrgMembersResponse) GetJSON200() *AccountRc

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (AccountOrgMembersResponse) GetJSON401

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (AccountOrgMembersResponse) GetJSON403

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (AccountOrgMembersResponse) Status

func (r AccountOrgMembersResponse) Status() string

Status returns HTTPResponse.Status

func (AccountOrgMembersResponse) StatusCode

func (r AccountOrgMembersResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AccountOrgRef

type AccountOrgRef struct {
	ID openapi_types.UUID `json:"id"`
}

AccountOrgRef defines model for AccountOrgRef.

type AccountOrgResponse

type AccountOrgResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *AccountOrgWrap
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *AccountUnauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *AccountForbidden
}

func ParseAccountOrgResponse

func ParseAccountOrgResponse(rsp *http.Response) (*AccountOrgResponse, error)

ParseAccountOrgResponse parses an HTTP response from a AccountOrgWithResponse call

func (AccountOrgResponse) ContentType

func (r AccountOrgResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (AccountOrgResponse) GetBody

func (r AccountOrgResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (AccountOrgResponse) GetJSON200

func (r AccountOrgResponse) GetJSON200() *AccountOrgWrap

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (AccountOrgResponse) GetJSON401

func (r AccountOrgResponse) GetJSON401() *AccountUnauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (AccountOrgResponse) GetJSON403

func (r AccountOrgResponse) GetJSON403() *AccountForbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (AccountOrgResponse) Status

func (r AccountOrgResponse) Status() string

Status returns HTTPResponse.Status

func (AccountOrgResponse) StatusCode

func (r AccountOrgResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AccountOrgWrap

type AccountOrgWrap struct {
	Org AccountOrg `json:"org"`
	Rc  string     `json:"rc"`
}

AccountOrgWrap defines model for AccountOrgWrap.

type AccountRc

type AccountRc struct {
	// Rc The outcome. `SUCCESS` on success; otherwise the reason.
	Rc string `json:"rc"`
}

AccountRc defines model for AccountRc.

type AccountRevealApikeyResponse

type AccountRevealApikeyResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *AccountRevealedApikey
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *AccountUnauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *AccountForbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *AccountRc
}

func ParseAccountRevealApikeyResponse

func ParseAccountRevealApikeyResponse(rsp *http.Response) (*AccountRevealApikeyResponse, error)

ParseAccountRevealApikeyResponse parses an HTTP response from a AccountRevealApikeyWithResponse call

func (AccountRevealApikeyResponse) ContentType

func (r AccountRevealApikeyResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (AccountRevealApikeyResponse) GetBody

func (r AccountRevealApikeyResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (AccountRevealApikeyResponse) GetJSON200

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (AccountRevealApikeyResponse) GetJSON401

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (AccountRevealApikeyResponse) GetJSON403

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (AccountRevealApikeyResponse) GetJSON404

func (r AccountRevealApikeyResponse) GetJSON404() *AccountRc

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (AccountRevealApikeyResponse) Status

Status returns HTTPResponse.Status

func (AccountRevealApikeyResponse) StatusCode

func (r AccountRevealApikeyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AccountRevealedApikey

type AccountRevealedApikey struct {
	// Key The secret.
	Key string `json:"key"`
	Rc  string `json:"rc"`
}

AccountRevealedApikey defines model for AccountRevealedApikey.

type AccountRevokeApikeyResponse

type AccountRevokeApikeyResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *AccountRc
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *AccountUnauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *AccountForbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *AccountNotFound
}

func ParseAccountRevokeApikeyResponse

func ParseAccountRevokeApikeyResponse(rsp *http.Response) (*AccountRevokeApikeyResponse, error)

ParseAccountRevokeApikeyResponse parses an HTTP response from a AccountRevokeApikeyWithResponse call

func (AccountRevokeApikeyResponse) ContentType

func (r AccountRevokeApikeyResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (AccountRevokeApikeyResponse) GetBody

func (r AccountRevokeApikeyResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (AccountRevokeApikeyResponse) GetJSON200

func (r AccountRevokeApikeyResponse) GetJSON200() *AccountRc

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (AccountRevokeApikeyResponse) GetJSON401

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (AccountRevokeApikeyResponse) GetJSON403

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (AccountRevokeApikeyResponse) GetJSON404

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (AccountRevokeApikeyResponse) Status

Status returns HTTPResponse.Status

func (AccountRevokeApikeyResponse) StatusCode

func (r AccountRevokeApikeyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AccountRotateApikeyResponse

type AccountRotateApikeyResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *AccountCreatedApikey
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *AccountUnauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *AccountForbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *AccountNotFound
}

func ParseAccountRotateApikeyResponse

func ParseAccountRotateApikeyResponse(rsp *http.Response) (*AccountRotateApikeyResponse, error)

ParseAccountRotateApikeyResponse parses an HTTP response from a AccountRotateApikeyWithResponse call

func (AccountRotateApikeyResponse) ContentType

func (r AccountRotateApikeyResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (AccountRotateApikeyResponse) GetBody

func (r AccountRotateApikeyResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (AccountRotateApikeyResponse) GetJSON200

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (AccountRotateApikeyResponse) GetJSON401

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (AccountRotateApikeyResponse) GetJSON403

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (AccountRotateApikeyResponse) GetJSON404

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (AccountRotateApikeyResponse) Status

Status returns HTTPResponse.Status

func (AccountRotateApikeyResponse) StatusCode

func (r AccountRotateApikeyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AccountUnauthorized

type AccountUnauthorized = AccountRc

AccountUnauthorized defines model for AccountUnauthorized.

type AccountUser

type AccountUser struct {
	Email    *openapi_types.Email `json:"email,omitempty"`
	Fullname *string              `json:"fullname,omitempty"`
	ID       openapi_types.UUID   `json:"id"`
}

AccountUser defines model for AccountUser.

type ApikeyDetail

type ApikeyDetail struct {
	// AllowedCidrs Source-IP allowlist. Empty means unrestricted, not deny-all.
	AllowedCidrs  *[]string          `json:"allowed_cidrs,omitempty"`
	AllowedScopes *[]string          `json:"allowed_scopes,omitempty"`
	Created       time.Time          `json:"created"`
	Expires       *time.Time         `json:"expires,omitempty"`
	ID            openapi_types.UUID `json:"id"`

	// KeyPrefix The leading, non-secret part, so a key is recognizable without storing it.
	KeyPrefix  string     `json:"key_prefix"`
	LastUsedAt *time.Time `json:"last_used_at,omitempty"`
	Name       string     `json:"name"`

	// Retrievable Whether this key's secret can still be read back. False permanently for a key issued before secrets were stored recoverably.
	Retrievable *bool      `json:"retrievable,omitempty"`
	RevokedAt   *time.Time `json:"revoked_at,omitempty"`
}

ApikeyDetail Key metadata. Never the key itself.

type ApikeyIDParam

type ApikeyIDParam = openapi_types.UUID

ApikeyIDParam defines model for ApikeyIdParam.

type ApikeyList

type ApikeyList struct {
	Keys []ApikeyDetail `json:"keys"`
	Rc   string         `json:"rc"`
}

ApikeyList defines model for ApikeyList.

type Asn

type Asn struct {
	// Asn The AS announcing the address, 0 where none does.
	Asn int `json:"asn"`

	// Country The country its registry assigned it to.
	Country *string `json:"country,omitempty"`

	// Domain Its operator's domain.
	Domain string `json:"domain"`

	// Name Its operator.
	Name string `json:"name"`

	// Prefix The announced prefix covering the address.
	Prefix string `json:"prefix"`

	// RpkiStatus The announcement's RPKI status.
	RpkiStatus *string `json:"rpki_status,omitempty"`

	// Type The kind of network it runs. On a paid plan or a free key's full answers.
	Type *string `json:"type,omitempty"`
}

Asn The network announcing the address, from IP ASN.

type AsnHostedDomains

type AsnHostedDomains struct {
	// Domains Up to 10 of them, the most popular first; `[]` when none does.
	Domains *[]string `json:"domains,omitempty"`

	// Total How many registered domains resolve to an address the AS announces.
	Total int `json:"total"`
}

AsnHostedDomains From ASN Hosted Domains: how many registered domains the AS hosts, and the 10 most popular. Its database lists up to 1,000 an AS. On a paid plan or a free key's full answers.

type AsnLookupResponse

type AsnLookupResponse struct {
	// Allocated When.
	Allocated string `json:"allocated"`

	// Asn The AS number.
	Asn int `json:"asn"`

	// CapReached On every answer to a key, and on no other: `false` while the answer has every field, `true` once its organization's allowance is used and the answer has the basics: a free-plan key's full answers for the UTC day, or a paid key's quota or overage cap. A paid key's lookups answered past it are not billed, and raising or removing the cap in Billing turns it `false` again.
	CapReached *bool `json:"cap_reached,omitempty"`

	// Country The country its registry assigned it to.
	Country string `json:"country"`

	// Domain Its operator's domain.
	Domain string `json:"domain"`

	// Downstreams Those AS numbers, ascending, up to 20000. On a paid plan or a free key's full answers.
	Downstreams *[]int `json:"downstreams,omitempty"`

	// HostedDomains From ASN Hosted Domains: how many registered domains the AS hosts, and the 10 most popular. Its database lists up to 1,000 an AS. On a paid plan or a free key's full answers.
	HostedDomains *AsnHostedDomains `json:"hosted_domains,omitempty"`

	// Name Its operator.
	Name string `json:"name"`

	// NumDownstreams How many AS numbers it provides transit to. On a paid plan or a free key's full answers.
	NumDownstreams *int `json:"num_downstreams,omitempty"`

	// NumIps IPv4 addresses it announces. On a paid plan or a free key's full answers.
	NumIps *int `json:"num_ips,omitempty"`

	// NumPeers How many AS numbers it exchanges its own and its customers' routes with. On a paid plan or a free key's full answers.
	NumPeers *int `json:"num_peers,omitempty"`

	// NumPrefixes4 IPv4 prefixes it announces. On a paid plan or a free key's full answers.
	NumPrefixes4 *int `json:"num_prefixes4,omitempty"`

	// NumPrefixes6 IPv6 prefixes it announces. On a paid plan or a free key's full answers.
	NumPrefixes6 *int `json:"num_prefixes6,omitempty"`

	// NumUpstreams How many AS numbers it gets transit from. On a paid plan or a free key's full answers.
	NumUpstreams *int `json:"num_upstreams,omitempty"`

	// Peers Those AS numbers, ascending, up to 20000. On a paid plan or a free key's full answers.
	Peers *[]int `json:"peers,omitempty"`

	// Prefixes What it announces, IPv4 then IPv6, up to 20000 a family. On a paid plan or a free key's full answers.
	Prefixes *[]AsnPrefix `json:"prefixes,omitempty"`

	// Rank Its rank in ASN Extended, by customer cone, 1 the largest; `0` for an AS seen in no AS path. On a paid plan or a free key's full answers.
	Rank *int `json:"rank,omitempty"`

	// Registry The registry that allocated it.
	Registry string `json:"registry"`

	// RpkiInvalid Invalid. On a paid plan or a free key's full answers.
	RpkiInvalid *int `json:"rpki_invalid,omitempty"`

	// RpkiNotFound With no RPKI record. On a paid plan or a free key's full answers.
	RpkiNotFound *int `json:"rpki_not_found,omitempty"`

	// RpkiValid Its announcements RPKI calls valid. On a paid plan or a free key's full answers.
	RpkiValid *int `json:"rpki_valid,omitempty"`

	// Tier1 Whether it is one of the transit-free networks at the top of the hierarchy, which get transit from no one and peer with each other. On a paid plan or a free key's full answers.
	Tier1 *bool `json:"tier1,omitempty"`

	// Type The kind of network it runs. On a paid plan or a free key's full answers.
	Type *string `json:"type,omitempty"`

	// Upstreams Those AS numbers, ascending, up to 20000. On a paid plan or a free key's full answers.
	Upstreams *[]int `json:"upstreams,omitempty"`

	// Whois Its ASN Whois record, every column, empty where the registry states nothing. On a paid plan or a free key's full answers.
	Whois *map[string]string `json:"whois,omitempty"`
}

AsnLookupResponse What every database says about one AS.

type AsnPrefix

type AsnPrefix struct {
	// Country Where its first address is.
	Country string `json:"country"`

	// FirstSeen The first day BGP Route saw it.
	FirstSeen string `json:"first_seen"`

	// OtherOrigins Every other AS announcing it.
	OtherOrigins []int `json:"other_origins"`

	// PeerCount How many peers saw it.
	PeerCount int `json:"peer_count"`

	// Prefix The announced prefix.
	Prefix string `json:"prefix"`

	// RpkiStatus Its RPKI status.
	RpkiStatus string `json:"rpki_status"`

	// Size IPv4 addresses it covers; 0 for IPv6.
	Size int `json:"size"`
}

AsnPrefix defines model for AsnPrefix.

type BatchLookupError

type BatchLookupError struct {
	// Error The same message.
	Error string `json:"error"`

	// Status The status its own lookup would have answered.
	Status int `json:"status"`
}

BatchLookupError defines model for BatchLookupError.

type BatchLookupRequest

type BatchLookupRequest struct {
	// Asns AS numbers, `AS15169` or `15169`; a JSON number reads too.
	Asns *[]string `json:"asns,omitempty"`

	// Domains Domains.
	Domains *[]string `json:"domains,omitempty"`

	// Ips Addresses.
	Ips *[]string `json:"ips,omitempty"`

	// UserAgents Each address's `User-Agent`, keyed by the string it is sent as in `ips`. With every field, that address's answer then carries `user_agent`, as a single lookup's does. Never kept.
	UserAgents *map[string]string `json:"user_agents,omitempty"`
}

BatchLookupRequest Up to 1000 items across the three arrays, each optional.

type BatchLookupResponse

type BatchLookupResponse struct {
	// Errors Each failed item, keyed by the string sent.
	Errors map[string]BatchLookupError `json:"errors"`

	// Results Each answered item's lookup, keyed by the string sent.
	Results map[string]BatchLookupResponse_Results_AdditionalProperties `json:"results"`
}

BatchLookupResponse defines model for BatchLookupResponse.

type BatchLookupResponse_Results_AdditionalProperties

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

BatchLookupResponse_Results_AdditionalProperties defines model for BatchLookupResponse.results.AdditionalProperties.

func (BatchLookupResponse_Results_AdditionalProperties) AsAsnLookupResponse

AsAsnLookupResponse returns the union data inside the BatchLookupResponse_Results_AdditionalProperties as a AsnLookupResponse

func (BatchLookupResponse_Results_AdditionalProperties) AsDomainLookupResponse

AsDomainLookupResponse returns the union data inside the BatchLookupResponse_Results_AdditionalProperties as a DomainLookupResponse

func (BatchLookupResponse_Results_AdditionalProperties) AsLookupResponse

AsLookupResponse returns the union data inside the BatchLookupResponse_Results_AdditionalProperties as a LookupResponse

func (*BatchLookupResponse_Results_AdditionalProperties) FromAsnLookupResponse

FromAsnLookupResponse overwrites any union data inside the BatchLookupResponse_Results_AdditionalProperties as the provided AsnLookupResponse

func (*BatchLookupResponse_Results_AdditionalProperties) FromDomainLookupResponse

FromDomainLookupResponse overwrites any union data inside the BatchLookupResponse_Results_AdditionalProperties as the provided DomainLookupResponse

func (*BatchLookupResponse_Results_AdditionalProperties) FromLookupResponse

FromLookupResponse overwrites any union data inside the BatchLookupResponse_Results_AdditionalProperties as the provided LookupResponse

func (BatchLookupResponse_Results_AdditionalProperties) MarshalJSON

func (*BatchLookupResponse_Results_AdditionalProperties) MergeAsnLookupResponse

MergeAsnLookupResponse performs a merge with any union data inside the BatchLookupResponse_Results_AdditionalProperties, using the provided AsnLookupResponse

func (*BatchLookupResponse_Results_AdditionalProperties) MergeDomainLookupResponse

MergeDomainLookupResponse performs a merge with any union data inside the BatchLookupResponse_Results_AdditionalProperties, using the provided DomainLookupResponse

func (*BatchLookupResponse_Results_AdditionalProperties) MergeLookupResponse

MergeLookupResponse performs a merge with any union data inside the BatchLookupResponse_Results_AdditionalProperties, using the provided LookupResponse

func (*BatchLookupResponse_Results_AdditionalProperties) UnmarshalJSON

type BitTorrentDetail

type BitTorrentDetail struct {
	// Clients The two-letter codes its clients name themselves by.
	Clients *[]string `json:"clients,omitempty"`

	// DaysSeen On how many days.
	DaysSeen *int `json:"days_seen,omitempty"`

	// FirstSeen The first day a client was seen here.
	FirstSeen *string `json:"first_seen,omitempty"`

	// IDMatchesIP A client here derived its node ID from the address (BEP 42).
	IDMatchesIP *bool `json:"id_matches_ip,omitempty"`

	// Indexer A DHT indexer rather than people.
	Indexer *bool `json:"indexer,omitempty"`

	// LastReachable The last day one answered, empty when none did.
	LastReachable *string `json:"last_reachable,omitempty"`

	// LastSeen The last day.
	LastSeen *string `json:"last_seen,omitempty"`

	// NumPorts Distinct ports over the window.
	NumPorts *int `json:"num_ports,omitempty"`

	// PeakNumPorts The most on one day.
	PeakNumPorts *int `json:"peak_num_ports,omitempty"`

	// Verified A client here answered, or two or more reported it at once.
	Verified *bool `json:"verified,omitempty"`
}

BitTorrentDetail defines model for BitTorrentDetail.

type BotDetail

type BotDetail struct {
	// Agents The bots the address serves, as their user agents name them (`Googlebot`, `GPTBot`); for an address that is not verified, the bots it claimed to be. One address can serve several, and `[]` means none is named.
	Agents *[]string `json:"agents,omitempty"`

	// Categories What those bots do: `search_engine`, `ai_training`, `ai_search`, `ai_assistant`, `ai_agent`, `seo`, `ads`, `preview`, `feed`, `monitoring`, `archiver`, `scanner`, `link_security`, `webhook` or `other`; `[]` where unknown.
	Categories *[]string `json:"categories,omitempty"`

	// Confidence `high`, `medium` or `low`: how sure we are the address is what the row says.
	Confidence *string `json:"confidence,omitempty"`

	// FirstSeen The first day the address was seen as such.
	FirstSeen *string `json:"first_seen,omitempty"`

	// Identity `verified` (the operator vouches for the address), `declared` (it names itself a bot that cannot be verified), `spoofed` (it claimed a bot whose operator vouches for other addresses) or `undeclared` (it hides as a browser and behaves as automation).
	Identity *string `json:"identity,omitempty"`

	// LastSeen The last day it was.
	LastSeen *string `json:"last_seen,omitempty"`

	// Provider The bot operator's ID in Bot Provider; for an address that is not verified, the operator its claim named. Empty where no operator is known.
	Provider *string `json:"provider,omitempty"`

	// ProviderName The operator's name, the one its claim named for an address that is not verified; empty where no operator is known.
	ProviderName *string `json:"provider_name,omitempty"`

	// Verified Whether the operator vouches for the address, so the bots in `agents` really are its.
	Verified *bool `json:"verified,omitempty"`

	// VerifiedBy How a verified address verified: `list` (the operator publishes it), `rdns` (its reverse DNS name ends in a suffix the operator documents and resolves back) or `owner` (the operator's own space, seen claiming its bot); empty when not verified.
	VerifiedBy *string `json:"verified_by,omitempty"`
}

BotDetail defines model for BotDetail.

type CarrierDetail

type CarrierDetail struct {
	// Confidence `high`, `medium` or `low`.
	Confidence *string `json:"confidence,omitempty"`

	// Country ISO 3166 country code.
	Country *string `json:"country,omitempty"`

	// Mcc Its mobile country code.
	Mcc *string `json:"mcc,omitempty"`

	// Mnc Its mobile network code.
	Mnc *string `json:"mnc,omitempty"`

	// Name The mobile carrier.
	Name *string `json:"name,omitempty"`
}

CarrierDetail defines model for CarrierDetail.

type ClassDetail

type ClassDetail struct {
	// Confidence `high`, `medium` or `low`: how sure we are the range is what the flag says.
	Confidence *string `json:"confidence,omitempty"`

	// LastSeen The last day the range was seen as such.
	LastSeen *string `json:"last_seen,omitempty"`

	// Provider The provider's ID in its catalog; empty for an unattributed range, and on Tor.
	Provider *string `json:"provider,omitempty"`

	// ProviderName The name the catalog gives the provider, empty where it names none.
	ProviderName *string `json:"provider_name,omitempty"`
}

ClassDetail defines model for ClassDetail.

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) AccountCreateApikey

func (c *Client) AccountCreateApikey(ctx context.Context, body AccountCreateApikeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

AccountCreateApikey Create

Creates an API key and returns its secret, which no list ever shows: keep it, or reveal it again later.

Needs the `apikeys.manage` scope.

Takes a body of the `application/json` content type.

Corresponds with POST /api/v1/iam/apikeys (the `AccountCreateApikey` operationId).

func (*Client) AccountCreateApikeyWithBody

func (c *Client) AccountCreateApikeyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

AccountCreateApikeyWithBody Create

Creates an API key and returns its secret, which no list ever shows: keep it, or reveal it again later.

Needs the `apikeys.manage` scope.

Takes any type of body and a specified content type.

Corresponds with POST /api/v1/iam/apikeys (the `AccountCreateApikey` operationId).

func (*Client) AccountIdentity

func (c *Client) AccountIdentity(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

AccountIdentity Identity

The identity behind this credential: what it is, the organization it is scoped to, and the scopes it currently holds.

`user` is present for an OAuth token and absent for an API key, which has an organization but no person behind it. `credential.kind` says which you are holding, so a client can branch without guessing from a missing field.

Narrower than what the console shows its own user on purpose: an integration needs a name to display and an organization to address, not a profile. The `scopes` array is what the credential may do right now, so a client can render its own capabilities rather than discovering them from a 403.

Needs the `account.read` scope.

Corresponds with GET /api/v1/iam/identity (the `AccountIdentity` operationId).

func (*Client) AccountListApikeys

func (c *Client) AccountListApikeys(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

AccountListApikeys List

Lists your organization's API keys with their metadata, never a secret: only Create, Rotate and Reveal return one.

A secret is never in a list, here or in the console, because a list is the response that ends up in logs, caches and support tickets.

`retrievable` says whether the secret could still be read back at all. A key issued before this product stored secrets recoverably was never kept, so `reveal` will refuse it permanently; rotating produces one that can be read.

Needs the `apikeys.read` scope.

Corresponds with GET /api/v1/iam/apikeys (the `AccountListApikeys` operationId).

func (*Client) AccountOrg

func (c *Client) AccountOrg(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

AccountOrg Organization

Returns the organization the presented credential is scoped to. A credential belongs to exactly one, so there is no ID to pass.

An identifier in the path could only ever be your own or a refusal.

Needs the `org.read` scope.

Corresponds with GET /api/v1/iam/org (the `AccountOrg` operationId).

func (*Client) AccountOrgMembers

func (c *Client) AccountOrgMembers(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

AccountOrgMembers Members

Lists the members of your organization. Adding or removing one is an emailed invitation in the console, not an API call.

Modeling it as one here would promise something this API does not do.

Needs the `org.read` scope.

Corresponds with GET /api/v1/iam/org/members (the `AccountOrgMembers` operationId).

func (*Client) AccountRevealApikey

func (c *Client) AccountRevealApikey(ctx context.Context, id ApikeyIDParam, reqEditors ...RequestEditorFn) (*http.Response, error)

AccountRevealApikey Reveal

Returns an existing key's secret.

Its own scope rather than part of `apikeys.manage`, because the two are different acts: rotating replaces a secret you never see, while this hands one over.

Refused with `NOT_RETRIEVABLE` for a key issued before this product stored secrets recoverably - that secret was never kept, so no retry will ever produce it. Rotate the key instead.

Needs the `apikeys.reveal` scope.

Corresponds with POST /api/v1/iam/apikeys/{id}/reveal (the `AccountRevealApikey` operationId).

func (*Client) AccountRevokeApikey

func (c *Client) AccountRevokeApikey(ctx context.Context, id ApikeyIDParam, reqEditors ...RequestEditorFn) (*http.Response, error)

AccountRevokeApikey Revoke

Stops the key working. Revocation is soft: the key stays listed with a `revoked_at`, because the organization still owns whatever it did while it was alive.

Needs the `apikeys.manage` scope.

Corresponds with POST /api/v1/iam/apikeys/{id}/revoke (the `AccountRevokeApikey` operationId).

func (*Client) AccountRotateApikey

func (c *Client) AccountRotateApikey(ctx context.Context, id ApikeyIDParam, reqEditors ...RequestEditorFn) (*http.Response, error)

AccountRotateApikey Rotate

Replaces the secret behind a key, keeping its ID, name and settings. The previous secret stops working immediately. The new secret comes back in the answer, so this needs `apikeys.reveal` as well as `apikeys.manage`.

Corresponds with POST /api/v1/iam/apikeys/{id}/rotate (the `AccountRotateApikey` operationId).

func (*Client) DatabaseChecksumV2

func (c *Client) DatabaseChecksumV2(ctx context.Context, params *DatabaseChecksumV2Params, reqEditors ...RequestEditorFn) (*http.Response, error)

DatabaseChecksumV2 Checksums

Checksums for one published file, so a download can be verified after it lands.

Corresponds with GET /api/v2/database/checksum (the `DatabaseChecksumV2` operationId).

func (*Client) DatabaseMetadataV2

func (c *Client) DatabaseMetadataV2(ctx context.Context, params *DatabaseMetadataV2Params, reqEditors ...RequestEditorFn) (*http.Response, error)

DatabaseMetadataV2 Metadata

Poll this to decide whether today's build is worth fetching: it carries `updated` and `entries` without downloading anything.

No `format` parameter - one document describes every format the database is built in. Needs no license: it answers for every database `list` returns, whatever its `standing`.

Corresponds with GET /api/v2/database/metadata (the `DatabaseMetadataV2` operationId).

func (*Client) DownloadDatabaseV2

func (c *Client) DownloadDatabaseV2(ctx context.Context, params *DownloadDatabaseV2Params, reqEditors ...RequestEditorFn) (*http.Response, error)

DownloadDatabaseV2 Download

Downloads one file of a database: the answer is a `302` to time-limited object storage, so follow the redirect.

The bytes come straight from object storage rather than through this API.

Corresponds with GET /api/v2/database/download (the `DownloadDatabaseV2` operationId).

func (*Client) ListDatabases

func (c *Client) ListDatabases(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

ListDatabases List

The whole published catalog, with your organization's license beside each entry, so `standing` says whether a database is yours today (`licensed`), was (`expired`), or has never been bought (`unlicensed`).

Corresponds with GET /api/v2/database/list (the `ListDatabases` operationId).

func (*Client) ListDownloads

func (c *Client) ListDownloads(ctx context.Context, params *ListDownloadsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

ListDownloads History

Lists your organization's recent database downloads, newest first, refused ones included, so a download that stopped working shows why.

Corresponds with GET /api/v2/database/downloads (the `ListDownloads` operationId).

func (*Client) LookupAsn

func (c *Client) LookupAsn(ctx context.Context, asn string, reqEditors ...RequestEditorFn) (*http.Response, error)

LookupAsn ASN lookup

Answers what InternetData knows about one autonomous system: its registration on every plan, and on a paid one its ASN Whois record, every prefix it announces in global BGP, with RPKI status, up to 20000 per address family, its rank, Tier 1 flag, upstreams, peers and downstreams from ASN Extended, up to 20000 each (the counts beside them are always whole), and the domains it hosts. An AS no database knows answers its number with empty values.

Corresponds with GET /asn/{asn} (the `LookupAsn` operationId).

func (*Client) LookupBatch

func (c *Client) LookupBatch(ctx context.Context, body LookupBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

LookupBatch Batch

Up to 1000 addresses, AS numbers and domains in one call, each answered exactly as its own lookup would be and each counted as one lookup. Answers and failures are keyed by the string you sent, in the order you sent them; duplicates collapse. Needs a paid plan: a batch of one item is answered as the lookup it is on any plan, and charged as that lookup is. An overage cap reached part way through answers the remaining items with the basics and `cap_reached` `true`, in `results`.

Takes a body of the `application/json` content type.

Corresponds with POST /batch (the `LookupBatch` operationId).

func (*Client) LookupBatchWithBody

func (c *Client) LookupBatchWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

LookupBatchWithBody Batch

Up to 1000 addresses, AS numbers and domains in one call, each answered exactly as its own lookup would be and each counted as one lookup. Answers and failures are keyed by the string you sent, in the order you sent them; duplicates collapse. Needs a paid plan: a batch of one item is answered as the lookup it is on any plan, and charged as that lookup is. An overage cap reached part way through answers the remaining items with the basics and `cap_reached` `true`, in `results`.

Takes any type of body and a specified content type.

Corresponds with POST /batch (the `LookupBatch` operationId).

func (*Client) LookupDomain

func (c *Client) LookupDomain(ctx context.Context, domain string, reqEditors ...RequestEditorFn) (*http.Response, error)

LookupDomain Domain lookup

Answers what InternetData knows about one domain from its latest snapshots: on every plan whether it is registered and which DNS record types it has; on a paid one the records themselves, up to 100 a type, the network announcing each address, the other domains on its first IPv4 address, the organization's IP ranges, whether it is a disposable email domain, what its home page says of itself and links to, and the domains whose home page redirects or links to it. An internationalized name is answered under its punycode spelling.

Corresponds with GET /domain/{domain} (the `LookupDomain` operationId).

func (*Client) LookupIP

func (c *Client) LookupIP(ctx context.Context, ip string, params *LookupIPParams, reqEditors ...RequestEditorFn) (*http.Response, error)

LookupIP IP lookup

Answers what every database says about one IPv4 or IPv6 address. Which fields come back is decided by the presented key; with no key, on the free plan, the answer carries the fields in the address table's free column. The path also takes `AS15169` or a domain, as internetdata.io's pages do, and then answers as `GET /asn/{asn}` or `GET /domain/{domain}` would.

Corresponds with GET /{ip} (the `LookupIP` operationId).

func (*Client) LookupMyIP

func (c *Client) LookupMyIP(ctx context.Context, params *LookupMyIPParams, reqEditors ...RequestEditorFn) (*http.Response, error)

LookupMyIP My IP

The address you are calling from, answered as `GET /{ip}` would answer it, and charged as that lookup is.

Corresponds with GET /myip (the `LookupMyIP` operationId).

func (*Client) MyEntitlement

func (c *Client) MyEntitlement(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

MyEntitlement Plan and usage

Answers what the presented key is, what plan is behind it, and what has been spent against that plan's allowance in the current window.

Corresponds with GET /api/v1/entitlement (the `MyEntitlement` operationId).

func (*Client) OauthAuthorize

func (c *Client) OauthAuthorize(ctx context.Context, params *OauthAuthorizeParams, reqEditors ...RequestEditorFn) (*http.Response, error)

OauthAuthorize Authorize

The browser entry point for the authorization-code flow. This is a redirect target, not something to call from code.

Any client may sign in without registering first by using a Client ID Metadata Document: make `client_id` an https URL that serves your client's metadata as JSON, naming that same URL as its `client_id`, with `token_endpoint_auth_method` `none` and your `redirect_uris`. An https redirect URI must be on the same origin as the `client_id`; a loopback one (`http://127.0.0.1`, `http://[::1]`, `http://localhost`) matches on any port. Such a client is granted `apikeys.use` at most. A client registered at `/oauth/register` uses the `client_id` it was given and one of the `redirect_uris` it registered.

An unknown `client_id` or an unregistered `redirect_uri` is shown to the person and never redirected, because sending an error to an address we have not verified belongs to you is how an open redirector works. Any other error in the request is shown to the person too: anyone can make a client, so its `redirect_uri` is verified only as its own (RFC 9700 section 4.11.2). Only the person's answer comes back to your `redirect_uri`: a `code`, or `error` `access_denied`, each with your `state` and `iss`.

Corresponds with GET /oauth/authorize (the `OauthAuthorize` operationId).

func (*Client) OauthDeviceAuthorizationWithBody

func (c *Client) OauthDeviceAuthorizationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

OauthDeviceAuthorizationWithBody Device authorization

Starts the device flow. Show the `user_code` to the person and send them to `verification_uri`; `verification_uri_complete` has the code already embedded, which is what to open if you can open a browser at all.

Then poll `/oauth/token`, no faster than `interval` seconds.

Takes any type of body and a specified content type.

Corresponds with POST /oauth/device_authorization (the `OauthDeviceAuthorization` operationId).

func (*Client) OauthDeviceAuthorizationWithFormdataBody

func (c *Client) OauthDeviceAuthorizationWithFormdataBody(ctx context.Context, body OauthDeviceAuthorizationFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

OauthDeviceAuthorizationWithFormdataBody Device authorization

Starts the device flow. Show the `user_code` to the person and send them to `verification_uri`; `verification_uri_complete` has the code already embedded, which is what to open if you can open a browser at all.

Then poll `/oauth/token`, no faster than `interval` seconds.

Takes a body of the `application/x-www-form-urlencoded` content type.

Corresponds with POST /oauth/device_authorization (the `OauthDeviceAuthorization` operationId).

func (*Client) OauthMetadata

func (c *Client) OauthMetadata(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

OauthMetadata Discovery

RFC 8414 authorization server metadata: the endpoints, the grant types and the scopes this server supports.

Read this rather than hardcoding endpoints. It is also served at `/.well-known/openid-configuration`, identically, because several clients probe that path first.

Corresponds with GET /.well-known/oauth-authorization-server (the `OauthMetadata` operationId).

func (*Client) OauthRegister

func (c *Client) OauthRegister(ctx context.Context, body OauthRegisterJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

OauthRegister Register

RFC 7591 dynamic client registration, for a client that cannot use a Client ID Metadata Document. Post your client's metadata as JSON, then use the `client_id` in the answer at `/oauth/authorize` and `/oauth/token`. Nothing is kept until a person approves your client, so registering again costs nothing and leaves nothing to clean up.

Each redirect URI must be https on a public host name, or http on a loopback address (`127.0.0.1`, `[::1]`, `localhost`), which then matches on any port. A custom URI scheme is refused: use a loopback redirect instead. So is a host on one of our own domains.

`client_name` is shown to the person as your client's own claim, with where its redirect goes beside it. A name that renders blank, or mixes Latin letters with Cyrillic or Greek ones, is shown as an unnamed application.

The client is public whatever you ask for: `token_endpoint_auth_method` comes back `none`, there is no client secret, and every authorization proves itself with PKCE. It may be granted `apikeys.use` at most.

Takes a body of the `application/json` content type.

Corresponds with POST /oauth/register (the `OauthRegister` operationId).

func (*Client) OauthRegisterWithBody

func (c *Client) OauthRegisterWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

OauthRegisterWithBody Register

RFC 7591 dynamic client registration, for a client that cannot use a Client ID Metadata Document. Post your client's metadata as JSON, then use the `client_id` in the answer at `/oauth/authorize` and `/oauth/token`. Nothing is kept until a person approves your client, so registering again costs nothing and leaves nothing to clean up.

Each redirect URI must be https on a public host name, or http on a loopback address (`127.0.0.1`, `[::1]`, `localhost`), which then matches on any port. A custom URI scheme is refused: use a loopback redirect instead. So is a host on one of our own domains.

`client_name` is shown to the person as your client's own claim, with where its redirect goes beside it. A name that renders blank, or mixes Latin letters with Cyrillic or Greek ones, is shown as an unnamed application.

The client is public whatever you ask for: `token_endpoint_auth_method` comes back `none`, there is no client secret, and every authorization proves itself with PKCE. It may be granted `apikeys.use` at most.

Takes any type of body and a specified content type.

Corresponds with POST /oauth/register (the `OauthRegister` operationId).

func (*Client) OauthRevokeWithBody

func (c *Client) OauthRevokeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

OauthRevokeWithBody Revoke

RFC 7009. Always answers 200, even for a token that was never valid, so it can't be used to test whether a token is live.

Revoking a refresh token ends the whole authorization and takes its access tokens with it. Revoking an access token affects only that token.

Takes any type of body and a specified content type.

Corresponds with POST /oauth/revoke (the `OauthRevoke` operationId).

func (*Client) OauthRevokeWithFormdataBody

func (c *Client) OauthRevokeWithFormdataBody(ctx context.Context, body OauthRevokeFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

OauthRevokeWithFormdataBody Revoke

RFC 7009. Always answers 200, even for a token that was never valid, so it can't be used to test whether a token is live.

Revoking a refresh token ends the whole authorization and takes its access tokens with it. Revoking an access token affects only that token.

Takes a body of the `application/x-www-form-urlencoded` content type.

Corresponds with POST /oauth/revoke (the `OauthRevoke` operationId).

func (*Client) OauthTokenWithBody

func (c *Client) OauthTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

OauthTokenWithBody Token

Issues tokens for three grant types: a device code, an authorization code and a refresh token.

`urn:ietf:params:oauth:grant-type:device_code` polls a device authorization. Until the person approves it answers `authorization_pending`; poll faster than `interval` and it answers `slow_down`, which means widen your interval and keep it widened.

`authorization_code` exchanges a code from `/oauth/authorize`, with the `code_verifier` matching the challenge you sent and the same `redirect_uri`. A code works once: presenting it again also revokes what the first exchange issued.

`refresh_token` exchanges a refresh token. The presented token is consumed whatever happens next, so store the new one before using it. Presenting a consumed refresh token again ends the whole authorization, since it means the token was copied.

Takes any type of body and a specified content type.

Corresponds with POST /oauth/token (the `OauthToken` operationId).

func (*Client) OauthTokenWithFormdataBody

func (c *Client) OauthTokenWithFormdataBody(ctx context.Context, body OauthTokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

OauthTokenWithFormdataBody Token

Issues tokens for three grant types: a device code, an authorization code and a refresh token.

`urn:ietf:params:oauth:grant-type:device_code` polls a device authorization. Until the person approves it answers `authorization_pending`; poll faster than `interval` and it answers `slow_down`, which means widen your interval and keep it widened.

`authorization_code` exchanges a code from `/oauth/authorize`, with the `code_verifier` matching the challenge you sent and the same `redirect_uri`. A code works once: presenting it again also revokes what the first exchange issued.

`refresh_token` exchanges a refresh token. The presented token is consumed whatever happens next, so store the new one before using it. Presenting a consumed refresh token again ends the whole authorization, since it means the token was copied.

Takes a body of the `application/x-www-form-urlencoded` content type.

Corresponds with POST /oauth/token (the `OauthToken` operationId).

type ClientInterface

type ClientInterface interface {

	// OauthMetadata Discovery
	//
	// RFC 8414 authorization server metadata: the endpoints, the grant types
	// and the scopes this server supports.
	//
	// Read this rather than hardcoding endpoints. It is also served at
	// `/.well-known/openid-configuration`, identically, because several
	// clients probe that path first.
	//
	// Corresponds with GET /.well-known/oauth-authorization-server (the `OauthMetadata` operationId).
	OauthMetadata(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// MyEntitlement Plan and usage
	//
	// Answers what the presented key is, what plan is behind it, and what has
	// been spent against that plan's allowance in the current window.
	//
	// Corresponds with GET /api/v1/entitlement (the `MyEntitlement` operationId).
	MyEntitlement(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AccountListApikeys List
	//
	// Lists your organization's API keys with their metadata, never a secret:
	// only Create, Rotate and Reveal return one.
	//
	// A secret is never in a list, here or in the console, because a list is
	// the response that ends up in logs, caches and support tickets.
	//
	// `retrievable` says whether the secret could still be read back at all.
	// A key issued before this product stored secrets recoverably was never
	// kept, so `reveal` will refuse it permanently; rotating produces one
	// that can be read.
	//
	// Needs the `apikeys.read` scope.
	//
	// Corresponds with GET /api/v1/iam/apikeys (the `AccountListApikeys` operationId).
	AccountListApikeys(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AccountCreateApikeyWithBody Create
	//
	// Creates an API key and returns its secret, which no list ever shows:
	// keep it, or reveal it again later.
	//
	// Needs the `apikeys.manage` scope.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /api/v1/iam/apikeys (the `AccountCreateApikey` operationId).
	AccountCreateApikeyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AccountCreateApikey Create
	//
	// Creates an API key and returns its secret, which no list ever shows:
	// keep it, or reveal it again later.
	//
	// Needs the `apikeys.manage` scope.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /api/v1/iam/apikeys (the `AccountCreateApikey` operationId).
	AccountCreateApikey(ctx context.Context, body AccountCreateApikeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AccountRevealApikey Reveal
	//
	// Returns an existing key's secret.
	//
	// Its own scope rather than part of `apikeys.manage`, because the two are
	// different acts: rotating replaces a secret you never see, while this
	// hands one over.
	//
	// Refused with `NOT_RETRIEVABLE` for a key issued before this product
	// stored secrets recoverably - that secret was never kept, so no retry
	// will ever produce it. Rotate the key instead.
	//
	// Needs the `apikeys.reveal` scope.
	//
	// Corresponds with POST /api/v1/iam/apikeys/{id}/reveal (the `AccountRevealApikey` operationId).
	AccountRevealApikey(ctx context.Context, id ApikeyIDParam, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AccountRevokeApikey Revoke
	//
	// Stops the key working. Revocation is soft: the key stays listed with a
	// `revoked_at`, because the organization still owns whatever it did while
	// it was alive.
	//
	// Needs the `apikeys.manage` scope.
	//
	// Corresponds with POST /api/v1/iam/apikeys/{id}/revoke (the `AccountRevokeApikey` operationId).
	AccountRevokeApikey(ctx context.Context, id ApikeyIDParam, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AccountRotateApikey Rotate
	//
	// Replaces the secret behind a key, keeping its ID, name and settings.
	// The previous secret stops working immediately. The new secret comes
	// back in the answer, so this needs `apikeys.reveal` as well as
	// `apikeys.manage`.
	//
	// Corresponds with POST /api/v1/iam/apikeys/{id}/rotate (the `AccountRotateApikey` operationId).
	AccountRotateApikey(ctx context.Context, id ApikeyIDParam, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AccountIdentity Identity
	//
	// The identity behind this credential: what it is, the organization it is
	// scoped to, and the scopes it currently holds.
	//
	// `user` is present for an OAuth token and absent for an API key, which
	// has an organization but no person behind it. `credential.kind` says
	// which you are holding, so a client can branch without guessing from a
	// missing field.
	//
	// Narrower than what the console shows its own user on purpose: an
	// integration needs a name to display and an organization to address, not
	// a profile. The `scopes` array is what the credential may do right now,
	// so a client can render its own capabilities rather than discovering
	// them from a 403.
	//
	// Needs the `account.read` scope.
	//
	// Corresponds with GET /api/v1/iam/identity (the `AccountIdentity` operationId).
	AccountIdentity(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AccountOrg Organization
	//
	// Returns the organization the presented credential is scoped to. A
	// credential belongs to exactly one, so there is no ID to pass.
	//
	// An identifier in the path could only ever be your own or a refusal.
	//
	// Needs the `org.read` scope.
	//
	// Corresponds with GET /api/v1/iam/org (the `AccountOrg` operationId).
	AccountOrg(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AccountOrgMembers Members
	//
	// Lists the members of your organization. Adding or removing one is an
	// emailed invitation in the console, not an API call.
	//
	// Modeling it as one here would promise something this API does not do.
	//
	// Needs the `org.read` scope.
	//
	// Corresponds with GET /api/v1/iam/org/members (the `AccountOrgMembers` operationId).
	AccountOrgMembers(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DatabaseChecksumV2 Checksums
	//
	// Checksums for one published file, so a download can be verified after it lands.
	//
	// Corresponds with GET /api/v2/database/checksum (the `DatabaseChecksumV2` operationId).
	DatabaseChecksumV2(ctx context.Context, params *DatabaseChecksumV2Params, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DownloadDatabaseV2 Download
	//
	// Downloads one file of a database: the answer is a `302` to time-limited
	// object storage, so follow the redirect.
	//
	// The bytes come straight from object storage rather than through this API.
	//
	// Corresponds with GET /api/v2/database/download (the `DownloadDatabaseV2` operationId).
	DownloadDatabaseV2(ctx context.Context, params *DownloadDatabaseV2Params, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListDownloads History
	//
	// Lists your organization's recent database downloads, newest first,
	// refused ones included, so a download that stopped working shows why.
	//
	// Corresponds with GET /api/v2/database/downloads (the `ListDownloads` operationId).
	ListDownloads(ctx context.Context, params *ListDownloadsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListDatabases List
	//
	// The whole published catalog, with your organization's license beside
	// each entry, so `standing` says whether a database is yours today
	// (`licensed`), was (`expired`), or has never been bought (`unlicensed`).
	//
	// Corresponds with GET /api/v2/database/list (the `ListDatabases` operationId).
	ListDatabases(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DatabaseMetadataV2 Metadata
	//
	// Poll this to decide whether today's build is worth fetching: it carries
	// `updated` and `entries` without downloading anything.
	//
	// No `format` parameter - one document describes every format the database
	// is built in. Needs no license: it answers for every database `list`
	// returns, whatever its `standing`.
	//
	// Corresponds with GET /api/v2/database/metadata (the `DatabaseMetadataV2` operationId).
	DatabaseMetadataV2(ctx context.Context, params *DatabaseMetadataV2Params, reqEditors ...RequestEditorFn) (*http.Response, error)

	// LookupAsn ASN lookup
	//
	// Answers what InternetData knows about one autonomous system: its registration on every plan,
	// and on a paid one its ASN Whois record, every prefix it announces in global BGP, with RPKI status,
	// up to 20000 per address family, its rank, Tier 1 flag, upstreams, peers and downstreams from ASN
	// Extended, up to 20000 each (the counts beside them are always whole), and the domains it hosts. An AS no
	// database knows answers its number with empty values.
	//
	// Corresponds with GET /asn/{asn} (the `LookupAsn` operationId).
	LookupAsn(ctx context.Context, asn string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// LookupBatchWithBody Batch
	//
	// Up to 1000 addresses, AS numbers and domains in one call, each answered exactly as its own
	// lookup would be and each counted as one lookup. Answers and failures are keyed by the string you sent, in
	// the order you sent them; duplicates collapse. Needs a paid plan: a batch of one item is answered as the
	// lookup it is on any plan, and charged as that lookup is. An overage cap reached part way through answers
	// the remaining items with the basics and `cap_reached` `true`, in `results`.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /batch (the `LookupBatch` operationId).
	LookupBatchWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// LookupBatch Batch
	//
	// Up to 1000 addresses, AS numbers and domains in one call, each answered exactly as its own
	// lookup would be and each counted as one lookup. Answers and failures are keyed by the string you sent, in
	// the order you sent them; duplicates collapse. Needs a paid plan: a batch of one item is answered as the
	// lookup it is on any plan, and charged as that lookup is. An overage cap reached part way through answers
	// the remaining items with the basics and `cap_reached` `true`, in `results`.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /batch (the `LookupBatch` operationId).
	LookupBatch(ctx context.Context, body LookupBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// LookupDomain Domain lookup
	//
	// Answers what InternetData knows about one domain from its latest snapshots: on every plan
	// whether it is registered and which DNS record types it has; on a paid one the records themselves, up to
	// 100 a type, the network announcing each address, the other domains on its first IPv4 address, the
	// organization's IP ranges, whether it is a disposable email domain, what its home page says of itself and
	// links to, and the domains whose home page redirects or links to it. An internationalized name is answered
	// under its punycode spelling.
	//
	// Corresponds with GET /domain/{domain} (the `LookupDomain` operationId).
	LookupDomain(ctx context.Context, domain string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// LookupMyIP My IP
	//
	// The address you are calling from, answered as `GET /{ip}` would answer it, and charged as
	// that lookup is.
	//
	// Corresponds with GET /myip (the `LookupMyIP` operationId).
	LookupMyIP(ctx context.Context, params *LookupMyIPParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// OauthAuthorize Authorize
	//
	// The browser entry point for the authorization-code flow. This is a
	// redirect target, not something to call from code.
	//
	// Any client may sign in without registering first by using a Client ID
	// Metadata Document: make `client_id` an https URL that serves your
	// client's metadata as JSON, naming that same URL as its `client_id`,
	// with `token_endpoint_auth_method` `none` and your `redirect_uris`. An
	// https redirect URI must be on the same origin as the `client_id`; a
	// loopback one (`http://127.0.0.1`, `http://[::1]`, `http://localhost`)
	// matches on any port. Such a client is granted `apikeys.use` at most. A
	// client registered at `/oauth/register` uses the `client_id` it was
	// given and one of the `redirect_uris` it registered.
	//
	// An unknown `client_id` or an unregistered `redirect_uri` is shown to the
	// person and never redirected, because sending an error to an address we
	// have not verified belongs to you is how an open redirector works. Any
	// other error in the request is shown to the person too: anyone can make a
	// client, so its `redirect_uri` is verified only as its own (RFC 9700
	// section 4.11.2). Only the person's answer comes back to your
	// `redirect_uri`: a `code`, or `error` `access_denied`, each with your
	// `state` and `iss`.
	//
	// Corresponds with GET /oauth/authorize (the `OauthAuthorize` operationId).
	OauthAuthorize(ctx context.Context, params *OauthAuthorizeParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// OauthDeviceAuthorizationWithBody Device authorization
	//
	// Starts the device flow. Show the `user_code` to the person and send them
	// to `verification_uri`; `verification_uri_complete` has the code already
	// embedded, which is what to open if you can open a browser at all.
	//
	// Then poll `/oauth/token`, no faster than `interval` seconds.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /oauth/device_authorization (the `OauthDeviceAuthorization` operationId).
	OauthDeviceAuthorizationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// OauthDeviceAuthorizationWithFormdataBody Device authorization
	//
	// Starts the device flow. Show the `user_code` to the person and send them
	// to `verification_uri`; `verification_uri_complete` has the code already
	// embedded, which is what to open if you can open a browser at all.
	//
	// Then poll `/oauth/token`, no faster than `interval` seconds.
	//
	// Takes a body of the `application/x-www-form-urlencoded` content type.
	//
	// Corresponds with POST /oauth/device_authorization (the `OauthDeviceAuthorization` operationId).
	OauthDeviceAuthorizationWithFormdataBody(ctx context.Context, body OauthDeviceAuthorizationFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// OauthRegisterWithBody Register
	//
	// RFC 7591 dynamic client registration, for a client that cannot use a
	// Client ID Metadata Document. Post your client's metadata as JSON, then
	// use the `client_id` in the answer at `/oauth/authorize` and
	// `/oauth/token`. Nothing is kept until a person approves your client, so
	// registering again costs nothing and leaves nothing to clean up.
	//
	// Each redirect URI must be https on a public host name, or http on a
	// loopback address (`127.0.0.1`, `[::1]`, `localhost`), which then
	// matches on any port. A custom URI scheme is refused: use a loopback
	// redirect instead. So is a host on one of our own domains.
	//
	// `client_name` is shown to the person as your client's own claim, with
	// where its redirect goes beside it. A name that renders blank, or mixes
	// Latin letters with Cyrillic or Greek ones, is shown as an unnamed
	// application.
	//
	// The client is public whatever you ask for: `token_endpoint_auth_method`
	// comes back `none`, there is no client secret, and every authorization
	// proves itself with PKCE. It may be granted `apikeys.use` at most.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /oauth/register (the `OauthRegister` operationId).
	OauthRegisterWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// OauthRegister Register
	//
	// RFC 7591 dynamic client registration, for a client that cannot use a
	// Client ID Metadata Document. Post your client's metadata as JSON, then
	// use the `client_id` in the answer at `/oauth/authorize` and
	// `/oauth/token`. Nothing is kept until a person approves your client, so
	// registering again costs nothing and leaves nothing to clean up.
	//
	// Each redirect URI must be https on a public host name, or http on a
	// loopback address (`127.0.0.1`, `[::1]`, `localhost`), which then
	// matches on any port. A custom URI scheme is refused: use a loopback
	// redirect instead. So is a host on one of our own domains.
	//
	// `client_name` is shown to the person as your client's own claim, with
	// where its redirect goes beside it. A name that renders blank, or mixes
	// Latin letters with Cyrillic or Greek ones, is shown as an unnamed
	// application.
	//
	// The client is public whatever you ask for: `token_endpoint_auth_method`
	// comes back `none`, there is no client secret, and every authorization
	// proves itself with PKCE. It may be granted `apikeys.use` at most.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /oauth/register (the `OauthRegister` operationId).
	OauthRegister(ctx context.Context, body OauthRegisterJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// OauthRevokeWithBody Revoke
	//
	// RFC 7009. Always answers 200, even for a token that was never valid, so
	// it can't be used to test whether a token is live.
	//
	// Revoking a refresh token ends the whole authorization and takes its
	// access tokens with it. Revoking an access token affects only that token.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /oauth/revoke (the `OauthRevoke` operationId).
	OauthRevokeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// OauthRevokeWithFormdataBody Revoke
	//
	// RFC 7009. Always answers 200, even for a token that was never valid, so
	// it can't be used to test whether a token is live.
	//
	// Revoking a refresh token ends the whole authorization and takes its
	// access tokens with it. Revoking an access token affects only that token.
	//
	// Takes a body of the `application/x-www-form-urlencoded` content type.
	//
	// Corresponds with POST /oauth/revoke (the `OauthRevoke` operationId).
	OauthRevokeWithFormdataBody(ctx context.Context, body OauthRevokeFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// OauthTokenWithBody Token
	//
	// Issues tokens for three grant types: a device code, an authorization
	// code and a refresh token.
	//
	// `urn:ietf:params:oauth:grant-type:device_code` polls a device
	// authorization. Until the person approves it answers
	// `authorization_pending`; poll faster than `interval` and it answers
	// `slow_down`, which means widen your interval and keep it widened.
	//
	// `authorization_code` exchanges a code from `/oauth/authorize`, with the
	// `code_verifier` matching the challenge you sent and the same
	// `redirect_uri`. A code works once: presenting it again also revokes
	// what the first exchange issued.
	//
	// `refresh_token` exchanges a refresh token. The presented token is
	// consumed whatever happens next, so store the new one before using it.
	// Presenting a consumed refresh token again ends the whole authorization,
	// since it means the token was copied.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /oauth/token (the `OauthToken` operationId).
	OauthTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// OauthTokenWithFormdataBody Token
	//
	// Issues tokens for three grant types: a device code, an authorization
	// code and a refresh token.
	//
	// `urn:ietf:params:oauth:grant-type:device_code` polls a device
	// authorization. Until the person approves it answers
	// `authorization_pending`; poll faster than `interval` and it answers
	// `slow_down`, which means widen your interval and keep it widened.
	//
	// `authorization_code` exchanges a code from `/oauth/authorize`, with the
	// `code_verifier` matching the challenge you sent and the same
	// `redirect_uri`. A code works once: presenting it again also revokes
	// what the first exchange issued.
	//
	// `refresh_token` exchanges a refresh token. The presented token is
	// consumed whatever happens next, so store the new one before using it.
	// Presenting a consumed refresh token again ends the whole authorization,
	// since it means the token was copied.
	//
	// Takes a body of the `application/x-www-form-urlencoded` content type.
	//
	// Corresponds with POST /oauth/token (the `OauthToken` operationId).
	OauthTokenWithFormdataBody(ctx context.Context, body OauthTokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// LookupIP IP lookup
	//
	// Answers what every database says about one IPv4 or IPv6 address. Which fields come back is
	// decided by the presented key; with no key, on the free plan, the answer carries the fields in the
	// address table's free column. The path also takes `AS15169` or a domain, as internetdata.io's pages do,
	// and then answers as `GET /asn/{asn}` or `GET /domain/{domain}` would.
	//
	// Corresponds with GET /{ip} (the `LookupIP` operationId).
	LookupIP(ctx context.Context, ip string, params *LookupIPParams, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientRegistration

type ClientRegistration struct {
	ClientID string `json:"client_id"`

	// ClientIDIssuedAt Unix seconds. 64-bit, since 32 bits run out on 2038-01-19.
	ClientIDIssuedAt int64 `json:"client_id_issued_at"`

	// ClientName As the person will see it.
	ClientName string `json:"client_name"`

	// GrantTypes `authorization_code` and `refresh_token`.
	GrantTypes    *[]string `json:"grant_types,omitempty"`
	RedirectUris  []string  `json:"redirect_uris"`
	ResponseTypes *[]string `json:"response_types,omitempty"`

	// Scope The most this client may be granted: `apikeys.use`.
	Scope *string `json:"scope,omitempty"`

	// TokenEndpointAuthMethod Always `none`.
	TokenEndpointAuthMethod string `json:"token_endpoint_auth_method"`
}

ClientRegistration defines model for ClientRegistration.

type ClientRegistrationRequest

type ClientRegistrationRequest struct {
	// ClientName Shown to the person as your client's own claim, marked unverified, beside where its redirect goes.
	ClientName *string `json:"client_name,omitempty"`

	// GrantTypes Must include `authorization_code` when given.
	GrantTypes *[]string `json:"grant_types,omitempty"`

	// RedirectUris One to ten, each matched exactly, apart from a loopback one's port.
	RedirectUris []string `json:"redirect_uris"`

	// ResponseTypes Must include `code` when given.
	ResponseTypes *[]string `json:"response_types,omitempty"`

	// TokenEndpointAuthMethod Read as `none`, whatever is sent.
	TokenEndpointAuthMethod *string `json:"token_endpoint_auth_method,omitempty"`
}

ClientRegistrationRequest defines model for ClientRegistrationRequest.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) AccountCreateApikeyWithBodyWithResponse

func (c *ClientWithResponses) AccountCreateApikeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AccountCreateApikeyResponse, error)

AccountCreateApikeyWithBodyWithResponse Create

Creates an API key and returns its secret, which no list ever shows: keep it, or reveal it again later.

Needs the `apikeys.manage` scope.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /api/v1/iam/apikeys (the `AccountCreateApikey` operationId).

func (*ClientWithResponses) AccountCreateApikeyWithResponse

func (c *ClientWithResponses) AccountCreateApikeyWithResponse(ctx context.Context, body AccountCreateApikeyJSONRequestBody, reqEditors ...RequestEditorFn) (*AccountCreateApikeyResponse, error)

AccountCreateApikeyWithResponse Create

Creates an API key and returns its secret, which no list ever shows: keep it, or reveal it again later.

Needs the `apikeys.manage` scope.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /api/v1/iam/apikeys (the `AccountCreateApikey` operationId).

func (*ClientWithResponses) AccountIdentityWithResponse

func (c *ClientWithResponses) AccountIdentityWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*AccountIdentityResponse, error)

AccountIdentityWithResponse Identity

The identity behind this credential: what it is, the organization it is scoped to, and the scopes it currently holds.

`user` is present for an OAuth token and absent for an API key, which has an organization but no person behind it. `credential.kind` says which you are holding, so a client can branch without guessing from a missing field.

Narrower than what the console shows its own user on purpose: an integration needs a name to display and an organization to address, not a profile. The `scopes` array is what the credential may do right now, so a client can render its own capabilities rather than discovering them from a 403.

Needs the `account.read` scope.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/iam/identity (the `AccountIdentity` operationId).

func (*ClientWithResponses) AccountListApikeysWithResponse

func (c *ClientWithResponses) AccountListApikeysWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*AccountListApikeysResponse, error)

AccountListApikeysWithResponse List

Lists your organization's API keys with their metadata, never a secret: only Create, Rotate and Reveal return one.

A secret is never in a list, here or in the console, because a list is the response that ends up in logs, caches and support tickets.

`retrievable` says whether the secret could still be read back at all. A key issued before this product stored secrets recoverably was never kept, so `reveal` will refuse it permanently; rotating produces one that can be read.

Needs the `apikeys.read` scope.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/iam/apikeys (the `AccountListApikeys` operationId).

func (*ClientWithResponses) AccountOrgMembersWithResponse

func (c *ClientWithResponses) AccountOrgMembersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*AccountOrgMembersResponse, error)

AccountOrgMembersWithResponse Members

Lists the members of your organization. Adding or removing one is an emailed invitation in the console, not an API call.

Modeling it as one here would promise something this API does not do.

Needs the `org.read` scope.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/iam/org/members (the `AccountOrgMembers` operationId).

func (*ClientWithResponses) AccountOrgWithResponse

func (c *ClientWithResponses) AccountOrgWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*AccountOrgResponse, error)

AccountOrgWithResponse Organization

Returns the organization the presented credential is scoped to. A credential belongs to exactly one, so there is no ID to pass.

An identifier in the path could only ever be your own or a refusal.

Needs the `org.read` scope.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/iam/org (the `AccountOrg` operationId).

func (*ClientWithResponses) AccountRevealApikeyWithResponse

func (c *ClientWithResponses) AccountRevealApikeyWithResponse(ctx context.Context, id ApikeyIDParam, reqEditors ...RequestEditorFn) (*AccountRevealApikeyResponse, error)

AccountRevealApikeyWithResponse Reveal

Returns an existing key's secret.

Its own scope rather than part of `apikeys.manage`, because the two are different acts: rotating replaces a secret you never see, while this hands one over.

Refused with `NOT_RETRIEVABLE` for a key issued before this product stored secrets recoverably - that secret was never kept, so no retry will ever produce it. Rotate the key instead.

Needs the `apikeys.reveal` scope.

Returns a wrapper object for the known response body format(s).

Corresponds with POST /api/v1/iam/apikeys/{id}/reveal (the `AccountRevealApikey` operationId).

func (*ClientWithResponses) AccountRevokeApikeyWithResponse

func (c *ClientWithResponses) AccountRevokeApikeyWithResponse(ctx context.Context, id ApikeyIDParam, reqEditors ...RequestEditorFn) (*AccountRevokeApikeyResponse, error)

AccountRevokeApikeyWithResponse Revoke

Stops the key working. Revocation is soft: the key stays listed with a `revoked_at`, because the organization still owns whatever it did while it was alive.

Needs the `apikeys.manage` scope.

Returns a wrapper object for the known response body format(s).

Corresponds with POST /api/v1/iam/apikeys/{id}/revoke (the `AccountRevokeApikey` operationId).

func (*ClientWithResponses) AccountRotateApikeyWithResponse

func (c *ClientWithResponses) AccountRotateApikeyWithResponse(ctx context.Context, id ApikeyIDParam, reqEditors ...RequestEditorFn) (*AccountRotateApikeyResponse, error)

AccountRotateApikeyWithResponse Rotate

Replaces the secret behind a key, keeping its ID, name and settings. The previous secret stops working immediately. The new secret comes back in the answer, so this needs `apikeys.reveal` as well as `apikeys.manage`.

Returns a wrapper object for the known response body format(s).

Corresponds with POST /api/v1/iam/apikeys/{id}/rotate (the `AccountRotateApikey` operationId).

func (*ClientWithResponses) DatabaseChecksumV2WithResponse

func (c *ClientWithResponses) DatabaseChecksumV2WithResponse(ctx context.Context, params *DatabaseChecksumV2Params, reqEditors ...RequestEditorFn) (*DatabaseChecksumV2Response, error)

DatabaseChecksumV2WithResponse Checksums

Checksums for one published file, so a download can be verified after it lands.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v2/database/checksum (the `DatabaseChecksumV2` operationId).

func (*ClientWithResponses) DatabaseMetadataV2WithResponse

func (c *ClientWithResponses) DatabaseMetadataV2WithResponse(ctx context.Context, params *DatabaseMetadataV2Params, reqEditors ...RequestEditorFn) (*DatabaseMetadataV2Response, error)

DatabaseMetadataV2WithResponse Metadata

Poll this to decide whether today's build is worth fetching: it carries `updated` and `entries` without downloading anything.

No `format` parameter - one document describes every format the database is built in. Needs no license: it answers for every database `list` returns, whatever its `standing`.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v2/database/metadata (the `DatabaseMetadataV2` operationId).

func (*ClientWithResponses) DownloadDatabaseV2WithResponse

func (c *ClientWithResponses) DownloadDatabaseV2WithResponse(ctx context.Context, params *DownloadDatabaseV2Params, reqEditors ...RequestEditorFn) (*DownloadDatabaseV2Response, error)

DownloadDatabaseV2WithResponse Download

Downloads one file of a database: the answer is a `302` to time-limited object storage, so follow the redirect.

The bytes come straight from object storage rather than through this API.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v2/database/download (the `DownloadDatabaseV2` operationId).

func (*ClientWithResponses) ListDatabasesWithResponse

func (c *ClientWithResponses) ListDatabasesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListDatabasesResponse, error)

ListDatabasesWithResponse List

The whole published catalog, with your organization's license beside each entry, so `standing` says whether a database is yours today (`licensed`), was (`expired`), or has never been bought (`unlicensed`).

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v2/database/list (the `ListDatabases` operationId).

func (*ClientWithResponses) ListDownloadsWithResponse

func (c *ClientWithResponses) ListDownloadsWithResponse(ctx context.Context, params *ListDownloadsParams, reqEditors ...RequestEditorFn) (*ListDownloadsResponse, error)

ListDownloadsWithResponse History

Lists your organization's recent database downloads, newest first, refused ones included, so a download that stopped working shows why.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v2/database/downloads (the `ListDownloads` operationId).

func (*ClientWithResponses) LookupAsnWithResponse

func (c *ClientWithResponses) LookupAsnWithResponse(ctx context.Context, asn string, reqEditors ...RequestEditorFn) (*LookupAsnResponse, error)

LookupAsnWithResponse ASN lookup

Answers what InternetData knows about one autonomous system: its registration on every plan, and on a paid one its ASN Whois record, every prefix it announces in global BGP, with RPKI status, up to 20000 per address family, its rank, Tier 1 flag, upstreams, peers and downstreams from ASN Extended, up to 20000 each (the counts beside them are always whole), and the domains it hosts. An AS no database knows answers its number with empty values.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /asn/{asn} (the `LookupAsn` operationId).

func (*ClientWithResponses) LookupBatchWithBodyWithResponse

func (c *ClientWithResponses) LookupBatchWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LookupBatchResponse, error)

LookupBatchWithBodyWithResponse Batch

Up to 1000 addresses, AS numbers and domains in one call, each answered exactly as its own lookup would be and each counted as one lookup. Answers and failures are keyed by the string you sent, in the order you sent them; duplicates collapse. Needs a paid plan: a batch of one item is answered as the lookup it is on any plan, and charged as that lookup is. An overage cap reached part way through answers the remaining items with the basics and `cap_reached` `true`, in `results`.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /batch (the `LookupBatch` operationId).

func (*ClientWithResponses) LookupBatchWithResponse

func (c *ClientWithResponses) LookupBatchWithResponse(ctx context.Context, body LookupBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*LookupBatchResponse, error)

LookupBatchWithResponse Batch

Up to 1000 addresses, AS numbers and domains in one call, each answered exactly as its own lookup would be and each counted as one lookup. Answers and failures are keyed by the string you sent, in the order you sent them; duplicates collapse. Needs a paid plan: a batch of one item is answered as the lookup it is on any plan, and charged as that lookup is. An overage cap reached part way through answers the remaining items with the basics and `cap_reached` `true`, in `results`.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /batch (the `LookupBatch` operationId).

func (*ClientWithResponses) LookupDomainWithResponse

func (c *ClientWithResponses) LookupDomainWithResponse(ctx context.Context, domain string, reqEditors ...RequestEditorFn) (*LookupDomainResponse, error)

LookupDomainWithResponse Domain lookup

Answers what InternetData knows about one domain from its latest snapshots: on every plan whether it is registered and which DNS record types it has; on a paid one the records themselves, up to 100 a type, the network announcing each address, the other domains on its first IPv4 address, the organization's IP ranges, whether it is a disposable email domain, what its home page says of itself and links to, and the domains whose home page redirects or links to it. An internationalized name is answered under its punycode spelling.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /domain/{domain} (the `LookupDomain` operationId).

func (*ClientWithResponses) LookupIPWithResponse

func (c *ClientWithResponses) LookupIPWithResponse(ctx context.Context, ip string, params *LookupIPParams, reqEditors ...RequestEditorFn) (*LookupIPResponse, error)

LookupIPWithResponse IP lookup

Answers what every database says about one IPv4 or IPv6 address. Which fields come back is decided by the presented key; with no key, on the free plan, the answer carries the fields in the address table's free column. The path also takes `AS15169` or a domain, as internetdata.io's pages do, and then answers as `GET /asn/{asn}` or `GET /domain/{domain}` would.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /{ip} (the `LookupIP` operationId).

func (*ClientWithResponses) LookupMyIPWithResponse

func (c *ClientWithResponses) LookupMyIPWithResponse(ctx context.Context, params *LookupMyIPParams, reqEditors ...RequestEditorFn) (*LookupMyIPResponse, error)

LookupMyIPWithResponse My IP

The address you are calling from, answered as `GET /{ip}` would answer it, and charged as that lookup is.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /myip (the `LookupMyIP` operationId).

func (*ClientWithResponses) MyEntitlementWithResponse

func (c *ClientWithResponses) MyEntitlementWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*MyEntitlementResponse, error)

MyEntitlementWithResponse Plan and usage

Answers what the presented key is, what plan is behind it, and what has been spent against that plan's allowance in the current window.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/entitlement (the `MyEntitlement` operationId).

func (*ClientWithResponses) OauthAuthorizeWithResponse

func (c *ClientWithResponses) OauthAuthorizeWithResponse(ctx context.Context, params *OauthAuthorizeParams, reqEditors ...RequestEditorFn) (*OauthAuthorizeResponse, error)

OauthAuthorizeWithResponse Authorize

The browser entry point for the authorization-code flow. This is a redirect target, not something to call from code.

Any client may sign in without registering first by using a Client ID Metadata Document: make `client_id` an https URL that serves your client's metadata as JSON, naming that same URL as its `client_id`, with `token_endpoint_auth_method` `none` and your `redirect_uris`. An https redirect URI must be on the same origin as the `client_id`; a loopback one (`http://127.0.0.1`, `http://[::1]`, `http://localhost`) matches on any port. Such a client is granted `apikeys.use` at most. A client registered at `/oauth/register` uses the `client_id` it was given and one of the `redirect_uris` it registered.

An unknown `client_id` or an unregistered `redirect_uri` is shown to the person and never redirected, because sending an error to an address we have not verified belongs to you is how an open redirector works. Any other error in the request is shown to the person too: anyone can make a client, so its `redirect_uri` is verified only as its own (RFC 9700 section 4.11.2). Only the person's answer comes back to your `redirect_uri`: a `code`, or `error` `access_denied`, each with your `state` and `iss`.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /oauth/authorize (the `OauthAuthorize` operationId).

func (*ClientWithResponses) OauthDeviceAuthorizationWithBodyWithResponse

func (c *ClientWithResponses) OauthDeviceAuthorizationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*OauthDeviceAuthorizationResponse, error)

OauthDeviceAuthorizationWithBodyWithResponse Device authorization

Starts the device flow. Show the `user_code` to the person and send them to `verification_uri`; `verification_uri_complete` has the code already embedded, which is what to open if you can open a browser at all.

Then poll `/oauth/token`, no faster than `interval` seconds.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /oauth/device_authorization (the `OauthDeviceAuthorization` operationId).

func (*ClientWithResponses) OauthDeviceAuthorizationWithFormdataBodyWithResponse

func (c *ClientWithResponses) OauthDeviceAuthorizationWithFormdataBodyWithResponse(ctx context.Context, body OauthDeviceAuthorizationFormdataRequestBody, reqEditors ...RequestEditorFn) (*OauthDeviceAuthorizationResponse, error)

OauthDeviceAuthorizationWithFormdataBodyWithResponse Device authorization

Starts the device flow. Show the `user_code` to the person and send them to `verification_uri`; `verification_uri_complete` has the code already embedded, which is what to open if you can open a browser at all.

Then poll `/oauth/token`, no faster than `interval` seconds.

Takes a body of the `application/x-www-form-urlencoded` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /oauth/device_authorization (the `OauthDeviceAuthorization` operationId).

func (*ClientWithResponses) OauthMetadataWithResponse

func (c *ClientWithResponses) OauthMetadataWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*OauthMetadataResponse, error)

OauthMetadataWithResponse Discovery

RFC 8414 authorization server metadata: the endpoints, the grant types and the scopes this server supports.

Read this rather than hardcoding endpoints. It is also served at `/.well-known/openid-configuration`, identically, because several clients probe that path first.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /.well-known/oauth-authorization-server (the `OauthMetadata` operationId).

func (*ClientWithResponses) OauthRegisterWithBodyWithResponse

func (c *ClientWithResponses) OauthRegisterWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*OauthRegisterResponse, error)

OauthRegisterWithBodyWithResponse Register

RFC 7591 dynamic client registration, for a client that cannot use a Client ID Metadata Document. Post your client's metadata as JSON, then use the `client_id` in the answer at `/oauth/authorize` and `/oauth/token`. Nothing is kept until a person approves your client, so registering again costs nothing and leaves nothing to clean up.

Each redirect URI must be https on a public host name, or http on a loopback address (`127.0.0.1`, `[::1]`, `localhost`), which then matches on any port. A custom URI scheme is refused: use a loopback redirect instead. So is a host on one of our own domains.

`client_name` is shown to the person as your client's own claim, with where its redirect goes beside it. A name that renders blank, or mixes Latin letters with Cyrillic or Greek ones, is shown as an unnamed application.

The client is public whatever you ask for: `token_endpoint_auth_method` comes back `none`, there is no client secret, and every authorization proves itself with PKCE. It may be granted `apikeys.use` at most.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /oauth/register (the `OauthRegister` operationId).

func (*ClientWithResponses) OauthRegisterWithResponse

func (c *ClientWithResponses) OauthRegisterWithResponse(ctx context.Context, body OauthRegisterJSONRequestBody, reqEditors ...RequestEditorFn) (*OauthRegisterResponse, error)

OauthRegisterWithResponse Register

RFC 7591 dynamic client registration, for a client that cannot use a Client ID Metadata Document. Post your client's metadata as JSON, then use the `client_id` in the answer at `/oauth/authorize` and `/oauth/token`. Nothing is kept until a person approves your client, so registering again costs nothing and leaves nothing to clean up.

Each redirect URI must be https on a public host name, or http on a loopback address (`127.0.0.1`, `[::1]`, `localhost`), which then matches on any port. A custom URI scheme is refused: use a loopback redirect instead. So is a host on one of our own domains.

`client_name` is shown to the person as your client's own claim, with where its redirect goes beside it. A name that renders blank, or mixes Latin letters with Cyrillic or Greek ones, is shown as an unnamed application.

The client is public whatever you ask for: `token_endpoint_auth_method` comes back `none`, there is no client secret, and every authorization proves itself with PKCE. It may be granted `apikeys.use` at most.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /oauth/register (the `OauthRegister` operationId).

func (*ClientWithResponses) OauthRevokeWithBodyWithResponse

func (c *ClientWithResponses) OauthRevokeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*OauthRevokeResponse, error)

OauthRevokeWithBodyWithResponse Revoke

RFC 7009. Always answers 200, even for a token that was never valid, so it can't be used to test whether a token is live.

Revoking a refresh token ends the whole authorization and takes its access tokens with it. Revoking an access token affects only that token.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /oauth/revoke (the `OauthRevoke` operationId).

func (*ClientWithResponses) OauthRevokeWithFormdataBodyWithResponse

func (c *ClientWithResponses) OauthRevokeWithFormdataBodyWithResponse(ctx context.Context, body OauthRevokeFormdataRequestBody, reqEditors ...RequestEditorFn) (*OauthRevokeResponse, error)

OauthRevokeWithFormdataBodyWithResponse Revoke

RFC 7009. Always answers 200, even for a token that was never valid, so it can't be used to test whether a token is live.

Revoking a refresh token ends the whole authorization and takes its access tokens with it. Revoking an access token affects only that token.

Takes a body of the `application/x-www-form-urlencoded` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /oauth/revoke (the `OauthRevoke` operationId).

func (*ClientWithResponses) OauthTokenWithBodyWithResponse

func (c *ClientWithResponses) OauthTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*OauthTokenResponse, error)

OauthTokenWithBodyWithResponse Token

Issues tokens for three grant types: a device code, an authorization code and a refresh token.

`urn:ietf:params:oauth:grant-type:device_code` polls a device authorization. Until the person approves it answers `authorization_pending`; poll faster than `interval` and it answers `slow_down`, which means widen your interval and keep it widened.

`authorization_code` exchanges a code from `/oauth/authorize`, with the `code_verifier` matching the challenge you sent and the same `redirect_uri`. A code works once: presenting it again also revokes what the first exchange issued.

`refresh_token` exchanges a refresh token. The presented token is consumed whatever happens next, so store the new one before using it. Presenting a consumed refresh token again ends the whole authorization, since it means the token was copied.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /oauth/token (the `OauthToken` operationId).

func (*ClientWithResponses) OauthTokenWithFormdataBodyWithResponse

func (c *ClientWithResponses) OauthTokenWithFormdataBodyWithResponse(ctx context.Context, body OauthTokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*OauthTokenResponse, error)

OauthTokenWithFormdataBodyWithResponse Token

Issues tokens for three grant types: a device code, an authorization code and a refresh token.

`urn:ietf:params:oauth:grant-type:device_code` polls a device authorization. Until the person approves it answers `authorization_pending`; poll faster than `interval` and it answers `slow_down`, which means widen your interval and keep it widened.

`authorization_code` exchanges a code from `/oauth/authorize`, with the `code_verifier` matching the challenge you sent and the same `redirect_uri`. A code works once: presenting it again also revokes what the first exchange issued.

`refresh_token` exchanges a refresh token. The presented token is consumed whatever happens next, so store the new one before using it. Presenting a consumed refresh token again ends the whole authorization, since it means the token was copied.

Takes a body of the `application/x-www-form-urlencoded` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /oauth/token (the `OauthToken` operationId).

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {

	// OauthMetadataWithResponse Discovery
	//
	// RFC 8414 authorization server metadata: the endpoints, the grant types
	// and the scopes this server supports.
	//
	// Read this rather than hardcoding endpoints. It is also served at
	// `/.well-known/openid-configuration`, identically, because several
	// clients probe that path first.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /.well-known/oauth-authorization-server (the `OauthMetadata` operationId).
	OauthMetadataWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*OauthMetadataResponse, error)

	// MyEntitlementWithResponse Plan and usage
	//
	// Answers what the presented key is, what plan is behind it, and what has
	// been spent against that plan's allowance in the current window.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/entitlement (the `MyEntitlement` operationId).
	MyEntitlementWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*MyEntitlementResponse, error)

	// AccountListApikeysWithResponse List
	//
	// Lists your organization's API keys with their metadata, never a secret:
	// only Create, Rotate and Reveal return one.
	//
	// A secret is never in a list, here or in the console, because a list is
	// the response that ends up in logs, caches and support tickets.
	//
	// `retrievable` says whether the secret could still be read back at all.
	// A key issued before this product stored secrets recoverably was never
	// kept, so `reveal` will refuse it permanently; rotating produces one
	// that can be read.
	//
	// Needs the `apikeys.read` scope.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/iam/apikeys (the `AccountListApikeys` operationId).
	AccountListApikeysWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*AccountListApikeysResponse, error)

	// AccountCreateApikeyWithBodyWithResponse Create
	//
	// Creates an API key and returns its secret, which no list ever shows:
	// keep it, or reveal it again later.
	//
	// Needs the `apikeys.manage` scope.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/v1/iam/apikeys (the `AccountCreateApikey` operationId).
	AccountCreateApikeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AccountCreateApikeyResponse, error)

	// AccountCreateApikeyWithResponse Create
	//
	// Creates an API key and returns its secret, which no list ever shows:
	// keep it, or reveal it again later.
	//
	// Needs the `apikeys.manage` scope.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/v1/iam/apikeys (the `AccountCreateApikey` operationId).
	AccountCreateApikeyWithResponse(ctx context.Context, body AccountCreateApikeyJSONRequestBody, reqEditors ...RequestEditorFn) (*AccountCreateApikeyResponse, error)

	// AccountRevealApikeyWithResponse Reveal
	//
	// Returns an existing key's secret.
	//
	// Its own scope rather than part of `apikeys.manage`, because the two are
	// different acts: rotating replaces a secret you never see, while this
	// hands one over.
	//
	// Refused with `NOT_RETRIEVABLE` for a key issued before this product
	// stored secrets recoverably - that secret was never kept, so no retry
	// will ever produce it. Rotate the key instead.
	//
	// Needs the `apikeys.reveal` scope.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/v1/iam/apikeys/{id}/reveal (the `AccountRevealApikey` operationId).
	AccountRevealApikeyWithResponse(ctx context.Context, id ApikeyIDParam, reqEditors ...RequestEditorFn) (*AccountRevealApikeyResponse, error)

	// AccountRevokeApikeyWithResponse Revoke
	//
	// Stops the key working. Revocation is soft: the key stays listed with a
	// `revoked_at`, because the organization still owns whatever it did while
	// it was alive.
	//
	// Needs the `apikeys.manage` scope.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/v1/iam/apikeys/{id}/revoke (the `AccountRevokeApikey` operationId).
	AccountRevokeApikeyWithResponse(ctx context.Context, id ApikeyIDParam, reqEditors ...RequestEditorFn) (*AccountRevokeApikeyResponse, error)

	// AccountRotateApikeyWithResponse Rotate
	//
	// Replaces the secret behind a key, keeping its ID, name and settings.
	// The previous secret stops working immediately. The new secret comes
	// back in the answer, so this needs `apikeys.reveal` as well as
	// `apikeys.manage`.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/v1/iam/apikeys/{id}/rotate (the `AccountRotateApikey` operationId).
	AccountRotateApikeyWithResponse(ctx context.Context, id ApikeyIDParam, reqEditors ...RequestEditorFn) (*AccountRotateApikeyResponse, error)

	// AccountIdentityWithResponse Identity
	//
	// The identity behind this credential: what it is, the organization it is
	// scoped to, and the scopes it currently holds.
	//
	// `user` is present for an OAuth token and absent for an API key, which
	// has an organization but no person behind it. `credential.kind` says
	// which you are holding, so a client can branch without guessing from a
	// missing field.
	//
	// Narrower than what the console shows its own user on purpose: an
	// integration needs a name to display and an organization to address, not
	// a profile. The `scopes` array is what the credential may do right now,
	// so a client can render its own capabilities rather than discovering
	// them from a 403.
	//
	// Needs the `account.read` scope.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/iam/identity (the `AccountIdentity` operationId).
	AccountIdentityWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*AccountIdentityResponse, error)

	// AccountOrgWithResponse Organization
	//
	// Returns the organization the presented credential is scoped to. A
	// credential belongs to exactly one, so there is no ID to pass.
	//
	// An identifier in the path could only ever be your own or a refusal.
	//
	// Needs the `org.read` scope.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/iam/org (the `AccountOrg` operationId).
	AccountOrgWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*AccountOrgResponse, error)

	// AccountOrgMembersWithResponse Members
	//
	// Lists the members of your organization. Adding or removing one is an
	// emailed invitation in the console, not an API call.
	//
	// Modeling it as one here would promise something this API does not do.
	//
	// Needs the `org.read` scope.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/iam/org/members (the `AccountOrgMembers` operationId).
	AccountOrgMembersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*AccountOrgMembersResponse, error)

	// DatabaseChecksumV2WithResponse Checksums
	//
	// Checksums for one published file, so a download can be verified after it lands.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v2/database/checksum (the `DatabaseChecksumV2` operationId).
	DatabaseChecksumV2WithResponse(ctx context.Context, params *DatabaseChecksumV2Params, reqEditors ...RequestEditorFn) (*DatabaseChecksumV2Response, error)

	// DownloadDatabaseV2WithResponse Download
	//
	// Downloads one file of a database: the answer is a `302` to time-limited
	// object storage, so follow the redirect.
	//
	// The bytes come straight from object storage rather than through this API.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v2/database/download (the `DownloadDatabaseV2` operationId).
	DownloadDatabaseV2WithResponse(ctx context.Context, params *DownloadDatabaseV2Params, reqEditors ...RequestEditorFn) (*DownloadDatabaseV2Response, error)

	// ListDownloadsWithResponse History
	//
	// Lists your organization's recent database downloads, newest first,
	// refused ones included, so a download that stopped working shows why.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v2/database/downloads (the `ListDownloads` operationId).
	ListDownloadsWithResponse(ctx context.Context, params *ListDownloadsParams, reqEditors ...RequestEditorFn) (*ListDownloadsResponse, error)

	// ListDatabasesWithResponse List
	//
	// The whole published catalog, with your organization's license beside
	// each entry, so `standing` says whether a database is yours today
	// (`licensed`), was (`expired`), or has never been bought (`unlicensed`).
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v2/database/list (the `ListDatabases` operationId).
	ListDatabasesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListDatabasesResponse, error)

	// DatabaseMetadataV2WithResponse Metadata
	//
	// Poll this to decide whether today's build is worth fetching: it carries
	// `updated` and `entries` without downloading anything.
	//
	// No `format` parameter - one document describes every format the database
	// is built in. Needs no license: it answers for every database `list`
	// returns, whatever its `standing`.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v2/database/metadata (the `DatabaseMetadataV2` operationId).
	DatabaseMetadataV2WithResponse(ctx context.Context, params *DatabaseMetadataV2Params, reqEditors ...RequestEditorFn) (*DatabaseMetadataV2Response, error)

	// LookupAsnWithResponse ASN lookup
	//
	// Answers what InternetData knows about one autonomous system: its registration on every plan,
	// and on a paid one its ASN Whois record, every prefix it announces in global BGP, with RPKI status,
	// up to 20000 per address family, its rank, Tier 1 flag, upstreams, peers and downstreams from ASN
	// Extended, up to 20000 each (the counts beside them are always whole), and the domains it hosts. An AS no
	// database knows answers its number with empty values.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /asn/{asn} (the `LookupAsn` operationId).
	LookupAsnWithResponse(ctx context.Context, asn string, reqEditors ...RequestEditorFn) (*LookupAsnResponse, error)

	// LookupBatchWithBodyWithResponse Batch
	//
	// Up to 1000 addresses, AS numbers and domains in one call, each answered exactly as its own
	// lookup would be and each counted as one lookup. Answers and failures are keyed by the string you sent, in
	// the order you sent them; duplicates collapse. Needs a paid plan: a batch of one item is answered as the
	// lookup it is on any plan, and charged as that lookup is. An overage cap reached part way through answers
	// the remaining items with the basics and `cap_reached` `true`, in `results`.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /batch (the `LookupBatch` operationId).
	LookupBatchWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LookupBatchResponse, error)

	// LookupBatchWithResponse Batch
	//
	// Up to 1000 addresses, AS numbers and domains in one call, each answered exactly as its own
	// lookup would be and each counted as one lookup. Answers and failures are keyed by the string you sent, in
	// the order you sent them; duplicates collapse. Needs a paid plan: a batch of one item is answered as the
	// lookup it is on any plan, and charged as that lookup is. An overage cap reached part way through answers
	// the remaining items with the basics and `cap_reached` `true`, in `results`.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /batch (the `LookupBatch` operationId).
	LookupBatchWithResponse(ctx context.Context, body LookupBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*LookupBatchResponse, error)

	// LookupDomainWithResponse Domain lookup
	//
	// Answers what InternetData knows about one domain from its latest snapshots: on every plan
	// whether it is registered and which DNS record types it has; on a paid one the records themselves, up to
	// 100 a type, the network announcing each address, the other domains on its first IPv4 address, the
	// organization's IP ranges, whether it is a disposable email domain, what its home page says of itself and
	// links to, and the domains whose home page redirects or links to it. An internationalized name is answered
	// under its punycode spelling.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /domain/{domain} (the `LookupDomain` operationId).
	LookupDomainWithResponse(ctx context.Context, domain string, reqEditors ...RequestEditorFn) (*LookupDomainResponse, error)

	// LookupMyIPWithResponse My IP
	//
	// The address you are calling from, answered as `GET /{ip}` would answer it, and charged as
	// that lookup is.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /myip (the `LookupMyIP` operationId).
	LookupMyIPWithResponse(ctx context.Context, params *LookupMyIPParams, reqEditors ...RequestEditorFn) (*LookupMyIPResponse, error)

	// OauthAuthorizeWithResponse Authorize
	//
	// The browser entry point for the authorization-code flow. This is a
	// redirect target, not something to call from code.
	//
	// Any client may sign in without registering first by using a Client ID
	// Metadata Document: make `client_id` an https URL that serves your
	// client's metadata as JSON, naming that same URL as its `client_id`,
	// with `token_endpoint_auth_method` `none` and your `redirect_uris`. An
	// https redirect URI must be on the same origin as the `client_id`; a
	// loopback one (`http://127.0.0.1`, `http://[::1]`, `http://localhost`)
	// matches on any port. Such a client is granted `apikeys.use` at most. A
	// client registered at `/oauth/register` uses the `client_id` it was
	// given and one of the `redirect_uris` it registered.
	//
	// An unknown `client_id` or an unregistered `redirect_uri` is shown to the
	// person and never redirected, because sending an error to an address we
	// have not verified belongs to you is how an open redirector works. Any
	// other error in the request is shown to the person too: anyone can make a
	// client, so its `redirect_uri` is verified only as its own (RFC 9700
	// section 4.11.2). Only the person's answer comes back to your
	// `redirect_uri`: a `code`, or `error` `access_denied`, each with your
	// `state` and `iss`.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /oauth/authorize (the `OauthAuthorize` operationId).
	OauthAuthorizeWithResponse(ctx context.Context, params *OauthAuthorizeParams, reqEditors ...RequestEditorFn) (*OauthAuthorizeResponse, error)

	// OauthDeviceAuthorizationWithBodyWithResponse Device authorization
	//
	// Starts the device flow. Show the `user_code` to the person and send them
	// to `verification_uri`; `verification_uri_complete` has the code already
	// embedded, which is what to open if you can open a browser at all.
	//
	// Then poll `/oauth/token`, no faster than `interval` seconds.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /oauth/device_authorization (the `OauthDeviceAuthorization` operationId).
	OauthDeviceAuthorizationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*OauthDeviceAuthorizationResponse, error)

	// OauthDeviceAuthorizationWithFormdataBodyWithResponse Device authorization
	//
	// Starts the device flow. Show the `user_code` to the person and send them
	// to `verification_uri`; `verification_uri_complete` has the code already
	// embedded, which is what to open if you can open a browser at all.
	//
	// Then poll `/oauth/token`, no faster than `interval` seconds.
	//
	// Takes a body of the `application/x-www-form-urlencoded` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /oauth/device_authorization (the `OauthDeviceAuthorization` operationId).
	OauthDeviceAuthorizationWithFormdataBodyWithResponse(ctx context.Context, body OauthDeviceAuthorizationFormdataRequestBody, reqEditors ...RequestEditorFn) (*OauthDeviceAuthorizationResponse, error)

	// OauthRegisterWithBodyWithResponse Register
	//
	// RFC 7591 dynamic client registration, for a client that cannot use a
	// Client ID Metadata Document. Post your client's metadata as JSON, then
	// use the `client_id` in the answer at `/oauth/authorize` and
	// `/oauth/token`. Nothing is kept until a person approves your client, so
	// registering again costs nothing and leaves nothing to clean up.
	//
	// Each redirect URI must be https on a public host name, or http on a
	// loopback address (`127.0.0.1`, `[::1]`, `localhost`), which then
	// matches on any port. A custom URI scheme is refused: use a loopback
	// redirect instead. So is a host on one of our own domains.
	//
	// `client_name` is shown to the person as your client's own claim, with
	// where its redirect goes beside it. A name that renders blank, or mixes
	// Latin letters with Cyrillic or Greek ones, is shown as an unnamed
	// application.
	//
	// The client is public whatever you ask for: `token_endpoint_auth_method`
	// comes back `none`, there is no client secret, and every authorization
	// proves itself with PKCE. It may be granted `apikeys.use` at most.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /oauth/register (the `OauthRegister` operationId).
	OauthRegisterWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*OauthRegisterResponse, error)

	// OauthRegisterWithResponse Register
	//
	// RFC 7591 dynamic client registration, for a client that cannot use a
	// Client ID Metadata Document. Post your client's metadata as JSON, then
	// use the `client_id` in the answer at `/oauth/authorize` and
	// `/oauth/token`. Nothing is kept until a person approves your client, so
	// registering again costs nothing and leaves nothing to clean up.
	//
	// Each redirect URI must be https on a public host name, or http on a
	// loopback address (`127.0.0.1`, `[::1]`, `localhost`), which then
	// matches on any port. A custom URI scheme is refused: use a loopback
	// redirect instead. So is a host on one of our own domains.
	//
	// `client_name` is shown to the person as your client's own claim, with
	// where its redirect goes beside it. A name that renders blank, or mixes
	// Latin letters with Cyrillic or Greek ones, is shown as an unnamed
	// application.
	//
	// The client is public whatever you ask for: `token_endpoint_auth_method`
	// comes back `none`, there is no client secret, and every authorization
	// proves itself with PKCE. It may be granted `apikeys.use` at most.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /oauth/register (the `OauthRegister` operationId).
	OauthRegisterWithResponse(ctx context.Context, body OauthRegisterJSONRequestBody, reqEditors ...RequestEditorFn) (*OauthRegisterResponse, error)

	// OauthRevokeWithBodyWithResponse Revoke
	//
	// RFC 7009. Always answers 200, even for a token that was never valid, so
	// it can't be used to test whether a token is live.
	//
	// Revoking a refresh token ends the whole authorization and takes its
	// access tokens with it. Revoking an access token affects only that token.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /oauth/revoke (the `OauthRevoke` operationId).
	OauthRevokeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*OauthRevokeResponse, error)

	// OauthRevokeWithFormdataBodyWithResponse Revoke
	//
	// RFC 7009. Always answers 200, even for a token that was never valid, so
	// it can't be used to test whether a token is live.
	//
	// Revoking a refresh token ends the whole authorization and takes its
	// access tokens with it. Revoking an access token affects only that token.
	//
	// Takes a body of the `application/x-www-form-urlencoded` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /oauth/revoke (the `OauthRevoke` operationId).
	OauthRevokeWithFormdataBodyWithResponse(ctx context.Context, body OauthRevokeFormdataRequestBody, reqEditors ...RequestEditorFn) (*OauthRevokeResponse, error)

	// OauthTokenWithBodyWithResponse Token
	//
	// Issues tokens for three grant types: a device code, an authorization
	// code and a refresh token.
	//
	// `urn:ietf:params:oauth:grant-type:device_code` polls a device
	// authorization. Until the person approves it answers
	// `authorization_pending`; poll faster than `interval` and it answers
	// `slow_down`, which means widen your interval and keep it widened.
	//
	// `authorization_code` exchanges a code from `/oauth/authorize`, with the
	// `code_verifier` matching the challenge you sent and the same
	// `redirect_uri`. A code works once: presenting it again also revokes
	// what the first exchange issued.
	//
	// `refresh_token` exchanges a refresh token. The presented token is
	// consumed whatever happens next, so store the new one before using it.
	// Presenting a consumed refresh token again ends the whole authorization,
	// since it means the token was copied.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /oauth/token (the `OauthToken` operationId).
	OauthTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*OauthTokenResponse, error)

	// OauthTokenWithFormdataBodyWithResponse Token
	//
	// Issues tokens for three grant types: a device code, an authorization
	// code and a refresh token.
	//
	// `urn:ietf:params:oauth:grant-type:device_code` polls a device
	// authorization. Until the person approves it answers
	// `authorization_pending`; poll faster than `interval` and it answers
	// `slow_down`, which means widen your interval and keep it widened.
	//
	// `authorization_code` exchanges a code from `/oauth/authorize`, with the
	// `code_verifier` matching the challenge you sent and the same
	// `redirect_uri`. A code works once: presenting it again also revokes
	// what the first exchange issued.
	//
	// `refresh_token` exchanges a refresh token. The presented token is
	// consumed whatever happens next, so store the new one before using it.
	// Presenting a consumed refresh token again ends the whole authorization,
	// since it means the token was copied.
	//
	// Takes a body of the `application/x-www-form-urlencoded` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /oauth/token (the `OauthToken` operationId).
	OauthTokenWithFormdataBodyWithResponse(ctx context.Context, body OauthTokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*OauthTokenResponse, error)

	// LookupIPWithResponse IP lookup
	//
	// Answers what every database says about one IPv4 or IPv6 address. Which fields come back is
	// decided by the presented key; with no key, on the free plan, the answer carries the fields in the
	// address table's free column. The path also takes `AS15169` or a domain, as internetdata.io's pages do,
	// and then answers as `GET /asn/{asn}` or `GET /domain/{domain}` would.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /{ip} (the `LookupIP` operationId).
	LookupIPWithResponse(ctx context.Context, ip string, params *LookupIPParams, reqEditors ...RequestEditorFn) (*LookupIPResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type CohostedDomains

type CohostedDomains struct {
	// Domains Up to 10 of them, the most popular first, the domain itself left out; `[]` when none does.
	Domains []string `json:"domains"`

	// IP The domain's first IPv4 address, `”` where it has none.
	IP string `json:"ip"`

	// Total How many other registered domains resolve to it.
	Total int `json:"total"`
}

CohostedDomains From IP Hosted Domains: the other registered domains on the domain's first IPv4 address, how many and the 10 most popular. On a paid plan or a free key's full answers.

type Company

type Company struct {
	// Country ISO 3166 country code. On a paid plan or a free key's full answers.
	Country *string `json:"country,omitempty"`

	// Domain Their domain.
	Domain string `json:"domain"`

	// Name Who uses the address. On a paid plan or a free key's full answers.
	Name string `json:"name"`

	// Type What kind of organization: hosting, isp, business, education, government. On a paid plan or a free key's full answers.
	Type *string `json:"type,omitempty"`
}

Company Who uses the address, from IP Company.

type DBBuild

type DBBuild = string

DBBuild Example: 20261105.0t53s5

type DBChecksums

type DBChecksums struct {
	// Md5 Hex-encoded MD5 digest.
	Md5 string `json:"md5"`

	// Sha1 Hex-encoded SHA-1 digest.
	Sha1 string `json:"sha1"`

	// Sha256 Hex-encoded SHA-256 digest.
	Sha256 string `json:"sha256"`

	// Sha512 Hex-encoded SHA-512 digest.
	Sha512 string `json:"sha512"`
}

DBChecksums defines model for DbChecksums.

type DBFormat

type DBFormat = DatabaseFormat

DBFormat A file format a database version is published in.

Example: mmdb

type DBID

type DBID = string

DBID Example: vpn_ip_v1

type DNSAddressRecord

type DNSAddressRecord struct {
	// IP The address.
	IP string `json:"ip"`

	// LastSeen The last day the snapshot saw it.
	LastSeen string `json:"last_seen"`
}

DNSAddressRecord defines model for DnsAddressRecord.

type DNSCnameRecord

type DNSCnameRecord struct {
	// LastSeen The last day seen.
	LastSeen string `json:"last_seen"`

	// Target Where it points.
	Target string `json:"target"`
}

DNSCnameRecord defines model for DnsCnameRecord.

type DNSMxRecord

type DNSMxRecord struct {
	// Host The mail host.
	Host string `json:"host"`

	// LastSeen The last day seen.
	LastSeen string `json:"last_seen"`

	// Priority Its priority.
	Priority int `json:"priority"`
}

DNSMxRecord defines model for DnsMxRecord.

type DNSNsRecord

type DNSNsRecord struct {
	// Host The name server.
	Host string `json:"host"`

	// LastSeen The last day seen.
	LastSeen string `json:"last_seen"`
}

DNSNsRecord defines model for DnsNsRecord.

type DNSResolverDetail

type DNSResolverDetail struct {
	// AnswerCorrect Its answer was right.
	AnswerCorrect *bool `json:"answer_correct,omitempty"`

	// FirstSeen The first day it answered.
	FirstSeen *string `json:"first_seen,omitempty"`

	// LastSeen The last day it did.
	LastSeen *string `json:"last_seen,omitempty"`

	// Port The port it answered on.
	Port *int `json:"port,omitempty"`

	// Rcode Its answer's response code.
	Rcode *int `json:"rcode,omitempty"`

	// RecursionAvailable It offered recursion.
	RecursionAvailable *bool `json:"recursion_available,omitempty"`
}

DNSResolverDetail defines model for DnsResolverDetail.

type Database

type Database struct {
	// Base The family, e.g. `vpn_ip`. What a license is held against.
	//
	// Example: vpn_ip
	Base string `json:"base"`

	// Expires A hard stop. Null when the license has no end date, which is the normal case for a rolling agreement, and when there is no license. A rolling license reports its turnover date in renews_at instead.
	Expires *time.Time `json:"expires"`

	// LicenseType What your license permits you to do with the data. Null when there
	// is no license, which is every family with standing `unlicensed`.
	LicenseType *DatabaseLicenseType `json:"license_type"`

	// Name Example: VPN IP
	Name string `json:"name"`

	// NoticeDueAt The last day notice of non-renewal can be given for the term ending at renews_at. Null whenever renews_at is, and when the agreement records no notice period.
	NoticeDueAt *time.Time `json:"notice_due_at"`

	// Open An Open database: free under CC BY-SA 4.0 (credit InternetData,
	// https://internetdata.io, and share what you build from it under
	// the same license). Every organization holds a `standard` license
	// to it from the start, which `standing` and `license_type` report
	// like any other.
	Open bool `json:"open"`

	// RenewsAt When a rolling license next renews. Null when the license has no defined term, when expires sets a hard stop instead, and when there is no license.
	RenewsAt *time.Time `json:"renews_at"`

	// Standing Where your license for a database family stands today. `licensed` is a
	// live grant, `expired` one whose term has ended, and `unlicensed` a
	// database published but never bought.
	Standing Standing   `json:"standing"`
	Starts   *time.Time `json:"starts"`

	// Summary One line on what the newest version contains.
	Summary string `json:"summary"`

	// Versions Every published version of this family, oldest first. Old versions
	// are frozen rather than migrated, so both stay downloadable.
	Versions []DatabaseVersion `json:"versions"`
}

Database One database family, with your organization's license beside it. A license covers the family, while a download names a specific version, so the IDs passed to `download` and `checksum` come from `versions`.

type DatabaseChecksumV2Params

type DatabaseChecksumV2Params struct {
	// ID Database identifier (e.g. `vpn_ip_v1`, `resproxy_provider_v1`).
	ID DBID `form:"id" json:"id"`

	// Format Database file format.
	Format DBFormat `form:"format" json:"format"`
}

DatabaseChecksumV2Params defines parameters for DatabaseChecksumV2.

type DatabaseChecksumV2Response

type DatabaseChecksumV2Response struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *struct {
		Checksums DBChecksums `json:"checksums"`

		// Format A file format a database version is published in.
		//
		// Example: mmdb
		Format DatabaseFormat `json:"format"`
		ID     string         `json:"id"`
	}
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *Error
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *V2Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *V2Forbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *V2UnknownDatabase
	// JSON503 the response for an HTTP 503 `application/json` response
	JSON503 *V2NotAvailable
}

func ParseDatabaseChecksumV2Response

func ParseDatabaseChecksumV2Response(rsp *http.Response) (*DatabaseChecksumV2Response, error)

ParseDatabaseChecksumV2Response parses an HTTP response from a DatabaseChecksumV2WithResponse call

func (DatabaseChecksumV2Response) ContentType

func (r DatabaseChecksumV2Response) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (DatabaseChecksumV2Response) GetBody

func (r DatabaseChecksumV2Response) GetBody() []byte

GetBody returns the raw response body bytes

func (DatabaseChecksumV2Response) GetJSON200

func (r DatabaseChecksumV2Response) GetJSON200() *struct {
	Checksums DBChecksums `json:"checksums"`

	// Format A file format a database version is published in.
	//
	// Example: mmdb
	Format DatabaseFormat `json:"format"`
	ID     string         `json:"id"`
}

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (DatabaseChecksumV2Response) GetJSON400

func (r DatabaseChecksumV2Response) GetJSON400() *Error

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (DatabaseChecksumV2Response) GetJSON401

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (DatabaseChecksumV2Response) GetJSON403

func (r DatabaseChecksumV2Response) GetJSON403() *V2Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (DatabaseChecksumV2Response) GetJSON404

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (DatabaseChecksumV2Response) GetJSON503

GetJSON503 returns the response for an HTTP 503 `application/json` response

func (DatabaseChecksumV2Response) Status

Status returns HTTPResponse.Status

func (DatabaseChecksumV2Response) StatusCode

func (r DatabaseChecksumV2Response) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DatabaseFormat

type DatabaseFormat string

DatabaseFormat A file format a database version is published in.

Example: mmdb

const (
	Csvgz DatabaseFormat = "csvgz"
	Mmdb  DatabaseFormat = "mmdb"
)

Defines values for DatabaseFormat.

func (DatabaseFormat) Valid

func (e DatabaseFormat) Valid() bool

Valid indicates whether the value is a known member of the DatabaseFormat enum.

type DatabaseLicenseType

type DatabaseLicenseType string

DatabaseLicenseType What your license permits you to do with the data. Null when there is no license, which is every family with standing `unlicensed`.

const (
	Evaluation   DatabaseLicenseType = "evaluation"
	LessThanNil  DatabaseLicenseType = "<nil>"
	Redistribute DatabaseLicenseType = "redistribute"
	Standard     DatabaseLicenseType = "standard"
)

Defines values for DatabaseLicenseType.

func (DatabaseLicenseType) Valid

func (e DatabaseLicenseType) Valid() bool

Valid indicates whether the value is a known member of the DatabaseLicenseType enum.

type DatabaseMetadata

type DatabaseMetadata struct {
	// Entries Row count in the current build.
	Entries int64  `json:"entries"`
	ID      string `json:"id"`

	// Sample A few real rows, keyed by format.
	Sample *map[string][]map[string]interface{} `json:"sample,omitempty"`

	// SampleEntries Row count in the evaluation sample.
	SampleEntries *int `json:"sample_entries,omitempty"`

	// SampleSize Bytes per format of the evaluation sample, where one is published.
	SampleSize *map[string]int64 `json:"sample_size,omitempty"`

	// Schema Columns, keyed by format.
	Schema map[string][]DatabaseMetadataColumn `json:"schema"`

	// Size Bytes per format.
	Size map[string]int64 `json:"size"`

	// UpdateFreq How often a new build is published.
	UpdateFreq *string `json:"update_freq,omitempty"`

	// Updated ISO-8601 date (YYYY-MM-DD) the published build was generated on.
	//
	// Example: 2026-09-04
	Updated openapi_types.Date `json:"updated"`
}

DatabaseMetadata The build document written by the exporter, served through unchanged.

type DatabaseMetadataColumn

type DatabaseMetadataColumn struct {
	Description *string `json:"description,omitempty"`
	Name        string  `json:"name"`
	Type        string  `json:"type"`
}

DatabaseMetadataColumn defines model for DatabaseMetadataColumn.

type DatabaseMetadataV2Params

type DatabaseMetadataV2Params struct {
	// ID Database identifier (e.g. `vpn_ip_v1`, `resproxy_provider_v1`).
	ID DBID `form:"id" json:"id"`
}

DatabaseMetadataV2Params defines parameters for DatabaseMetadataV2.

type DatabaseMetadataV2Response

type DatabaseMetadataV2Response struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *DatabaseMetadata
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *V2Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *V2IpNotAllowed
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *V2UnknownDatabase
	// JSON503 the response for an HTTP 503 `application/json` response
	JSON503 *V2NotAvailable
}

func ParseDatabaseMetadataV2Response

func ParseDatabaseMetadataV2Response(rsp *http.Response) (*DatabaseMetadataV2Response, error)

ParseDatabaseMetadataV2Response parses an HTTP response from a DatabaseMetadataV2WithResponse call

func (DatabaseMetadataV2Response) ContentType

func (r DatabaseMetadataV2Response) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (DatabaseMetadataV2Response) GetBody

func (r DatabaseMetadataV2Response) GetBody() []byte

GetBody returns the raw response body bytes

func (DatabaseMetadataV2Response) GetJSON200

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (DatabaseMetadataV2Response) GetJSON401

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (DatabaseMetadataV2Response) GetJSON403

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (DatabaseMetadataV2Response) GetJSON404

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (DatabaseMetadataV2Response) GetJSON503

GetJSON503 returns the response for an HTTP 503 `application/json` response

func (DatabaseMetadataV2Response) Status

Status returns HTTPResponse.Status

func (DatabaseMetadataV2Response) StatusCode

func (r DatabaseMetadataV2Response) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DatabaseVersion

type DatabaseVersion struct {
	// Formats The formats this version is built in. Asking for another is a 400,
	// not a gap - the `_provider` catalogs are keyed by provider ID, so no
	// MMDB exists for them.
	Formats []DatabaseFormat `json:"formats"`

	// ID The versioned ID. Pass this to `download`, `checksum` and `metadata`.
	//
	// Example: vpn_ip_v1
	ID string `json:"id"`

	// SampleFormats The formats an evaluation sample is published in, if any.
	SampleFormats *[]DatabaseFormat `json:"sample_formats,omitempty"`
	Summary       string            `json:"summary"`

	// Version Example: 1
	Version int `json:"version"`
}

DatabaseVersion defines model for DatabaseVersion.

type DeviceAuthorization

type DeviceAuthorization struct {
	// DeviceCode Yours. Poll with it; never show it to anyone.
	DeviceCode string `json:"device_code"`

	// ExpiresIn Seconds until both codes expire.
	ExpiresIn int `json:"expires_in"`

	// Interval Seconds between polls.
	Interval int `json:"interval"`

	// UserCode Short and typable. This is what the person confirms.
	UserCode        string `json:"user_code"`
	VerificationURI string `json:"verification_uri"`

	// VerificationURIComplete The same page with the code already filled in.
	VerificationURIComplete *string `json:"verification_uri_complete,omitempty"`
}

DeviceAuthorization defines model for DeviceAuthorization.

type DeviceAuthorizationRequest

type DeviceAuthorizationRequest struct {
	ClientID string `json:"client_id"`

	// Resource RFC 8707: what the token is for.
	Resource *string `json:"resource,omitempty"`

	// Scope Space-delimited. Anything your client is not registered for is dropped rather than refused.
	Scope *string `json:"scope,omitempty"`
}

DeviceAuthorizationRequest defines model for DeviceAuthorizationRequest.

type DisposableDetail

type DisposableDetail struct {
	// Confidence `high`, `medium` or `low`.
	Confidence *string `json:"confidence,omitempty"`

	// FirstSeen The first day seen in use.
	FirstSeen *string `json:"first_seen,omitempty"`

	// LastSeen The last day.
	LastSeen *string `json:"last_seen,omitempty"`

	// Providers The providers behind it.
	Providers *[]string `json:"providers,omitempty"`
}

DisposableDetail defines model for DisposableDetail.

type DomainBacklinks struct {
	// Domains Up to 10 of them, the most popular first; `[]` when none does.
	Domains []string `json:"domains"`

	// Total How many registered domains have a home page that links to this domain.
	Total int `json:"total"`
}

DomainBacklinks The registered domains whose home page links to this one, how many and the 10 most popular. On a paid plan or a free key's full answers.

type DomainDNS

type DomainDNS struct {
	A     []DNSAddressRecord `json:"a"`
	Aaaa  []DNSAddressRecord `json:"aaaa"`
	Cname []DNSCnameRecord   `json:"cname"`
	Mx    []DNSMxRecord      `json:"mx"`
	Ns    []DNSNsRecord      `json:"ns"`
}

DomainDNS Its records in Domain DNS, up to 100 a type. On a paid plan or a free key's full answers.

type DomainHost

type DomainHost struct {
	// Asn The network announcing it, as an address lookup's `asn`; every member empty where IP ASN holds none.
	Asn Asn `json:"asn"`

	// IP One address the domain resolves to.
	IP string `json:"ip"`
}

DomainHost An address the domain resolves to and the network announcing it.

type DomainIPRange

type DomainIPRange struct {
	// Country ISO 3166 country code.
	Country string `json:"country"`

	// Name Its registry name.
	Name string `json:"name"`

	// Range The range.
	Range string `json:"range"`
}

DomainIPRange defines model for DomainIpRange.

type DomainIPRanges

type DomainIPRanges struct {
	// Domain The organization's domain.
	Domain string `json:"domain"`

	// Ipv4 IPv4 addresses across them.
	Ipv4 int `json:"ipv4"`

	// Ranges The first 1000, IPv4 before IPv6, the largest first.
	Ranges []DomainIPRange `json:"ranges"`

	// RedirectsTo Where its home page redirects, when that is how it was reached.
	RedirectsTo string `json:"redirects_to"`

	// Total How many ranges it holds.
	Total int `json:"total"`
}

DomainIPRanges The organization's IP ranges, from Domain IP Ranges. On a paid plan or a free key's full answers.

type DomainLookupResponse

type DomainLookupResponse struct {
	// Backlinks The registered domains whose home page links to this one, how many and the 10 most popular. On a paid plan or a free key's full answers.
	Backlinks *DomainBacklinks `json:"backlinks,omitempty"`

	// CapReached On every answer to a key, and on no other: `false` while the answer has every field, `true` once its organization's allowance is used and the answer has the basics: a free-plan key's full answers for the UTC day, or a paid key's quota or overage cap. A paid key's lookups answered past it are not billed, and raising or removing the cap in Billing turns it `false` again.
	CapReached *bool `json:"cap_reached,omitempty"`

	// CohostedDomains From IP Hosted Domains: the other registered domains on the domain's first IPv4 address, how many and the 10 most popular. On a paid plan or a free key's full answers.
	CohostedDomains *CohostedDomains `json:"cohosted_domains,omitempty"`

	// Disposable `{}` when `is_disposable` is false. On a paid plan or a free key's full answers.
	Disposable *DisposableDetail `json:"disposable,omitempty"`

	// DNS Its records in Domain DNS, up to 100 a type. On a paid plan or a free key's full answers.
	DNS *DomainDNS `json:"dns,omitempty"`

	// Domain The domain, lowercase and in punycode.
	Domain string `json:"domain"`

	// HasA It has A records.
	HasA bool `json:"has_a"`

	// HasAaaa AAAA records.
	HasAaaa bool `json:"has_aaaa"`

	// HasCname A CNAME record.
	HasCname bool `json:"has_cname"`

	// HasMx MX records.
	HasMx bool `json:"has_mx"`

	// HasNs NS records.
	HasNs bool `json:"has_ns"`

	// Hosting The network announcing each address in `dns.a` and then `dns.aaaa`, from IP ASN; `[]` where it resolves to none. On a paid plan or a free key's full answers.
	Hosting *[]DomainHost `json:"hosting,omitempty"`

	// IPRanges The organization's IP ranges, from Domain IP Ranges. On a paid plan or a free key's full answers.
	IPRanges *DomainIPRanges `json:"ip_ranges,omitempty"`

	// IsDisposable In Disposable Domain. On a paid plan or a free key's full answers.
	IsDisposable *bool `json:"is_disposable,omitempty"`

	// IsRegistered In Domain List: a registered domain.
	IsRegistered bool `json:"is_registered"`

	// Redirects The registered domains whose home page redirects to this one, how many and the 10 most popular. On a paid plan or a free key's full answers.
	Redirects *DomainRedirects `json:"redirects,omitempty"`

	// Web What our crawl last read of the domain's own home page, every member empty where it holds none. On a paid plan or a free key's full answers.
	Web *DomainWeb `json:"web,omitempty"`
}

DomainLookupResponse What every database says about one domain.

type DomainRedirects

type DomainRedirects struct {
	// Domains Up to 10 of them, the most popular first; `[]` when none does.
	Domains []string `json:"domains"`

	// Total How many registered domains have a home page that redirects to this domain.
	Total int `json:"total"`
}

DomainRedirects The registered domains whose home page redirects to this one, how many and the 10 most popular. On a paid plan or a free key's full answers.

type DomainWeb

type DomainWeb struct {
	// Description An English page's description.
	Description string `json:"description"`

	// LastSeen The day it was last read, empty when the crawl holds no page.
	LastSeen string `json:"last_seen"`

	// Links The external hosts the home page links to.
	Links DomainWebLinks `json:"links"`

	// Title An English page's title.
	Title string `json:"title"`

	// URL The URL of the home page read.
	URL string `json:"url"`
}

DomainWeb What our crawl last read of the domain's own home page, every member empty where it holds none. On a paid plan or a free key's full answers.

type DomainWebLinks struct {
	// Hosts Up to 10 of them; `[]` when it links to none.
	Hosts []string `json:"hosts"`

	// Total How many external hosts the home page links to.
	Total int `json:"total"`
}

DomainWebLinks The external hosts the home page links to.

type Download

type Download struct {
	// ApikeyID The key that made the request. Null when it could not be resolved.
	ApikeyID *string `json:"apikey_id"`

	// Bytes Object size at redirect time, not bytes delivered: the transfer is a
	// presigned redirect straight to object storage, so we never observe
	// how much of it was taken.
	Bytes      *int64    `json:"bytes"`
	ClientIP   *string   `json:"client_ip"`
	Created    time.Time `json:"created"`
	DatasetID  string    `json:"dataset_id"`
	Format     string    `json:"format"`
	HTTPStatus *int      `json:"http_status"`

	// Open A download of an Open database.
	Open    bool            `json:"open"`
	Outcome DownloadOutcome `json:"outcome"`

	// Sample The evaluation sample rather than the database itself.
	Sample    bool    `json:"sample"`
	UserAgent *string `json:"user_agent"`
}

Download One download attempt, refusals included.

type DownloadDatabaseV2Params

type DownloadDatabaseV2Params struct {
	// ID Database identifier (e.g. `vpn_ip_v1`, `resproxy_provider_v1`).
	ID DBID `form:"id" json:"id"`

	// Format Database file format.
	Format DBFormat `form:"format" json:"format"`

	// Build One build of the database, by the name a `database.updated` webhook gives
	// it, so the file is the one whose `sha256` the webhook carries. Without
	// it, the build that is live.
	Build *DBBuild `form:"build,omitempty" json:"build,omitempty"`
}

DownloadDatabaseV2Params defines parameters for DownloadDatabaseV2.

type DownloadDatabaseV2Response

type DownloadDatabaseV2Response struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *Error
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *V2Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *V2Forbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *V2UnknownDatabase
	// JSON410 the response for an HTTP 410 `application/json` response
	JSON410 *Error
	// JSON503 the response for an HTTP 503 `application/json` response
	JSON503 *V2NotAvailable
	// Headers302 the parsed response headers for an HTTP 302 response
	Headers302 *DownloadDatabaseV2Response302Headers
}

func ParseDownloadDatabaseV2Response

func ParseDownloadDatabaseV2Response(rsp *http.Response) (*DownloadDatabaseV2Response, error)

ParseDownloadDatabaseV2Response parses an HTTP response from a DownloadDatabaseV2WithResponse call

func (DownloadDatabaseV2Response) ContentType

func (r DownloadDatabaseV2Response) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (DownloadDatabaseV2Response) GetBody

func (r DownloadDatabaseV2Response) GetBody() []byte

GetBody returns the raw response body bytes

func (DownloadDatabaseV2Response) GetJSON400

func (r DownloadDatabaseV2Response) GetJSON400() *Error

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (DownloadDatabaseV2Response) GetJSON401

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (DownloadDatabaseV2Response) GetJSON403

func (r DownloadDatabaseV2Response) GetJSON403() *V2Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (DownloadDatabaseV2Response) GetJSON404

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (DownloadDatabaseV2Response) GetJSON410

func (r DownloadDatabaseV2Response) GetJSON410() *Error

GetJSON410 returns the response for an HTTP 410 `application/json` response

func (DownloadDatabaseV2Response) GetJSON503

GetJSON503 returns the response for an HTTP 503 `application/json` response

func (DownloadDatabaseV2Response) Status

Status returns HTTPResponse.Status

func (DownloadDatabaseV2Response) StatusCode

func (r DownloadDatabaseV2Response) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DownloadDatabaseV2Response302Headers

type DownloadDatabaseV2Response302Headers struct {
	Location *string
}

DownloadDatabaseV2Response302Headers the declared response headers of an HTTP 302 response for DownloadDatabaseV2

type DownloadOutcome

type DownloadOutcome string

DownloadOutcome defines model for Download.Outcome.

const (
	DownloadOutcomeDenied       DownloadOutcome = "denied"
	DownloadOutcomeExpired      DownloadOutcome = "expired"
	DownloadOutcomeOk           DownloadOutcome = "ok"
	DownloadOutcomeUnauthorized DownloadOutcome = "unauthorized"
	DownloadOutcomeUnavailable  DownloadOutcome = "unavailable"
	DownloadOutcomeUnknown      DownloadOutcome = "unknown"
)

Defines values for DownloadOutcome.

func (DownloadOutcome) Valid

func (e DownloadOutcome) Valid() bool

Valid indicates whether the value is a known member of the DownloadOutcome enum.

type Entitlement

type Entitlement struct {
	// Apikey The credential itself. The key is never echoed - only its ID, which is
	// what the console shows and what you can act on.
	Apikey EntitlementApikey `json:"apikey"`

	// OrgID The organization the key belongs to.
	OrgID openapi_types.UUID `json:"org_id"`
	Plan  EntitlementPlan    `json:"plan"`
	Usage EntitlementUsage   `json:"usage"`
}

Entitlement defines model for Entitlement.

type EntitlementApikey

type EntitlementApikey struct {
	// AllowedCidrs The source addresses this key may be used from. Empty means
	// unrestricted, never "deny all".
	AllowedCidrs []string `json:"allowed_cidrs"`

	// Expires Null for a key with no end date, which is the normal case.
	Expires *time.Time         `json:"expires"`
	ID      openapi_types.UUID `json:"id"`
}

EntitlementApikey The credential itself. The key is never echoed - only its ID, which is what the console shows and what you can act on.

type EntitlementError

type EntitlementError struct {
	Error string `json:"error"`
}

EntitlementError defines model for EntitlementError.

type EntitlementPlan

type EntitlementPlan struct {
	// Key The plan the organization is on, as an identifier that is never
	// renamed or reused: `free` for the free plan, or a paid plan's key.
	// Compare against it and show `name`. On `free`, usage counts the UTC
	// day's lookups answered with every field. The Data plan is a key
	// per quota (`data_1`, `data_2` and on), each named Data.
	//
	//
	// Example: data_4
	Key string `json:"key"`

	// Name The plan's name, as the site and console show it: `Free` for
	// the free plan. Show this rather than a name built from `key`: a
	// plan's name can change, and its key never does.
	//
	//
	// Example: Data
	Name string `json:"name"`

	// Tier The field tier, which decides how much of a lookup answer comes
	// back; `free` is the free plan's. This list never gains a value: a
	// new plan reports one of these. What each tier includes is documented
	// on the lookup endpoint rather than repeated here, so there is one
	// place it can be wrong.
	Tier EntitlementPlanTier `json:"tier"`
}

EntitlementPlan defines model for EntitlementPlan.

type EntitlementPlanTier

type EntitlementPlanTier string

EntitlementPlanTier The field tier, which decides how much of a lookup answer comes back; `free` is the free plan's. This list never gains a value: a new plan reports one of these. What each tier includes is documented on the lookup endpoint rather than repeated here, so there is one place it can be wrong.

const (
	Free    EntitlementPlanTier = "free"
	Max     EntitlementPlanTier = "max"
	Scale   EntitlementPlanTier = "scale"
	Starter EntitlementPlanTier = "starter"
)

Defines values for EntitlementPlanTier.

func (EntitlementPlanTier) Valid

func (e EntitlementPlanTier) Valid() bool

Valid indicates whether the value is a known member of the EntitlementPlanTier enum.

type EntitlementUsage

type EntitlementUsage struct {
	// HardLimit Where full answers stop: past it, a paid key is answered with
	// the basics and `cap_reached: true`, uncharged, until the
	// window ends or the cap is raised. `null` means never, which is the
	// normal state of an uncapped paid plan and is not the same as zero.
	// Above the quota and below this, requests are served and billed as
	// overage.
	HardLimit *int64 `json:"hard_limit"`

	// Quota What the plan includes. Zero on a plan that includes none.
	Quota int64 `json:"quota"`

	// Requests Requests counted in the current window. The same number the lookup
	// API gates on, and it can lag by a few seconds.
	Requests int64 `json:"requests"`

	// WindowEnd When the allowance next resets. On the free plan, the start of the
	// next UTC day.
	WindowEnd time.Time `json:"window_end"`

	// WindowStart When the current allowance period began. On the free plan, the
	// start of the UTC day.
	WindowStart time.Time `json:"window_start"`
}

EntitlementUsage defines model for EntitlementUsage.

type Error

type Error struct {
	// Rc A machine-readable result code. Deliberately not an enum: a code
	// added later must stay parseable by a client generated today.
	Rc string `json:"rc"`
}

Error defines model for Error.

type HostedDomains

type HostedDomains struct {
	// Domains Up to 10 of them, the most popular first; `[]` when none does.
	Domains *[]string `json:"domains,omitempty"`

	// Total How many registered domains resolve to the address.
	Total int `json:"total"`
}

HostedDomains From IP Hosted Domains: how many registered domains resolve to the address, and the 10 most popular. Its database lists up to 1,000 an address. On a paid plan or a free key's full answers.

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type Identity

type Identity struct {
	Org AccountOrgRef `json:"org"`
	Rc  string        `json:"rc"`

	// Scopes What this credential may do right now.
	Scopes []string    `json:"scopes"`
	User   AccountUser `json:"user"`
}

Identity defines model for Identity.

type ListDatabasesResponse

type ListDatabasesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *struct {
		Databases []Database `json:"databases"`
	}
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *V2Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *V2IpNotAllowed
}

func ParseListDatabasesResponse

func ParseListDatabasesResponse(rsp *http.Response) (*ListDatabasesResponse, error)

ParseListDatabasesResponse parses an HTTP response from a ListDatabasesWithResponse call

func (ListDatabasesResponse) ContentType

func (r ListDatabasesResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ListDatabasesResponse) GetBody

func (r ListDatabasesResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ListDatabasesResponse) GetJSON200

func (r ListDatabasesResponse) GetJSON200() *struct {
	Databases []Database `json:"databases"`
}

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ListDatabasesResponse) GetJSON401

func (r ListDatabasesResponse) GetJSON401() *V2Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (ListDatabasesResponse) GetJSON403

func (r ListDatabasesResponse) GetJSON403() *V2IpNotAllowed

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (ListDatabasesResponse) Status

func (r ListDatabasesResponse) Status() string

Status returns HTTPResponse.Status

func (ListDatabasesResponse) StatusCode

func (r ListDatabasesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListDownloadsParams

type ListDownloadsParams struct {
	// Limit How many attempts to return. Clamped to 200.
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
}

ListDownloadsParams defines parameters for ListDownloads.

type ListDownloadsResponse

type ListDownloadsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *struct {
		Downloads []Download `json:"downloads"`
	}
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *V2Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *V2IpNotAllowed
}

func ParseListDownloadsResponse

func ParseListDownloadsResponse(rsp *http.Response) (*ListDownloadsResponse, error)

ParseListDownloadsResponse parses an HTTP response from a ListDownloadsWithResponse call

func (ListDownloadsResponse) ContentType

func (r ListDownloadsResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ListDownloadsResponse) GetBody

func (r ListDownloadsResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ListDownloadsResponse) GetJSON200

func (r ListDownloadsResponse) GetJSON200() *struct {
	Downloads []Download `json:"downloads"`
}

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ListDownloadsResponse) GetJSON401

func (r ListDownloadsResponse) GetJSON401() *V2Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (ListDownloadsResponse) GetJSON403

func (r ListDownloadsResponse) GetJSON403() *V2IpNotAllowed

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (ListDownloadsResponse) Status

func (r ListDownloadsResponse) Status() string

Status returns HTTPResponse.Status

func (ListDownloadsResponse) StatusCode

func (r ListDownloadsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Location

type Location struct {
	// AccuracyRadius Radius in km holding the true location with 67% confidence. On a paid plan or a free key's full answers.
	AccuracyRadius *int `json:"accuracy_radius,omitempty"`

	// City City. On a paid plan or a free key's full answers.
	City *string `json:"city,omitempty"`

	// Continent Continent code.
	Continent string `json:"continent"`

	// ContinentName Continent name.
	ContinentName string `json:"continent_name"`

	// Country ISO 3166-1 alpha-2 country code.
	Country string `json:"country"`

	// CountryName Country name.
	CountryName string `json:"country_name"`

	// CurrencyCode ISO 4217 code.
	CurrencyCode string `json:"currency_code"`

	// CurrencyName Currency name.
	CurrencyName string `json:"currency_name"`

	// CurrencySymbol Currency symbol.
	CurrencySymbol string `json:"currency_symbol"`

	// DmaCode US TV market (DMA) code. On a paid plan or a free key's full answers.
	DmaCode *string `json:"dma_code,omitempty"`

	// FlagEmoji The country's flag.
	FlagEmoji string `json:"flag_emoji"`

	// FlagUnicode Its code points, `U+1F1E6 U+1F1F9`.
	FlagUnicode string `json:"flag_unicode"`

	// GeonameID GeoNames ID of the city. On a paid plan or a free key's full answers.
	GeonameID *string `json:"geoname_id,omitempty"`

	// LastChanged The day the range's location last changed. On a paid plan or a free key's full answers.
	LastChanged *string `json:"last_changed,omitempty"`

	// Latitude Latitude of the city. On a paid plan or a free key's full answers.
	Latitude *float32 `json:"latitude,omitempty"`

	// Longitude Longitude of the city. On a paid plan or a free key's full answers.
	Longitude *float32 `json:"longitude,omitempty"`

	// PostalCode Postal code. On a paid plan or a free key's full answers.
	PostalCode *string `json:"postal_code,omitempty"`

	// Region Region (state or province). On a paid plan or a free key's full answers.
	Region *string `json:"region,omitempty"`

	// RegionCode ISO 3166-2 region code. On a paid plan or a free key's full answers.
	RegionCode *string `json:"region_code,omitempty"`

	// Timezone IANA timezone.
	Timezone string `json:"timezone"`
}

Location Where the address is.

type LookupAsnResponse

type LookupAsnResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *AsnLookupResponse
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *LookupError
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *LookupError
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *LookupError
	// JSON429 the response for an HTTP 429 `application/json` response
	JSON429 *LookupError
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *LookupError
	// Headers429 the parsed response headers for an HTTP 429 response
	Headers429 *LookupAsnResponse429Headers
}

func ParseLookupAsnResponse

func ParseLookupAsnResponse(rsp *http.Response) (*LookupAsnResponse, error)

ParseLookupAsnResponse parses an HTTP response from a LookupAsnWithResponse call

func (LookupAsnResponse) ContentType

func (r LookupAsnResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (LookupAsnResponse) GetBody

func (r LookupAsnResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (LookupAsnResponse) GetJSON200

func (r LookupAsnResponse) GetJSON200() *AsnLookupResponse

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (LookupAsnResponse) GetJSON400

func (r LookupAsnResponse) GetJSON400() *LookupError

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (LookupAsnResponse) GetJSON401

func (r LookupAsnResponse) GetJSON401() *LookupError

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (LookupAsnResponse) GetJSON403

func (r LookupAsnResponse) GetJSON403() *LookupError

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (LookupAsnResponse) GetJSON429

func (r LookupAsnResponse) GetJSON429() *LookupError

GetJSON429 returns the response for an HTTP 429 `application/json` response

func (LookupAsnResponse) GetJSON500

func (r LookupAsnResponse) GetJSON500() *LookupError

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (LookupAsnResponse) Status

func (r LookupAsnResponse) Status() string

Status returns HTTPResponse.Status

func (LookupAsnResponse) StatusCode

func (r LookupAsnResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type LookupAsnResponse429Headers

type LookupAsnResponse429Headers struct {
	RetryAfter *int
}

LookupAsnResponse429Headers the declared response headers of an HTTP 429 response for LookupAsn

type LookupBatchJSONRequestBody

type LookupBatchJSONRequestBody = BatchLookupRequest

LookupBatchJSONRequestBody defines body for LookupBatch for application/json ContentType.

type LookupBatchResponse

type LookupBatchResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *BatchLookupResponse
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *LookupError
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *LookupError
	// JSON402 the response for an HTTP 402 `application/json` response
	JSON402 *LookupError
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *LookupError
	// JSON413 the response for an HTTP 413 `application/json` response
	JSON413 *LookupError
	// JSON429 the response for an HTTP 429 `application/json` response
	JSON429 *LookupError
	// Headers429 the parsed response headers for an HTTP 429 response
	Headers429 *LookupBatchResponse429Headers
}

func ParseLookupBatchResponse

func ParseLookupBatchResponse(rsp *http.Response) (*LookupBatchResponse, error)

ParseLookupBatchResponse parses an HTTP response from a LookupBatchWithResponse call

func (LookupBatchResponse) ContentType

func (r LookupBatchResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (LookupBatchResponse) GetBody

func (r LookupBatchResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (LookupBatchResponse) GetJSON200

func (r LookupBatchResponse) GetJSON200() *BatchLookupResponse

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (LookupBatchResponse) GetJSON400

func (r LookupBatchResponse) GetJSON400() *LookupError

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (LookupBatchResponse) GetJSON401

func (r LookupBatchResponse) GetJSON401() *LookupError

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (LookupBatchResponse) GetJSON402

func (r LookupBatchResponse) GetJSON402() *LookupError

GetJSON402 returns the response for an HTTP 402 `application/json` response

func (LookupBatchResponse) GetJSON403

func (r LookupBatchResponse) GetJSON403() *LookupError

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (LookupBatchResponse) GetJSON413

func (r LookupBatchResponse) GetJSON413() *LookupError

GetJSON413 returns the response for an HTTP 413 `application/json` response

func (LookupBatchResponse) GetJSON429

func (r LookupBatchResponse) GetJSON429() *LookupError

GetJSON429 returns the response for an HTTP 429 `application/json` response

func (LookupBatchResponse) Status

func (r LookupBatchResponse) Status() string

Status returns HTTPResponse.Status

func (LookupBatchResponse) StatusCode

func (r LookupBatchResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type LookupBatchResponse429Headers

type LookupBatchResponse429Headers struct {
	RetryAfter *int
}

LookupBatchResponse429Headers the declared response headers of an HTTP 429 response for LookupBatch

type LookupDomainResponse

type LookupDomainResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *DomainLookupResponse
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *LookupError
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *LookupError
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *LookupError
	// JSON429 the response for an HTTP 429 `application/json` response
	JSON429 *LookupError
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *LookupError
	// Headers429 the parsed response headers for an HTTP 429 response
	Headers429 *LookupDomainResponse429Headers
}

func ParseLookupDomainResponse

func ParseLookupDomainResponse(rsp *http.Response) (*LookupDomainResponse, error)

ParseLookupDomainResponse parses an HTTP response from a LookupDomainWithResponse call

func (LookupDomainResponse) ContentType

func (r LookupDomainResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (LookupDomainResponse) GetBody

func (r LookupDomainResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (LookupDomainResponse) GetJSON200

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (LookupDomainResponse) GetJSON400

func (r LookupDomainResponse) GetJSON400() *LookupError

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (LookupDomainResponse) GetJSON401

func (r LookupDomainResponse) GetJSON401() *LookupError

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (LookupDomainResponse) GetJSON403

func (r LookupDomainResponse) GetJSON403() *LookupError

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (LookupDomainResponse) GetJSON429

func (r LookupDomainResponse) GetJSON429() *LookupError

GetJSON429 returns the response for an HTTP 429 `application/json` response

func (LookupDomainResponse) GetJSON500

func (r LookupDomainResponse) GetJSON500() *LookupError

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (LookupDomainResponse) Status

func (r LookupDomainResponse) Status() string

Status returns HTTPResponse.Status

func (LookupDomainResponse) StatusCode

func (r LookupDomainResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type LookupDomainResponse429Headers

type LookupDomainResponse429Headers struct {
	RetryAfter *int
}

LookupDomainResponse429Headers the declared response headers of an HTTP 429 response for LookupDomain

type LookupError

type LookupError struct {
	// Error What went wrong.
	Error string `json:"error"`
}

LookupError defines model for LookupError.

type LookupIPParams

type LookupIPParams struct {
	// UserAgent The `User-Agent` header of the request you are deciding on. With every field, on a paid plan or a free key's full answers, the answer then carries `user_agent`, the agent it names and whether this address bears that out. Never kept, and nothing sent with a lookup feeds our data.
	UserAgent *string `form:"user_agent,omitempty" json:"user_agent,omitempty"`
}

LookupIPParams defines parameters for LookupIP.

type LookupIPResponse

type LookupIPResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *LookupResponse
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *LookupError
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *LookupError
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *LookupError
	// JSON429 the response for an HTTP 429 `application/json` response
	JSON429 *LookupError
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *LookupError
	// Headers429 the parsed response headers for an HTTP 429 response
	Headers429 *LookupIPResponse429Headers
}

func ParseLookupIPResponse

func ParseLookupIPResponse(rsp *http.Response) (*LookupIPResponse, error)

ParseLookupIPResponse parses an HTTP response from a LookupIPWithResponse call

func (LookupIPResponse) ContentType

func (r LookupIPResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (LookupIPResponse) GetBody

func (r LookupIPResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (LookupIPResponse) GetJSON200

func (r LookupIPResponse) GetJSON200() *LookupResponse

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (LookupIPResponse) GetJSON400

func (r LookupIPResponse) GetJSON400() *LookupError

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (LookupIPResponse) GetJSON401

func (r LookupIPResponse) GetJSON401() *LookupError

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (LookupIPResponse) GetJSON403

func (r LookupIPResponse) GetJSON403() *LookupError

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (LookupIPResponse) GetJSON429

func (r LookupIPResponse) GetJSON429() *LookupError

GetJSON429 returns the response for an HTTP 429 `application/json` response

func (LookupIPResponse) GetJSON500

func (r LookupIPResponse) GetJSON500() *LookupError

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (LookupIPResponse) Status

func (r LookupIPResponse) Status() string

Status returns HTTPResponse.Status

func (LookupIPResponse) StatusCode

func (r LookupIPResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type LookupIPResponse429Headers

type LookupIPResponse429Headers struct {
	RetryAfter *int
}

LookupIPResponse429Headers the declared response headers of an HTTP 429 response for LookupIP

type LookupMyIPParams

type LookupMyIPParams struct {
	// UserAgent The `User-Agent` header of the request you are deciding on. With every field, on a paid plan or a free key's full answers, the answer then carries `user_agent`, the agent it names and whether this address bears that out. Never kept, and nothing sent with a lookup feeds our data.
	UserAgent *string `form:"user_agent,omitempty" json:"user_agent,omitempty"`
}

LookupMyIPParams defines parameters for LookupMyIP.

type LookupMyIPResponse

type LookupMyIPResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *LookupResponse
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *LookupError
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *LookupError
	// JSON429 the response for an HTTP 429 `application/json` response
	JSON429 *LookupError
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *LookupError
	// Headers429 the parsed response headers for an HTTP 429 response
	Headers429 *LookupMyIPResponse429Headers
}

func ParseLookupMyIPResponse

func ParseLookupMyIPResponse(rsp *http.Response) (*LookupMyIPResponse, error)

ParseLookupMyIPResponse parses an HTTP response from a LookupMyIPWithResponse call

func (LookupMyIPResponse) ContentType

func (r LookupMyIPResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (LookupMyIPResponse) GetBody

func (r LookupMyIPResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (LookupMyIPResponse) GetJSON200

func (r LookupMyIPResponse) GetJSON200() *LookupResponse

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (LookupMyIPResponse) GetJSON401

func (r LookupMyIPResponse) GetJSON401() *LookupError

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (LookupMyIPResponse) GetJSON403

func (r LookupMyIPResponse) GetJSON403() *LookupError

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (LookupMyIPResponse) GetJSON429

func (r LookupMyIPResponse) GetJSON429() *LookupError

GetJSON429 returns the response for an HTTP 429 `application/json` response

func (LookupMyIPResponse) GetJSON500

func (r LookupMyIPResponse) GetJSON500() *LookupError

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (LookupMyIPResponse) Status

func (r LookupMyIPResponse) Status() string

Status returns HTTPResponse.Status

func (LookupMyIPResponse) StatusCode

func (r LookupMyIPResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type LookupMyIPResponse429Headers

type LookupMyIPResponse429Headers struct {
	RetryAfter *int
}

LookupMyIPResponse429Headers the declared response headers of an HTTP 429 response for LookupMyIP

type LookupResponse

type LookupResponse struct {
	// Abuse Where to report abuse, from IP Abuse Contact.
	Abuse *AbuseContact `json:"abuse,omitempty"`

	// Asn The network announcing the address, from IP ASN.
	Asn Asn `json:"asn"`

	// Bittorrent `{}` when `is_bittorrent` is false. On a paid plan or a free key's full answers.
	Bittorrent *BitTorrentDetail `json:"bittorrent,omitempty"`

	// Bot `{}` when `is_bot` is false. On a paid plan or a free key's full answers.
	Bot *BotDetail `json:"bot,omitempty"`

	// CapReached On every answer to a key, and on no other: `false` while the answer has every field, `true` once its organization's allowance is used and the answer has the basics: a free-plan key's full answers for the UTC day, or a paid key's quota or overage cap. A paid key's lookups answered past it are not billed, and raising or removing the cap in Billing turns it `false` again.
	CapReached *bool `json:"cap_reached,omitempty"`

	// Carrier `{}` when `is_carrier` is false. On a paid plan or a free key's full answers.
	Carrier *CarrierDetail `json:"carrier,omitempty"`

	// Cdn `{}` when `is_cdn` is false. On a paid plan or a free key's full answers.
	Cdn *ClassDetail `json:"cdn,omitempty"`

	// Company Who uses the address, from IP Company.
	Company *Company `json:"company,omitempty"`

	// Dcproxy `{}` when `is_dcproxy` is false. On a paid plan or a free key's full answers.
	Dcproxy *ProxyDetail `json:"dcproxy,omitempty"`

	// DNSResolver `{}` when `is_dns_resolver` is false. On a paid plan or a free key's full answers.
	DNSResolver *DNSResolverDetail `json:"dns_resolver,omitempty"`

	// HostedDomains From IP Hosted Domains: how many registered domains resolve to the address, and the 10 most popular. Its database lists up to 1,000 an address. On a paid plan or a free key's full answers.
	HostedDomains *HostedDomains `json:"hosted_domains,omitempty"`

	// Hosting `{}` when `is_hosting` is false. On a paid plan or a free key's full answers.
	Hosting *ClassDetail `json:"hosting,omitempty"`

	// Hostname The name the address's reverse DNS (PTR) record points to in IP RDNS, empty when it has none.
	Hostname string `json:"hostname"`

	// IP The address looked up, as parsed: `::ffff:a.b.c.d` answers as `a.b.c.d`.
	IP string `json:"ip"`

	// IsAnycast In Anycast IP: announced from many places at once.
	IsAnycast bool `json:"is_anycast"`

	// IsBittorrent In BitTorrent IP: a BitTorrent client was seen here in the last 90 days. On a paid plan or a free key's full answers.
	IsBittorrent *bool `json:"is_bittorrent,omitempty"`

	// IsBogon Reserved space, answered from the address alone.
	IsBogon bool `json:"is_bogon"`

	// IsBot In Bot IP: an automated client's address, such as a search engine's or an AI company's crawler, an uptime monitor, an internet scanner or a webhook sender. `bot` says whose, what it does and whether its operator vouches for the address. On a paid plan or a free key's full answers.
	IsBot *bool `json:"is_bot,omitempty"`

	// IsCarrier In Carrier IP: a mobile carrier's address space. On a paid plan or a free key's full answers.
	IsCarrier *bool `json:"is_carrier,omitempty"`

	// IsCdn In CDN IP: a content delivery network. On a paid plan or a free key's full answers.
	IsCdn *bool `json:"is_cdn,omitempty"`

	// IsDcproxy In Datacenter Proxy IP's 90-day window. On a paid plan or a free key's full answers.
	IsDcproxy *bool `json:"is_dcproxy,omitempty"`

	// IsDNSResolver In DNS Resolver IP: an open DNS resolver answered here. On a paid plan or a free key's full answers.
	IsDNSResolver *bool `json:"is_dns_resolver,omitempty"`

	// IsHosting In Hosting IP: a hosting or cloud network. On a paid plan or a free key's full answers.
	IsHosting *bool `json:"is_hosting,omitempty"`

	// IsMobproxy In Mobile Proxy IP's 90-day window. On a paid plan or a free key's full answers.
	IsMobproxy *bool `json:"is_mobproxy,omitempty"`

	// IsPubproxy In Public Proxy IP: a public proxy listens here, or its traffic left from here. On a paid plan or a free key's full answers.
	IsPubproxy *bool `json:"is_pubproxy,omitempty"`

	// IsRelay In Relay IP: an anonymizing relay such as iCloud Private Relay.
	IsRelay bool `json:"is_relay"`

	// IsResproxy In Residential Proxy IP's 90-day window: a residential proxy exit. On a paid plan or a free key's full answers.
	IsResproxy *bool `json:"is_resproxy,omitempty"`

	// IsSatellite In Satellite IP: a satellite operator's address space. On a paid plan or a free key's full answers.
	IsSatellite *bool `json:"is_satellite,omitempty"`

	// IsSMTP In SMTP IP: a mail server answered here. On a paid plan or a free key's full answers.
	IsSMTP *bool `json:"is_smtp,omitempty"`

	// IsSSH In SSH IP: an SSH server answered here. On a paid plan or a free key's full answers.
	IsSSH *bool `json:"is_ssh,omitempty"`

	// IsTor In Tor IP: a Tor exit.
	IsTor bool `json:"is_tor"`

	// IsVpn In VPN IP: a VPN service's server. On a paid plan or a free key's full answers.
	IsVpn *bool `json:"is_vpn,omitempty"`

	// IsWeb In Web IP: a web server answered here on port 80 or 443. On a paid plan or a free key's full answers.
	IsWeb *bool `json:"is_web,omitempty"`

	// Location Where the address is.
	Location Location `json:"location"`

	// Mobproxy `{}` when `is_mobproxy` is false. On a paid plan or a free key's full answers.
	Mobproxy *ProxyDetail `json:"mobproxy,omitempty"`

	// Pubproxy `{}` when `is_pubproxy` is false. On a paid plan or a free key's full answers.
	Pubproxy *PubproxyDetail `json:"pubproxy,omitempty"`

	// Relay Relay IP's row, `{}` when `is_relay` is false.
	Relay ClassDetail `json:"relay"`

	// Resproxy `{}` when `is_resproxy` is false. On a paid plan or a free key's full answers.
	Resproxy *ProxyDetail `json:"resproxy,omitempty"`

	// Rwhois IP RWHOIS's most specific network covering the address. On a paid plan or a free key's full answers.
	Rwhois *Rwhois `json:"rwhois,omitempty"`

	// Satellite `{}` when `is_satellite` is false. On a paid plan or a free key's full answers.
	Satellite *SatelliteDetail `json:"satellite,omitempty"`

	// SMTP `{}` when `is_smtp` is false. On a paid plan or a free key's full answers.
	SMTP *SMTPDetail `json:"smtp,omitempty"`

	// SSH `{}` when `is_ssh` is false. On a paid plan or a free key's full answers.
	SSH *SSHDetail `json:"ssh,omitempty"`

	// Tor Tor IP's row, `{}` when `is_tor` is false.
	Tor ClassDetail `json:"tor"`

	// UserAgent When the request sent `user_agent`, with every field, the agent it names and whether this address bears it out. Absent otherwise.
	UserAgent *UserAgentVerdict `json:"user_agent,omitempty"`

	// Vpn VPN IP's row, `{}` when `is_vpn` is false. On a paid plan or a free key's full answers.
	Vpn *ClassDetail `json:"vpn,omitempty"`

	// Web A row per port that answered, lowest first; `[]` when `is_web` is false. On a paid plan or a free key's full answers.
	Web *[]WebDetail `json:"web,omitempty"`

	// Whois IP Whois's most specific record covering the address. On a paid plan or a free key's full answers.
	Whois *Whois `json:"whois,omitempty"`
}

LookupResponse What every database says about one address.

type MyEntitlementResponse

type MyEntitlementResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *Entitlement
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *EntitlementError
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *EntitlementError
	// JSON503 the response for an HTTP 503 `application/json` response
	JSON503 *EntitlementError
}

func ParseMyEntitlementResponse

func ParseMyEntitlementResponse(rsp *http.Response) (*MyEntitlementResponse, error)

ParseMyEntitlementResponse parses an HTTP response from a MyEntitlementWithResponse call

func (MyEntitlementResponse) ContentType

func (r MyEntitlementResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (MyEntitlementResponse) GetBody

func (r MyEntitlementResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (MyEntitlementResponse) GetJSON200

func (r MyEntitlementResponse) GetJSON200() *Entitlement

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (MyEntitlementResponse) GetJSON401

func (r MyEntitlementResponse) GetJSON401() *EntitlementError

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (MyEntitlementResponse) GetJSON403

func (r MyEntitlementResponse) GetJSON403() *EntitlementError

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (MyEntitlementResponse) GetJSON503

func (r MyEntitlementResponse) GetJSON503() *EntitlementError

GetJSON503 returns the response for an HTTP 503 `application/json` response

func (MyEntitlementResponse) Status

func (r MyEntitlementResponse) Status() string

Status returns HTTPResponse.Status

func (MyEntitlementResponse) StatusCode

func (r MyEntitlementResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type OauthAuthorizeParams

type OauthAuthorizeParams struct {
	ClientID      string                           `form:"client_id" json:"client_id"`
	RedirectURI   string                           `form:"redirect_uri" json:"redirect_uri"`
	ResponseType  OauthAuthorizeParamsResponseType `form:"response_type" json:"response_type"`
	CodeChallenge string                           `form:"code_challenge" json:"code_challenge"`

	// CodeChallengeMethod S256, named explicitly. `plain`, or no method at all, is refused rather than downgraded.
	CodeChallengeMethod OauthAuthorizeParamsCodeChallengeMethod `form:"code_challenge_method" json:"code_challenge_method"`
	Scope               *string                                 `form:"scope,omitempty" json:"scope,omitempty"`

	// State Returned unchanged. Use it to bind the response to your request.
	State *string `form:"state,omitempty" json:"state,omitempty"`

	// Resource RFC 8707. What the token is FOR, so it cannot be replayed elsewhere:
	// this brand's MCP server, the only resource it issues tokens for.
	// Anything else answers `invalid_target`. A client that names none is
	// given that server.
	Resource *string `form:"resource,omitempty" json:"resource,omitempty"`
}

OauthAuthorizeParams defines parameters for OauthAuthorize.

type OauthAuthorizeParamsCodeChallengeMethod

type OauthAuthorizeParamsCodeChallengeMethod string

OauthAuthorizeParamsCodeChallengeMethod defines parameters for OauthAuthorize.

const (
	S256 OauthAuthorizeParamsCodeChallengeMethod = "S256"
)

Defines values for OauthAuthorizeParamsCodeChallengeMethod.

func (OauthAuthorizeParamsCodeChallengeMethod) Valid

Valid indicates whether the value is a known member of the OauthAuthorizeParamsCodeChallengeMethod enum.

type OauthAuthorizeParamsResponseType

type OauthAuthorizeParamsResponseType string

OauthAuthorizeParamsResponseType defines parameters for OauthAuthorize.

const (
	Code OauthAuthorizeParamsResponseType = "code"
)

Defines values for OauthAuthorizeParamsResponseType.

func (OauthAuthorizeParamsResponseType) Valid

Valid indicates whether the value is a known member of the OauthAuthorizeParamsResponseType enum.

type OauthAuthorizeResponse

type OauthAuthorizeResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseOauthAuthorizeResponse

func ParseOauthAuthorizeResponse(rsp *http.Response) (*OauthAuthorizeResponse, error)

ParseOauthAuthorizeResponse parses an HTTP response from a OauthAuthorizeWithResponse call

func (OauthAuthorizeResponse) ContentType

func (r OauthAuthorizeResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (OauthAuthorizeResponse) GetBody

func (r OauthAuthorizeResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (OauthAuthorizeResponse) Status

func (r OauthAuthorizeResponse) Status() string

Status returns HTTPResponse.Status

func (OauthAuthorizeResponse) StatusCode

func (r OauthAuthorizeResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type OauthDeviceAuthorizationFormdataRequestBody

type OauthDeviceAuthorizationFormdataRequestBody = DeviceAuthorizationRequest

OauthDeviceAuthorizationFormdataRequestBody defines body for OauthDeviceAuthorization for application/x-www-form-urlencoded ContentType.

type OauthDeviceAuthorizationResponse

type OauthDeviceAuthorizationResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *DeviceAuthorization
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *OauthError
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *OauthError
}

func ParseOauthDeviceAuthorizationResponse

func ParseOauthDeviceAuthorizationResponse(rsp *http.Response) (*OauthDeviceAuthorizationResponse, error)

ParseOauthDeviceAuthorizationResponse parses an HTTP response from a OauthDeviceAuthorizationWithResponse call

func (OauthDeviceAuthorizationResponse) ContentType

func (r OauthDeviceAuthorizationResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (OauthDeviceAuthorizationResponse) GetBody

func (r OauthDeviceAuthorizationResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (OauthDeviceAuthorizationResponse) GetJSON200

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (OauthDeviceAuthorizationResponse) GetJSON400

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (OauthDeviceAuthorizationResponse) GetJSON401

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (OauthDeviceAuthorizationResponse) Status

Status returns HTTPResponse.Status

func (OauthDeviceAuthorizationResponse) StatusCode

func (r OauthDeviceAuthorizationResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type OauthError

type OauthError struct {
	Error            string  `json:"error"`
	ErrorDescription *string `json:"error_description,omitempty"`
}

OauthError defines model for OauthError.

type OauthMetadata

type OauthMetadata struct {
	AuthorizationEndpoint string `json:"authorization_endpoint"`

	// AuthorizationResponseIssParameterSupported RFC 9207. A redirect back from the authorization endpoint carries `iss`.
	AuthorizationResponseIssParameterSupported *bool `json:"authorization_response_iss_parameter_supported,omitempty"`

	// ClientIDMetadataDocumentSupported Any client may sign in with an https `client_id` serving its own metadata.
	ClientIDMetadataDocumentSupported *bool     `json:"client_id_metadata_document_supported,omitempty"`
	CodeChallengeMethodsSupported     *[]string `json:"code_challenge_methods_supported,omitempty"`
	DeviceAuthorizationEndpoint       *string   `json:"device_authorization_endpoint,omitempty"`
	GrantTypesSupported               *[]string `json:"grant_types_supported,omitempty"`
	Issuer                            string    `json:"issuer"`

	// RegistrationEndpoint RFC 7591 dynamic client registration, for a client that cannot serve its own metadata.
	RegistrationEndpoint   *string   `json:"registration_endpoint,omitempty"`
	ResponseTypesSupported *[]string `json:"response_types_supported,omitempty"`
	RevocationEndpoint     *string   `json:"revocation_endpoint,omitempty"`
	ScopesSupported        *[]string `json:"scopes_supported,omitempty"`
	ServiceDocumentation   *string   `json:"service_documentation,omitempty"`
	TokenEndpoint          string    `json:"token_endpoint"`

	// TokenEndpointAuthMethodsSupported Always `none`. Every client is public and has no secret.
	TokenEndpointAuthMethodsSupported *[]string `json:"token_endpoint_auth_methods_supported,omitempty"`
}

OauthMetadata defines model for OauthMetadata.

type OauthMetadataResponse

type OauthMetadataResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *OauthMetadata
}

func ParseOauthMetadataResponse

func ParseOauthMetadataResponse(rsp *http.Response) (*OauthMetadataResponse, error)

ParseOauthMetadataResponse parses an HTTP response from a OauthMetadataWithResponse call

func (OauthMetadataResponse) ContentType

func (r OauthMetadataResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (OauthMetadataResponse) GetBody

func (r OauthMetadataResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (OauthMetadataResponse) GetJSON200

func (r OauthMetadataResponse) GetJSON200() *OauthMetadata

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (OauthMetadataResponse) Status

func (r OauthMetadataResponse) Status() string

Status returns HTTPResponse.Status

func (OauthMetadataResponse) StatusCode

func (r OauthMetadataResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type OauthRegisterJSONRequestBody

type OauthRegisterJSONRequestBody = ClientRegistrationRequest

OauthRegisterJSONRequestBody defines body for OauthRegister for application/json ContentType.

type OauthRegisterResponse

type OauthRegisterResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON201 the response for an HTTP 201 `application/json` response
	JSON201 *ClientRegistration
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *OauthError
}

func ParseOauthRegisterResponse

func ParseOauthRegisterResponse(rsp *http.Response) (*OauthRegisterResponse, error)

ParseOauthRegisterResponse parses an HTTP response from a OauthRegisterWithResponse call

func (OauthRegisterResponse) ContentType

func (r OauthRegisterResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (OauthRegisterResponse) GetBody

func (r OauthRegisterResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (OauthRegisterResponse) GetJSON201

func (r OauthRegisterResponse) GetJSON201() *ClientRegistration

GetJSON201 returns the response for an HTTP 201 `application/json` response

func (OauthRegisterResponse) GetJSON400

func (r OauthRegisterResponse) GetJSON400() *OauthError

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (OauthRegisterResponse) Status

func (r OauthRegisterResponse) Status() string

Status returns HTTPResponse.Status

func (OauthRegisterResponse) StatusCode

func (r OauthRegisterResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type OauthRevokeFormdataRequestBody

type OauthRevokeFormdataRequestBody = RevokeRequest

OauthRevokeFormdataRequestBody defines body for OauthRevoke for application/x-www-form-urlencoded ContentType.

type OauthRevokeResponse

type OauthRevokeResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *map[string]interface{}
}

func ParseOauthRevokeResponse

func ParseOauthRevokeResponse(rsp *http.Response) (*OauthRevokeResponse, error)

ParseOauthRevokeResponse parses an HTTP response from a OauthRevokeWithResponse call

func (OauthRevokeResponse) ContentType

func (r OauthRevokeResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (OauthRevokeResponse) GetBody

func (r OauthRevokeResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (OauthRevokeResponse) GetJSON200

func (r OauthRevokeResponse) GetJSON200() *map[string]interface{}

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (OauthRevokeResponse) Status

func (r OauthRevokeResponse) Status() string

Status returns HTTPResponse.Status

func (OauthRevokeResponse) StatusCode

func (r OauthRevokeResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type OauthTokenFormdataRequestBody

type OauthTokenFormdataRequestBody = TokenRequest

OauthTokenFormdataRequestBody defines body for OauthToken for application/x-www-form-urlencoded ContentType.

type OauthTokenResponse

type OauthTokenResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *TokenResponse
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *OauthError
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *OauthError
}

func ParseOauthTokenResponse

func ParseOauthTokenResponse(rsp *http.Response) (*OauthTokenResponse, error)

ParseOauthTokenResponse parses an HTTP response from a OauthTokenWithResponse call

func (OauthTokenResponse) ContentType

func (r OauthTokenResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (OauthTokenResponse) GetBody

func (r OauthTokenResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (OauthTokenResponse) GetJSON200

func (r OauthTokenResponse) GetJSON200() *TokenResponse

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (OauthTokenResponse) GetJSON400

func (r OauthTokenResponse) GetJSON400() *OauthError

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (OauthTokenResponse) GetJSON401

func (r OauthTokenResponse) GetJSON401() *OauthError

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (OauthTokenResponse) Status

func (r OauthTokenResponse) Status() string

Status returns HTTPResponse.Status

func (OauthTokenResponse) StatusCode

func (r OauthTokenResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ProxyDetail

type ProxyDetail struct {
	// FirstSeen The first day of the window the address was seen as an exit.
	FirstSeen *string `json:"first_seen,omitempty"`

	// Hits How many times it was seen in the window.
	Hits *int `json:"hits,omitempty"`

	// HitsDaysPct The highest share of the window's days, in percent, on which any one proxy pool saw
	// it: an address several pools share reads its busiest pool's share, not the days they
	// saw it on together.
	HitsDaysPct *int `json:"hits_days_pct,omitempty"`

	// LastSeen The last day it was.
	LastSeen *string `json:"last_seen,omitempty"`

	// Provider The proxy pool's ID in its catalog, empty where unattributed.
	Provider *string `json:"provider,omitempty"`

	// ProviderName The name the catalog gives it.
	ProviderName *string `json:"provider_name,omitempty"`

	// ProvidersNum How many pools it was seen in.
	ProvidersNum *int `json:"providers_num,omitempty"`
}

ProxyDetail defines model for ProxyDetail.

type PubproxyDetail

type PubproxyDetail struct {
	// Entry A public proxy listens here.
	Entry *bool `json:"entry,omitempty"`

	// Exit Public proxies' traffic leaves from here.
	Exit *bool `json:"exit,omitempty"`

	// LastSeen The last day one was seen.
	LastSeen *string `json:"last_seen,omitempty"`

	// LastUsable The last day one answered a request, empty when none did.
	LastUsable *string `json:"last_usable,omitempty"`

	// NumPorts How many ports a proxy listens on here.
	NumPorts *int `json:"num_ports,omitempty"`

	// NumProxies How many proxies' traffic left from here.
	NumProxies *int `json:"num_proxies,omitempty"`

	// Protocols The protocols at either end, `[]` when unknown.
	Protocols *[]string `json:"protocols,omitempty"`
}

PubproxyDetail defines model for PubproxyDetail.

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type RevokeRequest

type RevokeRequest struct {
	// ClientID Accepted and not checked.
	ClientID *string `json:"client_id,omitempty"`

	// Token An access token or a refresh token.
	Token string `json:"token"`
}

RevokeRequest defines model for RevokeRequest.

type Rwhois

type Rwhois struct {
	// AbuseEmail Its abuse contact.
	AbuseEmail string `json:"abuse_email"`

	// Country ISO 3166 country code.
	Country string `json:"country"`

	// Domain The contact emails' domain.
	Domain string `json:"domain"`

	// ID The network's identifier on the operator's RWHOIS server.
	ID string `json:"id"`

	// Name Its assignee.
	Name string `json:"name"`

	// Source The operator that published it.
	Source string `json:"source"`
}

Rwhois IP RWHOIS's most specific network covering the address. On a paid plan or a free key's full answers.

type SMTPDetail

type SMTPDetail struct {
	// Banner Its banner.
	Banner *string `json:"banner,omitempty"`

	// FirstSeen The first day it answered.
	FirstSeen *string `json:"first_seen,omitempty"`

	// LastSeen The last day it did.
	LastSeen *string `json:"last_seen,omitempty"`

	// Port The port the server answered on.
	Port *int `json:"port,omitempty"`

	// SessionOk A session was set up.
	SessionOk *bool `json:"session_ok,omitempty"`
}

SMTPDetail defines model for SmtpDetail.

type SSHDetail

type SSHDetail struct {
	// Banner Its banner.
	Banner *string `json:"banner,omitempty"`

	// FirstSeen The first day it answered.
	FirstSeen *string `json:"first_seen,omitempty"`

	// HostKeyFp Its host key's fingerprint.
	HostKeyFp *string `json:"host_key_fp,omitempty"`

	// LastSeen The last day it did.
	LastSeen *string `json:"last_seen,omitempty"`

	// Port The port the server answered on.
	Port *int `json:"port,omitempty"`

	// SessionOk A session was set up.
	SessionOk *bool `json:"session_ok,omitempty"`
}

SSHDetail defines model for SshDetail.

type SatelliteDetail

type SatelliteDetail struct {
	// Asn The AS the operator announces it from.
	Asn *int `json:"asn,omitempty"`

	// Confidence `high`, `medium` or `low`.
	Confidence *string `json:"confidence,omitempty"`

	// Country ISO 3166 country code.
	Country *string `json:"country,omitempty"`

	// Orbit The orbit: `leo`, `meo` or `geo`.
	Orbit *string `json:"orbit,omitempty"`

	// Provider The operator's ID in Satellite IP Provider.
	Provider *string `json:"provider,omitempty"`

	// ProviderName The operator's name.
	ProviderName *string `json:"provider_name,omitempty"`

	// Segment Who the space serves, such as consumer or maritime.
	Segment *string `json:"segment,omitempty"`
}

SatelliteDetail defines model for SatelliteDetail.

type Standing

type Standing string

Standing Where your license for a database family stands today. `licensed` is a live grant, `expired` one whose term has ended, and `unlicensed` a database published but never bought.

const (
	StandingExpired    Standing = "expired"
	StandingLicensed   Standing = "licensed"
	StandingUnlicensed Standing = "unlicensed"
)

Defines values for Standing.

func (Standing) Valid

func (e Standing) Valid() bool

Valid indicates whether the value is a known member of the Standing enum.

type TokenRequest

type TokenRequest struct {
	ClientID string `json:"client_id"`

	// Code Required by the authorization code grant.
	Code *string `json:"code,omitempty"`

	// CodeVerifier Required by the authorization code grant.
	CodeVerifier *string `json:"code_verifier,omitempty"`

	// DeviceCode Required by the device code grant.
	DeviceCode *string `json:"device_code,omitempty"`

	// GrantType `urn:ietf:params:oauth:grant-type:device_code`, `authorization_code` or `refresh_token`.
	GrantType string `json:"grant_type"`

	// RedirectURI Required by the authorization code grant: the `redirect_uri` the code was issued against, exactly.
	RedirectURI *string `json:"redirect_uri,omitempty"`

	// RefreshToken Required by the refresh token grant.
	RefreshToken *string `json:"refresh_token,omitempty"`

	// Resource Authorization code grant, optional: RFC 8707, and it must name what was authorized.
	Resource *string `json:"resource,omitempty"`
}

TokenRequest defines model for TokenRequest.

type TokenResponse

type TokenResponse struct {
	AccessToken string `json:"access_token"`

	// ExpiresIn Seconds until the access token expires.
	ExpiresIn int `json:"expires_in"`

	// MslmApikey Not part of OAuth, and only for our own clients: a client that signed
	// in with a Client ID Metadata Document or registered itself never
	// receives a key. The API
	// key itself, so a device ends up holding an ordinary key. Returned by
	// the device code and authorization code grants only, never by a
	// refresh, and only alongside
	// `mslm:apikey_id`. Absent when that key's secret cannot be read back,
	// which is the case for a key created before keys could be shown again
	// in the console; a rotated key can be.
	MslmApikey *string `json:"mslm:apikey,omitempty"`

	// MslmApikeyID Not part of OAuth, and only for our own clients. The ID of the API
	// key the person picked when they approved, returned by every grant
	// while this authorization may still read that key back. Absent when
	// no key was picked, or when the person's role no longer allows
	// reading keys back.
	MslmApikeyID *string `json:"mslm:apikey_id,omitempty"`

	// RefreshToken Always returned. A refresh consumes the token it presents, so keep this one.
	RefreshToken *string `json:"refresh_token,omitempty"`

	// Scope What was actually granted, which may be narrower than what was asked for.
	Scope *string `json:"scope,omitempty"`

	// TokenType Always `Bearer`.
	TokenType string `json:"token_type"`
}

TokenResponse defines model for TokenResponse.

type UserAgentVerdict

type UserAgentVerdict struct {
	// Agent The agent the user agent names, such as `Googlebot` or `Chrome`; `Unknown` where it names none.
	Agent string `json:"agent"`

	// Kind `browser`, `inapp`, `automation`, `bot`, `ai-bot`, `http-client` or `unknown`: what kind of client the user agent says it is.
	Kind string `json:"kind"`

	// Verdict `verified`: the agent's operator vouches for this address as it. `spoofed`: the operator of a bot that publishes its addresses, or whose registered space it uses, does not vouch for this one, or this address posed as the bot before. `unverifiable`: a bot no published list or registered space can confirm. `not_bot`: a browser, an app or a script.
	Verdict UserAgentVerdictVerdict `json:"verdict"`
}

UserAgentVerdict defines model for UserAgentVerdict.

type UserAgentVerdictVerdict

type UserAgentVerdictVerdict string

UserAgentVerdictVerdict `verified`: the agent's operator vouches for this address as it. `spoofed`: the operator of a bot that publishes its addresses, or whose registered space it uses, does not vouch for this one, or this address posed as the bot before. `unverifiable`: a bot no published list or registered space can confirm. `not_bot`: a browser, an app or a script.

const (
	NotBot       UserAgentVerdictVerdict = "not_bot"
	Spoofed      UserAgentVerdictVerdict = "spoofed"
	Unverifiable UserAgentVerdictVerdict = "unverifiable"
	Verified     UserAgentVerdictVerdict = "verified"
)

Defines values for UserAgentVerdictVerdict.

func (UserAgentVerdictVerdict) Valid

func (e UserAgentVerdictVerdict) Valid() bool

Valid indicates whether the value is a known member of the UserAgentVerdictVerdict enum.

type V2Forbidden

type V2Forbidden = Error

V2Forbidden defines model for V2Forbidden.

type V2IpNotAllowed

type V2IpNotAllowed = Error

V2IpNotAllowed defines model for V2IpNotAllowed.

type V2NotAvailable

type V2NotAvailable = Error

V2NotAvailable defines model for V2NotAvailable.

type V2Unauthorized

type V2Unauthorized = Error

V2Unauthorized defines model for V2Unauthorized.

type V2UnknownDatabase

type V2UnknownDatabase = Error

V2UnknownDatabase defines model for V2UnknownDatabase.

type WebDetail

type WebDetail struct {
	// CertBrowserTrusted Browsers trust it.
	CertBrowserTrusted bool `json:"cert_browser_trusted"`

	// CertIssuerDn Its issuer.
	CertIssuerDn string `json:"cert_issuer_dn"`

	// CertSubjectCn The certificate's subject common name.
	CertSubjectCn string `json:"cert_subject_cn"`

	// CertSubjectO Its subject organization.
	CertSubjectO string `json:"cert_subject_o"`

	// FirstSeen The first day the port was open.
	FirstSeen string `json:"first_seen"`

	// LastSeen The last day it was.
	LastSeen string `json:"last_seen"`

	// Location Where it redirected.
	Location string `json:"location"`

	// Port 80 or 443.
	Port int `json:"port"`

	// Server Its `Server` header.
	Server string `json:"server"`

	// SessionOk An HTTP response came back.
	SessionOk bool `json:"session_ok"`

	// StatusCode Its status, 0 where none came.
	StatusCode int `json:"status_code"`

	// Title The page's title.
	Title string `json:"title"`

	// TLSOk A TLS handshake completed.
	TLSOk bool `json:"tls_ok"`

	// TLSVersion The TLS version negotiated, empty without TLS.
	TLSVersion string `json:"tls_version"`
}

WebDetail defines model for WebDetail.

type Whois

type Whois struct {
	// AbuseEmail The record's abuse contact.
	AbuseEmail string `json:"abuse_email"`

	// Asn The AS announcing the record's start address.
	Asn int `json:"asn"`

	// Country ISO 3166 country code.
	Country string `json:"country"`

	// Domain The holder's domain.
	Domain string `json:"domain"`

	// ID Network name of the most specific record covering the address.
	ID string `json:"id"`

	// Name Its holder.
	Name string `json:"name"`

	// Org The registry's handle for the holder.
	Org string `json:"org"`

	// Source The registry, or rwhois.
	Source string `json:"source"`

	// Status The registry's assignment status.
	Status string `json:"status"`
}

Whois IP Whois's most specific record covering the address. On a paid plan or a free key's full answers.

Jump to

Keyboard shortcuts

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