api

package
v2.6.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: MIT Imports: 11 Imported by: 0

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 added in v2.3.0

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

NewAccountCreateApikeyRequest calls the generic AccountCreateApikey builder with application/json body

func NewAccountCreateApikeyRequestWithBody added in v2.3.0

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 added in v2.3.0

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

NewAccountIdentityRequest constructs an http.Request for the AccountIdentity method

func NewAccountListApikeysRequest added in v2.3.0

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

NewAccountListApikeysRequest constructs an http.Request for the AccountListApikeys method

func NewAccountOrgMembersRequest added in v2.3.0

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

NewAccountOrgMembersRequest constructs an http.Request for the AccountOrgMembers method

func NewAccountOrgRequest added in v2.3.0

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

NewAccountOrgRequest constructs an http.Request for the AccountOrg method

func NewAccountRevealApikeyRequest added in v2.3.0

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

NewAccountRevealApikeyRequest constructs an http.Request for the AccountRevealApikey method

func NewAccountRevokeApikeyRequest added in v2.3.0

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

NewAccountRevokeApikeyRequest constructs an http.Request for the AccountRevokeApikey method

func NewAccountRotateApikeyRequest added in v2.3.0

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 NewOauthAuthorizeRequest added in v2.3.0

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

NewOauthAuthorizeRequest constructs an http.Request for the OauthAuthorize method

func NewOauthDeviceAuthorizationRequestWithBody added in v2.3.0

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 added in v2.3.0

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

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

func NewOauthMetadataRequest added in v2.3.0

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

NewOauthMetadataRequest constructs an http.Request for the OauthMetadata method

func NewOauthRevokeRequestWithBody added in v2.3.0

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 added in v2.3.0

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

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

func NewOauthTokenRequestWithBody added in v2.3.0

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 added in v2.3.0

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

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

Types

type AccountCreateApikeyJSONRequestBody added in v2.3.0

type AccountCreateApikeyJSONRequestBody = AccountCreateApikeyRequest

AccountCreateApikeyJSONRequestBody defines body for AccountCreateApikey for application/json ContentType.

type AccountCreateApikeyRequest added in v2.3.0

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 recognise later. Shown wherever the key is listed.
	Name string `json:"name"`
}

AccountCreateApikeyRequest defines model for AccountCreateApikeyRequest.

type AccountCreateApikeyResponse added in v2.3.0

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 added in v2.3.0

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

ParseAccountCreateApikeyResponse parses an HTTP response from a AccountCreateApikeyWithResponse call

func (AccountCreateApikeyResponse) ContentType added in v2.3.0

func (r AccountCreateApikeyResponse) ContentType() string

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

func (AccountCreateApikeyResponse) GetBody added in v2.3.0

func (r AccountCreateApikeyResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (AccountCreateApikeyResponse) GetJSON200 added in v2.3.0

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

func (AccountCreateApikeyResponse) GetJSON400 added in v2.3.0

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

func (AccountCreateApikeyResponse) GetJSON401 added in v2.3.0

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

func (AccountCreateApikeyResponse) GetJSON403 added in v2.3.0

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

func (AccountCreateApikeyResponse) Status added in v2.3.0

Status returns HTTPResponse.Status

func (AccountCreateApikeyResponse) StatusCode added in v2.3.0

func (r AccountCreateApikeyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AccountCreatedApikey added in v2.3.0

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 added in v2.3.0

type AccountForbidden = AccountRc

AccountForbidden defines model for AccountForbidden.

type AccountIdentityResponse added in v2.3.0

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 added in v2.3.0

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

ParseAccountIdentityResponse parses an HTTP response from a AccountIdentityWithResponse call

func (AccountIdentityResponse) ContentType added in v2.3.0

func (r AccountIdentityResponse) ContentType() string

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

func (AccountIdentityResponse) GetBody added in v2.3.0

func (r AccountIdentityResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (AccountIdentityResponse) GetJSON200 added in v2.3.0

func (r AccountIdentityResponse) GetJSON200() *Identity

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

func (AccountIdentityResponse) GetJSON401 added in v2.3.0

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

func (AccountIdentityResponse) GetJSON403 added in v2.3.0

func (r AccountIdentityResponse) GetJSON403() *AccountForbidden

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

func (AccountIdentityResponse) Status added in v2.3.0

func (r AccountIdentityResponse) Status() string

Status returns HTTPResponse.Status

func (AccountIdentityResponse) StatusCode added in v2.3.0

func (r AccountIdentityResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AccountInvalid added in v2.3.0

type AccountInvalid = AccountRc

AccountInvalid defines model for AccountInvalid.

type AccountListApikeysResponse added in v2.3.0

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 added in v2.3.0

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

ParseAccountListApikeysResponse parses an HTTP response from a AccountListApikeysWithResponse call

func (AccountListApikeysResponse) ContentType added in v2.3.0

func (r AccountListApikeysResponse) ContentType() string

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

func (AccountListApikeysResponse) GetBody added in v2.3.0

func (r AccountListApikeysResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (AccountListApikeysResponse) GetJSON200 added in v2.3.0

func (r AccountListApikeysResponse) GetJSON200() *ApikeyList

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

func (AccountListApikeysResponse) GetJSON401 added in v2.3.0

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

func (AccountListApikeysResponse) GetJSON403 added in v2.3.0

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

func (AccountListApikeysResponse) Status added in v2.3.0

Status returns HTTPResponse.Status

func (AccountListApikeysResponse) StatusCode added in v2.3.0

func (r AccountListApikeysResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AccountNotFound added in v2.3.0

type AccountNotFound = AccountRc

AccountNotFound defines model for AccountNotFound.

type AccountOrg added in v2.3.0

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 added in v2.3.0

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 added in v2.3.0

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

ParseAccountOrgMembersResponse parses an HTTP response from a AccountOrgMembersWithResponse call

func (AccountOrgMembersResponse) ContentType added in v2.3.0

func (r AccountOrgMembersResponse) ContentType() string

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

func (AccountOrgMembersResponse) GetBody added in v2.3.0

func (r AccountOrgMembersResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (AccountOrgMembersResponse) GetJSON200 added in v2.3.0

func (r AccountOrgMembersResponse) GetJSON200() *AccountRc

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

func (AccountOrgMembersResponse) GetJSON401 added in v2.3.0

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

func (AccountOrgMembersResponse) GetJSON403 added in v2.3.0

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

func (AccountOrgMembersResponse) Status added in v2.3.0

func (r AccountOrgMembersResponse) Status() string

Status returns HTTPResponse.Status

func (AccountOrgMembersResponse) StatusCode added in v2.3.0

func (r AccountOrgMembersResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AccountOrgRef added in v2.3.0

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

AccountOrgRef defines model for AccountOrgRef.

type AccountOrgResponse added in v2.3.0

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 added in v2.3.0

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

ParseAccountOrgResponse parses an HTTP response from a AccountOrgWithResponse call

func (AccountOrgResponse) ContentType added in v2.3.0

func (r AccountOrgResponse) ContentType() string

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

func (AccountOrgResponse) GetBody added in v2.3.0

func (r AccountOrgResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (AccountOrgResponse) GetJSON200 added in v2.3.0

func (r AccountOrgResponse) GetJSON200() *AccountOrgWrap

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

func (AccountOrgResponse) GetJSON401 added in v2.3.0

func (r AccountOrgResponse) GetJSON401() *AccountUnauthorized

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

func (AccountOrgResponse) GetJSON403 added in v2.3.0

func (r AccountOrgResponse) GetJSON403() *AccountForbidden

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

func (AccountOrgResponse) Status added in v2.3.0

func (r AccountOrgResponse) Status() string

Status returns HTTPResponse.Status

func (AccountOrgResponse) StatusCode added in v2.3.0

func (r AccountOrgResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AccountOrgWrap added in v2.3.0

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

AccountOrgWrap defines model for AccountOrgWrap.

type AccountRc added in v2.3.0

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

AccountRc defines model for AccountRc.

type AccountRevealApikeyResponse added in v2.3.0

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 added in v2.3.0

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

ParseAccountRevealApikeyResponse parses an HTTP response from a AccountRevealApikeyWithResponse call

func (AccountRevealApikeyResponse) ContentType added in v2.3.0

func (r AccountRevealApikeyResponse) ContentType() string

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

func (AccountRevealApikeyResponse) GetBody added in v2.3.0

func (r AccountRevealApikeyResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (AccountRevealApikeyResponse) GetJSON200 added in v2.3.0

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

func (AccountRevealApikeyResponse) GetJSON401 added in v2.3.0

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

func (AccountRevealApikeyResponse) GetJSON403 added in v2.3.0

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

func (AccountRevealApikeyResponse) GetJSON404 added in v2.3.0

func (r AccountRevealApikeyResponse) GetJSON404() *AccountRc

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

func (AccountRevealApikeyResponse) Status added in v2.3.0

Status returns HTTPResponse.Status

func (AccountRevealApikeyResponse) StatusCode added in v2.3.0

func (r AccountRevealApikeyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AccountRevealedApikey added in v2.3.0

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

AccountRevealedApikey defines model for AccountRevealedApikey.

type AccountRevokeApikeyResponse added in v2.3.0

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 added in v2.3.0

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

ParseAccountRevokeApikeyResponse parses an HTTP response from a AccountRevokeApikeyWithResponse call

func (AccountRevokeApikeyResponse) ContentType added in v2.3.0

func (r AccountRevokeApikeyResponse) ContentType() string

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

func (AccountRevokeApikeyResponse) GetBody added in v2.3.0

func (r AccountRevokeApikeyResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (AccountRevokeApikeyResponse) GetJSON200 added in v2.3.0

func (r AccountRevokeApikeyResponse) GetJSON200() *AccountRc

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

func (AccountRevokeApikeyResponse) GetJSON401 added in v2.3.0

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

func (AccountRevokeApikeyResponse) GetJSON403 added in v2.3.0

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

func (AccountRevokeApikeyResponse) GetJSON404 added in v2.3.0

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

func (AccountRevokeApikeyResponse) Status added in v2.3.0

Status returns HTTPResponse.Status

func (AccountRevokeApikeyResponse) StatusCode added in v2.3.0

func (r AccountRevokeApikeyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AccountRotateApikeyResponse added in v2.3.0

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 added in v2.3.0

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

ParseAccountRotateApikeyResponse parses an HTTP response from a AccountRotateApikeyWithResponse call

func (AccountRotateApikeyResponse) ContentType added in v2.3.0

func (r AccountRotateApikeyResponse) ContentType() string

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

func (AccountRotateApikeyResponse) GetBody added in v2.3.0

func (r AccountRotateApikeyResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (AccountRotateApikeyResponse) GetJSON200 added in v2.3.0

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

func (AccountRotateApikeyResponse) GetJSON401 added in v2.3.0

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

func (AccountRotateApikeyResponse) GetJSON403 added in v2.3.0

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

func (AccountRotateApikeyResponse) GetJSON404 added in v2.3.0

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

func (AccountRotateApikeyResponse) Status added in v2.3.0

Status returns HTTPResponse.Status

func (AccountRotateApikeyResponse) StatusCode added in v2.3.0

func (r AccountRotateApikeyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AccountUnauthorized added in v2.3.0

type AccountUnauthorized = AccountRc

AccountUnauthorized defines model for AccountUnauthorized.

type AccountUser added in v2.3.0

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 added in v2.3.0

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 recognisable 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 added in v2.3.0

type ApikeyIDParam = openapi_types.UUID

ApikeyIDParam defines model for ApikeyIdParam.

type ApikeyList added in v2.3.0

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

ApikeyList defines model for ApikeyList.

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 added in v2.3.0

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

AccountCreateApikey Create

Creates a key and returns its secret.

This is the ONLY response that ever carries the secret, and only because this is the moment it comes into existence. Store it now.

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

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

func (*Client) AccountCreateApikeyWithBody added in v2.3.0

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

AccountCreateApikeyWithBody Create

Creates a key and returns its secret.

This is the ONLY response that ever carries the secret, and only because this is the moment it comes into existence. Store it now.

Takes any type of body and a specified content type.

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

func (*Client) AccountIdentity added in v2.3.0

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.

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

func (*Client) AccountListApikeys added in v2.3.0

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

AccountListApikeys List

Metadata only. A key's secret is never in a list - not here and not 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.

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

func (*Client) AccountOrg added in v2.3.0

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

AccountOrg Organization

The organization this credential is scoped to.

There is no way to name a different one. A credential describes exactly one organization, so an identifier in the path could only ever be your own or a refusal.

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

func (*Client) AccountOrgMembers added in v2.3.0

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

AccountOrgMembers Members

Read-only. Adding or removing a member is an invitation flow with email in the middle rather than a POST, and modelling it as one here would promise something this API does not do.

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

func (*Client) AccountRevealApikey added in v2.3.0

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.

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

func (*Client) AccountRevokeApikey added in v2.3.0

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.

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

func (*Client) AccountRotateApikey added in v2.3.0

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.

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

Answers `302`; the bytes come straight from object storage rather than through this API. Follow the redirect.

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`). An `open` database downloads whatever its `standing`.

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

Refusals are listed too: a denial is what answers "it stopped working", and its absence answers nothing.

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

func (*Client) OauthAuthorize added in v2.3.0

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.

An unknown `client_id` or an unregistered `redirect_uri` is shown to the USER and never redirected, because sending an error to an address we have not verified belongs to you is how an open redirector works. Everything else comes back to your `redirect_uri` with `error`, your `state`, and `iss`.

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

func (*Client) OauthDeviceAuthorizationWithBody added in v2.3.0

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 added in v2.3.0

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 added in v2.3.0

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) OauthRevokeWithBody added in v2.3.0

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

OauthRevokeWithBody Revoke

RFC 7009. Always answers 200, including for a token that was never valid - an endpoint that distinguished the two would be a way to test whether a stolen string is a live credential.

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 added in v2.3.0

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

OauthRevokeWithFormdataBody Revoke

RFC 7009. Always answers 200, including for a token that was never valid - an endpoint that distinguished the two would be a way to test whether a stolen string is a live credential.

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 added in v2.3.0

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

OauthTokenWithBody Token

Three grant types.

`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 added in v2.3.0

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

OauthTokenWithFormdataBody Token

Three grant types.

`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)

	// AccountListApikeys List
	//
	// Metadata only. A key's secret is never in a list - not here and not 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.
	//
	// Corresponds with GET /api/v1/iam/apikeys (the `AccountListApikeys` operationId).
	AccountListApikeys(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AccountCreateApikeyWithBody Create
	//
	// Creates a key and returns its secret.
	//
	// This is the ONLY response that ever carries the secret, and only
	// because this is the moment it comes into existence. Store it now.
	//
	// 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 a key and returns its secret.
	//
	// This is the ONLY response that ever carries the secret, and only
	// because this is the moment it comes into existence. Store it now.
	//
	// 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.
	//
	// 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.
	//
	// 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.
	//
	// 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.
	//
	// Corresponds with GET /api/v1/iam/identity (the `AccountIdentity` operationId).
	AccountIdentity(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AccountOrg Organization
	//
	// The organization this credential is scoped to.
	//
	// There is no way to name a different one. A credential describes exactly
	// one organization, so an identifier in the path could only ever be your
	// own or a refusal.
	//
	// Corresponds with GET /api/v1/iam/org (the `AccountOrg` operationId).
	AccountOrg(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AccountOrgMembers Members
	//
	// Read-only. Adding or removing a member is an invitation flow with email
	// in the middle rather than a POST, and modelling it as one here would
	// promise something this API does not do.
	//
	// 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
	//
	// Answers `302`; the bytes come straight from object storage rather than
	// through this API. Follow the redirect.
	//
	// Corresponds with GET /api/v2/database/download (the `DownloadDatabaseV2` operationId).
	DownloadDatabaseV2(ctx context.Context, params *DownloadDatabaseV2Params, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListDownloads History
	//
	// Refusals are listed too: a denial is what answers "it stopped working",
	// and its absence answers nothing.
	//
	// 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`).
	// An `open` database downloads whatever its `standing`.
	//
	// 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)

	// 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.
	//
	// An unknown `client_id` or an unregistered `redirect_uri` is shown to the
	// USER and never redirected, because sending an error to an address we
	// have not verified belongs to you is how an open redirector works.
	// Everything else comes back to your `redirect_uri` with `error`, 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)

	// OauthRevokeWithBody Revoke
	//
	// RFC 7009. Always answers 200, including for a token that was never
	// valid - an endpoint that distinguished the two would be a way to test
	// whether a stolen string is a live credential.
	//
	// 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, including for a token that was never
	// valid - an endpoint that distinguished the two would be a way to test
	// whether a stolen string is a live credential.
	//
	// 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
	//
	// Three grant types.
	//
	// `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
	//
	// Three grant types.
	//
	// `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)
}

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 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 added in v2.3.0

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

AccountCreateApikeyWithBodyWithResponse Create

Creates a key and returns its secret.

This is the ONLY response that ever carries the secret, and only because this is the moment it comes into existence. Store it now.

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 added in v2.3.0

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

AccountCreateApikeyWithResponse Create

Creates a key and returns its secret.

This is the ONLY response that ever carries the secret, and only because this is the moment it comes into existence. Store it now.

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 added in v2.3.0

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.

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

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

func (*ClientWithResponses) AccountListApikeysWithResponse added in v2.3.0

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

AccountListApikeysWithResponse List

Metadata only. A key's secret is never in a list - not here and not 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.

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

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

func (*ClientWithResponses) AccountOrgMembersWithResponse added in v2.3.0

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

AccountOrgMembersWithResponse Members

Read-only. Adding or removing a member is an invitation flow with email in the middle rather than a POST, and modelling it as one here would promise something this API does not do.

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 added in v2.3.0

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

AccountOrgWithResponse Organization

The organization this credential is scoped to.

There is no way to name a different one. A credential describes exactly one organization, so an identifier in the path could only ever be your own or a refusal.

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

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

func (*ClientWithResponses) AccountRevealApikeyWithResponse added in v2.3.0

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.

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 added in v2.3.0

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.

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 added in v2.3.0

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.

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

Answers `302`; the bytes come straight from object storage rather than through this API. Follow the redirect.

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`). An `open` database downloads whatever its `standing`.

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

Refusals are listed too: a denial is what answers "it stopped working", and its absence answers nothing.

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

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

func (*ClientWithResponses) OauthAuthorizeWithResponse added in v2.3.0

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.

An unknown `client_id` or an unregistered `redirect_uri` is shown to the USER and never redirected, because sending an error to an address we have not verified belongs to you is how an open redirector works. Everything else comes back to your `redirect_uri` with `error`, 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 added in v2.3.0

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 added in v2.3.0

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 added in v2.3.0

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) OauthRevokeWithBodyWithResponse added in v2.3.0

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

OauthRevokeWithBodyWithResponse Revoke

RFC 7009. Always answers 200, including for a token that was never valid - an endpoint that distinguished the two would be a way to test whether a stolen string is a live credential.

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 added in v2.3.0

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

OauthRevokeWithFormdataBodyWithResponse Revoke

RFC 7009. Always answers 200, including for a token that was never valid - an endpoint that distinguished the two would be a way to test whether a stolen string is a live credential.

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 added in v2.3.0

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

OauthTokenWithBodyWithResponse Token

Three grant types.

`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 added in v2.3.0

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

OauthTokenWithFormdataBodyWithResponse Token

Three grant types.

`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)

	// AccountListApikeysWithResponse List
	//
	// Metadata only. A key's secret is never in a list - not here and not 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.
	//
	// 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 a key and returns its secret.
	//
	// This is the ONLY response that ever carries the secret, and only
	// because this is the moment it comes into existence. Store it now.
	//
	// 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 a key and returns its secret.
	//
	// This is the ONLY response that ever carries the secret, and only
	// because this is the moment it comes into existence. Store it now.
	//
	// 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.
	//
	// 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.
	//
	// 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.
	//
	// 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.
	//
	// 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
	//
	// The organization this credential is scoped to.
	//
	// There is no way to name a different one. A credential describes exactly
	// one organization, so an identifier in the path could only ever be your
	// own or a refusal.
	//
	// 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
	//
	// Read-only. Adding or removing a member is an invitation flow with email
	// in the middle rather than a POST, and modelling it as one here would
	// promise something this API does not do.
	//
	// 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
	//
	// Answers `302`; the bytes come straight from object storage rather than
	// through this API. Follow the redirect.
	//
	// 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
	//
	// Refusals are listed too: a denial is what answers "it stopped working",
	// and its absence answers nothing.
	//
	// 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`).
	// An `open` database downloads whatever its `standing`.
	//
	// 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)

	// 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.
	//
	// An unknown `client_id` or an unregistered `redirect_uri` is shown to the
	// USER and never redirected, because sending an error to an address we
	// have not verified belongs to you is how an open redirector works.
	// Everything else comes back to your `redirect_uri` with `error`, 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)

	// OauthRevokeWithBodyWithResponse Revoke
	//
	// RFC 7009. Always answers 200, including for a token that was never
	// valid - an endpoint that distinguished the two would be a way to test
	// whether a stolen string is a live credential.
	//
	// 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, including for a token that was never
	// valid - an endpoint that distinguished the two would be a way to test
	// whether a stolen string is a live credential.
	//
	// 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
	//
	// Three grant types.
	//
	// `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
	//
	// Three grant types.
	//
	// `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)
}

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

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 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: any organization downloads it, and fetches its
	// checksums, with no license, under CC BY-SA 4.0 (credit
	// InternetData, https://internetdata.io, and share what you build
	// from it under the same license). `standing` still reports your
	// own license, which grants more where you hold one.
	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. An Open database (`open`)
	// downloads whatever this says.
	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 *V2NotLicensed
	// 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() *V2NotLicensed

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 added in v2.1.0

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 added in v2.1.0

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
	// 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) 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 added in v2.3.0

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 added in v2.3.0

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 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 Taken under the Open license rather than one of your licenses: an
	// Open database downloaded while your organization held no license
	// in term for it.
	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"`
}

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 *V2NotLicensed
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *V2UnknownDatabase
	// 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() *V2NotLicensed

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) 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 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 HttpRequestDoer

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

Doer performs HTTP requests.

The standard http.Client implements this interface.

type Identity added in v2.3.0

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
}

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) 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
}

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) Status

func (r ListDownloadsResponse) Status() string

Status returns HTTPResponse.Status

func (ListDownloadsResponse) StatusCode

func (r ListDownloadsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type OauthAuthorizeParams added in v2.3.0

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 added in v2.3.0

type OauthAuthorizeParamsCodeChallengeMethod string

OauthAuthorizeParamsCodeChallengeMethod defines parameters for OauthAuthorize.

const (
	S256 OauthAuthorizeParamsCodeChallengeMethod = "S256"
)

Defines values for OauthAuthorizeParamsCodeChallengeMethod.

func (OauthAuthorizeParamsCodeChallengeMethod) Valid added in v2.3.0

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

type OauthAuthorizeParamsResponseType added in v2.3.0

type OauthAuthorizeParamsResponseType string

OauthAuthorizeParamsResponseType defines parameters for OauthAuthorize.

const (
	Code OauthAuthorizeParamsResponseType = "code"
)

Defines values for OauthAuthorizeParamsResponseType.

func (OauthAuthorizeParamsResponseType) Valid added in v2.3.0

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

type OauthAuthorizeResponse added in v2.3.0

type OauthAuthorizeResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseOauthAuthorizeResponse added in v2.3.0

func ParseOauthAuthorizeResponse(rsp *http.Response) (*OauthAuthorizeResponse, error)

ParseOauthAuthorizeResponse parses an HTTP response from a OauthAuthorizeWithResponse call

func (OauthAuthorizeResponse) ContentType added in v2.3.0

func (r OauthAuthorizeResponse) ContentType() string

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

func (OauthAuthorizeResponse) GetBody added in v2.3.0

func (r OauthAuthorizeResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (OauthAuthorizeResponse) Status added in v2.3.0

func (r OauthAuthorizeResponse) Status() string

Status returns HTTPResponse.Status

func (OauthAuthorizeResponse) StatusCode added in v2.3.0

func (r OauthAuthorizeResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type OauthDeviceAuthorizationFormdataRequestBody added in v2.3.0

type OauthDeviceAuthorizationFormdataRequestBody = DeviceAuthorizationRequest

OauthDeviceAuthorizationFormdataRequestBody defines body for OauthDeviceAuthorization for application/x-www-form-urlencoded ContentType.

type OauthDeviceAuthorizationResponse added in v2.3.0

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 added in v2.3.0

func ParseOauthDeviceAuthorizationResponse(rsp *http.Response) (*OauthDeviceAuthorizationResponse, error)

ParseOauthDeviceAuthorizationResponse parses an HTTP response from a OauthDeviceAuthorizationWithResponse call

func (OauthDeviceAuthorizationResponse) ContentType added in v2.3.0

func (r OauthDeviceAuthorizationResponse) ContentType() string

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

func (OauthDeviceAuthorizationResponse) GetBody added in v2.3.0

func (r OauthDeviceAuthorizationResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (OauthDeviceAuthorizationResponse) GetJSON200 added in v2.3.0

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

func (OauthDeviceAuthorizationResponse) GetJSON400 added in v2.3.0

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

func (OauthDeviceAuthorizationResponse) GetJSON401 added in v2.3.0

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

func (OauthDeviceAuthorizationResponse) Status added in v2.3.0

Status returns HTTPResponse.Status

func (OauthDeviceAuthorizationResponse) StatusCode added in v2.3.0

func (r OauthDeviceAuthorizationResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type OauthError added in v2.3.0

type OauthError struct {
	Error            string  `json:"error"`
	ErrorDescription *string `json:"error_description,omitempty"`
}

OauthError defines model for OauthError.

type OauthMetadata added in v2.3.0

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"`
	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 added in v2.3.0

type OauthMetadataResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *OauthMetadata
}

func ParseOauthMetadataResponse added in v2.3.0

func ParseOauthMetadataResponse(rsp *http.Response) (*OauthMetadataResponse, error)

ParseOauthMetadataResponse parses an HTTP response from a OauthMetadataWithResponse call

func (OauthMetadataResponse) ContentType added in v2.3.0

func (r OauthMetadataResponse) ContentType() string

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

func (OauthMetadataResponse) GetBody added in v2.3.0

func (r OauthMetadataResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (OauthMetadataResponse) GetJSON200 added in v2.3.0

func (r OauthMetadataResponse) GetJSON200() *OauthMetadata

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

func (OauthMetadataResponse) Status added in v2.3.0

func (r OauthMetadataResponse) Status() string

Status returns HTTPResponse.Status

func (OauthMetadataResponse) StatusCode added in v2.3.0

func (r OauthMetadataResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type OauthRevokeFormdataRequestBody added in v2.3.0

type OauthRevokeFormdataRequestBody = RevokeRequest

OauthRevokeFormdataRequestBody defines body for OauthRevoke for application/x-www-form-urlencoded ContentType.

type OauthRevokeResponse added in v2.3.0

type OauthRevokeResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *map[string]interface{}
}

func ParseOauthRevokeResponse added in v2.3.0

func ParseOauthRevokeResponse(rsp *http.Response) (*OauthRevokeResponse, error)

ParseOauthRevokeResponse parses an HTTP response from a OauthRevokeWithResponse call

func (OauthRevokeResponse) ContentType added in v2.3.0

func (r OauthRevokeResponse) ContentType() string

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

func (OauthRevokeResponse) GetBody added in v2.3.0

func (r OauthRevokeResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (OauthRevokeResponse) GetJSON200 added in v2.3.0

func (r OauthRevokeResponse) GetJSON200() *map[string]interface{}

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

func (OauthRevokeResponse) Status added in v2.3.0

func (r OauthRevokeResponse) Status() string

Status returns HTTPResponse.Status

func (OauthRevokeResponse) StatusCode added in v2.3.0

func (r OauthRevokeResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type OauthTokenFormdataRequestBody added in v2.3.0

type OauthTokenFormdataRequestBody = TokenRequest

OauthTokenFormdataRequestBody defines body for OauthToken for application/x-www-form-urlencoded ContentType.

type OauthTokenResponse added in v2.3.0

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 added in v2.3.0

func ParseOauthTokenResponse(rsp *http.Response) (*OauthTokenResponse, error)

ParseOauthTokenResponse parses an HTTP response from a OauthTokenWithResponse call

func (OauthTokenResponse) ContentType added in v2.3.0

func (r OauthTokenResponse) ContentType() string

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

func (OauthTokenResponse) GetBody added in v2.3.0

func (r OauthTokenResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (OauthTokenResponse) GetJSON200 added in v2.3.0

func (r OauthTokenResponse) GetJSON200() *TokenResponse

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

func (OauthTokenResponse) GetJSON400 added in v2.3.0

func (r OauthTokenResponse) GetJSON400() *OauthError

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

func (OauthTokenResponse) GetJSON401 added in v2.3.0

func (r OauthTokenResponse) GetJSON401() *OauthError

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

func (OauthTokenResponse) Status added in v2.3.0

func (r OauthTokenResponse) Status() string

Status returns HTTPResponse.Status

func (OauthTokenResponse) StatusCode added in v2.3.0

func (r OauthTokenResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type RevokeRequest added in v2.3.0

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 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. An Open database (`open`) downloads whatever this says.

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 added in v2.3.0

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 added in v2.3.0

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 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 V2NotAvailable

type V2NotAvailable = Error

V2NotAvailable defines model for V2NotAvailable.

type V2NotLicensed

type V2NotLicensed = Error

V2NotLicensed defines model for V2NotLicensed.

type V2Unauthorized

type V2Unauthorized = Error

V2Unauthorized defines model for V2Unauthorized.

type V2UnknownDatabase

type V2UnknownDatabase = Error

V2UnknownDatabase defines model for V2UnknownDatabase.

Jump to

Keyboard shortcuts

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