apiclient

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 16 Imported by: 1 module, 0 packages

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

Documentation

Overview

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

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

Package apiclient is the CLI's client of the API: client.gen.go is generated from docs/swagger.yaml by make openapi, this file keeps the server and the session of callback login.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoSession = errors.New("not logged in: run " + config.Current.Name + " login <url>")
	ErrTimeout   = errors.New("the server did not answer in time")
)
View Source
var Timeout = 60 * time.Second

Timeout bounds a call to the API, so a server that goes silent does not freeze a command or the MCP.

Functions

func Decode

func Decode[T any](response *http.Response, err error) (T, error)

Decode reads a JSON answer into the generated type of the route; any status but 2xx is the API's error. A 204 leaves out zero.

func Fail

func Fail(response *http.Response, body []byte) error

Fail is the error of an answer the caller did not expect: the API's message, else the HTTP status.

func NewDeleteApiApplicationsDeletedRequest added in v0.4.0

func NewDeleteApiApplicationsDeletedRequest(server string, body DeleteApiApplicationsDeletedJSONRequestBody) (*http.Request, error)

NewDeleteApiApplicationsDeletedRequest calls the generic DeleteApiApplicationsDeleted builder with application/json body

func NewDeleteApiApplicationsDeletedRequestWithBody added in v0.4.0

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

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

func NewDeleteApiApplicationsRequest

func NewDeleteApiApplicationsRequest(server string, body DeleteApiApplicationsJSONRequestBody) (*http.Request, error)

NewDeleteApiApplicationsRequest calls the generic DeleteApiApplications builder with application/json body

func NewDeleteApiApplicationsRequestWithBody

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

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

func NewDeleteApiDataRequest added in v0.2.0

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

NewDeleteApiDataRequest constructs an http.Request for the DeleteApiData method

func NewDeleteApiTokensIdRequest

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

NewDeleteApiTokensIdRequest constructs an http.Request for the DeleteApiTokensId method

func NewGetApiApplicationsDeletedRequest added in v0.4.0

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

NewGetApiApplicationsDeletedRequest constructs an http.Request for the GetApiApplicationsDeleted method

func NewGetApiApplicationsRequest

func NewGetApiApplicationsRequest(server string, params *GetApiApplicationsParams) (*http.Request, error)

NewGetApiApplicationsRequest constructs an http.Request for the GetApiApplications method

func NewGetApiExportRequest added in v0.5.0

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

NewGetApiExportRequest constructs an http.Request for the GetApiExport method

func NewGetApiMeRequest

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

NewGetApiMeRequest constructs an http.Request for the GetApiMe method

func NewGetApiPreferencesRequest added in v0.2.0

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

NewGetApiPreferencesRequest constructs an http.Request for the GetApiPreferences method

func NewGetApiSourcesRequest added in v0.2.0

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

NewGetApiSourcesRequest constructs an http.Request for the GetApiSources method

func NewGetApiStatsRequest

func NewGetApiStatsRequest(server string, params *GetApiStatsParams) (*http.Request, error)

NewGetApiStatsRequest constructs an http.Request for the GetApiStats method

func NewGetApiStatusChangesRequest added in v0.2.0

func NewGetApiStatusChangesRequest(server string, params *GetApiStatusChangesParams) (*http.Request, error)

NewGetApiStatusChangesRequest constructs an http.Request for the GetApiStatusChanges method

func NewGetApiTokensRequest

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

NewGetApiTokensRequest constructs an http.Request for the GetApiTokens method

func NewPatchApiApplicationsRequest

func NewPatchApiApplicationsRequest(server string, body PatchApiApplicationsJSONRequestBody) (*http.Request, error)

NewPatchApiApplicationsRequest calls the generic PatchApiApplications builder with application/json body

func NewPatchApiApplicationsRequestWithBody

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

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

func NewPatchApiPreferencesRequest added in v0.2.0

func NewPatchApiPreferencesRequest(server string, body PatchApiPreferencesJSONRequestBody) (*http.Request, error)

NewPatchApiPreferencesRequest calls the generic PatchApiPreferences builder with application/json body

func NewPatchApiPreferencesRequestWithBody added in v0.2.0

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

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

func NewPostApiApplicationsRequest

func NewPostApiApplicationsRequest(server string, body PostApiApplicationsJSONRequestBody) (*http.Request, error)

NewPostApiApplicationsRequest calls the generic PostApiApplications builder with application/json body

func NewPostApiApplicationsRequestWithBody

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

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

func NewPostApiApplicationsRestoreRequest added in v0.4.0

func NewPostApiApplicationsRestoreRequest(server string, body PostApiApplicationsRestoreJSONRequestBody) (*http.Request, error)

NewPostApiApplicationsRestoreRequest calls the generic PostApiApplicationsRestore builder with application/json body

func NewPostApiApplicationsRestoreRequestWithBody added in v0.4.0

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

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

func NewPostApiImportRequest added in v0.5.0

func NewPostApiImportRequest(server string, body PostApiImportJSONRequestBody) (*http.Request, error)

NewPostApiImportRequest calls the generic PostApiImport builder with application/json body

func NewPostApiImportRequestWithBody added in v0.5.0

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

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

func NewPostApiLoginRequest

func NewPostApiLoginRequest(server string, body PostApiLoginJSONRequestBody) (*http.Request, error)

NewPostApiLoginRequest calls the generic PostApiLogin builder with application/json body

func NewPostApiLoginRequestWithBody

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

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

func NewPostApiLogoutRequest

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

NewPostApiLogoutRequest constructs an http.Request for the PostApiLogout method

func NewPostApiTokensRequest

func NewPostApiTokensRequest(server string, body PostApiTokensJSONRequestBody) (*http.Request, error)

NewPostApiTokensRequest calls the generic PostApiTokens builder with application/json body

func NewPostApiTokensRequestWithBody

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

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

func Paged

func Paged[T any](response *http.Response, err error) (T, int, error)

Paged decodes a page of a list, and the X-Total-Count of the whole list.

func SessionFile

func SessionFile() (string, error)

SessionFile keeps the session, readable by the user only: the token opens every application.

Types

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

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

DeleteApiApplications Delete applications

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

Corresponds with DELETE /api/applications (the `DeleteApiApplications` operationId).

func (*Client) DeleteApiApplicationsDeleted added in v0.4.0

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

DeleteApiApplicationsDeleted Delete applications from the trash for good

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

Corresponds with DELETE /api/applications/deleted (the `DeleteApiApplicationsDeleted` operationId).

func (*Client) DeleteApiApplicationsDeletedWithBody added in v0.4.0

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

DeleteApiApplicationsDeletedWithBody Delete applications from the trash for good

Takes any type of body and a specified content type.

Corresponds with DELETE /api/applications/deleted (the `DeleteApiApplicationsDeleted` operationId).

func (*Client) DeleteApiApplicationsWithBody

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

DeleteApiApplicationsWithBody Delete applications

Takes any type of body and a specified content type.

Corresponds with DELETE /api/applications (the `DeleteApiApplications` operationId).

func (*Client) DeleteApiData added in v0.2.0

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

DeleteApiData Delete every application

Corresponds with DELETE /api/data (the `DeleteApiData` operationId).

func (*Client) DeleteApiTokensId

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

DeleteApiTokensId Revoke a token

Corresponds with DELETE /api/tokens/{id} (the `DeleteApiTokensId` operationId).

func (*Client) GetApiApplications

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

GetApiApplications List applications

Corresponds with GET /api/applications (the `GetApiApplications` operationId).

func (*Client) GetApiApplicationsDeleted added in v0.4.0

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

GetApiApplicationsDeleted List deleted applications

Corresponds with GET /api/applications/deleted (the `GetApiApplicationsDeleted` operationId).

func (*Client) GetApiExport added in v0.5.0

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

GetApiExport Export all the data as JSON

Corresponds with GET /api/export (the `GetApiExport` operationId).

func (*Client) GetApiMe

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

GetApiMe Who is asking

Corresponds with GET /api/me (the `GetApiMe` operationId).

func (*Client) GetApiPreferences added in v0.2.0

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

GetApiPreferences Read the preferences

Corresponds with GET /api/preferences (the `GetApiPreferences` operationId).

func (*Client) GetApiSources added in v0.2.0

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

GetApiSources List the sources in use

Corresponds with GET /api/sources (the `GetApiSources` operationId).

func (*Client) GetApiStats

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

GetApiStats Count the applications

Corresponds with GET /api/stats (the `GetApiStats` operationId).

func (*Client) GetApiStatusChanges added in v0.2.0

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

GetApiStatusChanges List the status history

Corresponds with GET /api/status-changes (the `GetApiStatusChanges` operationId).

func (*Client) GetApiTokens

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

GetApiTokens List the tokens

Corresponds with GET /api/tokens (the `GetApiTokens` operationId).

func (*Client) PatchApiApplications

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

PatchApiApplications Change applications

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

Corresponds with PATCH /api/applications (the `PatchApiApplications` operationId).

func (*Client) PatchApiApplicationsWithBody

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

PatchApiApplicationsWithBody Change applications

Takes any type of body and a specified content type.

Corresponds with PATCH /api/applications (the `PatchApiApplications` operationId).

func (*Client) PatchApiPreferences added in v0.2.0

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

PatchApiPreferences Change the preferences

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

Corresponds with PATCH /api/preferences (the `PatchApiPreferences` operationId).

func (*Client) PatchApiPreferencesWithBody added in v0.2.0

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

PatchApiPreferencesWithBody Change the preferences

Takes any type of body and a specified content type.

Corresponds with PATCH /api/preferences (the `PatchApiPreferences` operationId).

func (*Client) PostApiApplications

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

PostApiApplications Create applications

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

Corresponds with POST /api/applications (the `PostApiApplications` operationId).

func (*Client) PostApiApplicationsRestore added in v0.4.0

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

PostApiApplicationsRestore Restore deleted applications

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

Corresponds with POST /api/applications/restore (the `PostApiApplicationsRestore` operationId).

func (*Client) PostApiApplicationsRestoreWithBody added in v0.4.0

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

PostApiApplicationsRestoreWithBody Restore deleted applications

Takes any type of body and a specified content type.

Corresponds with POST /api/applications/restore (the `PostApiApplicationsRestore` operationId).

func (*Client) PostApiApplicationsWithBody

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

PostApiApplicationsWithBody Create applications

Takes any type of body and a specified content type.

Corresponds with POST /api/applications (the `PostApiApplications` operationId).

func (*Client) PostApiImport added in v0.5.0

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

PostApiImport Restore an export

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

Corresponds with POST /api/import (the `PostApiImport` operationId).

func (*Client) PostApiImportWithBody added in v0.5.0

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

PostApiImportWithBody Restore an export

Takes any type of body and a specified content type.

Corresponds with POST /api/import (the `PostApiImport` operationId).

func (*Client) PostApiLogin

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

PostApiLogin Log in

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

Corresponds with POST /api/login (the `PostApiLogin` operationId).

func (*Client) PostApiLoginWithBody

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

PostApiLoginWithBody Log in

Takes any type of body and a specified content type.

Corresponds with POST /api/login (the `PostApiLogin` operationId).

func (*Client) PostApiLogout

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

PostApiLogout Log out

Corresponds with POST /api/logout (the `PostApiLogout` operationId).

func (*Client) PostApiTokens

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

PostApiTokens Create an API token

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

Corresponds with POST /api/tokens (the `PostApiTokens` operationId).

func (*Client) PostApiTokensWithBody

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

PostApiTokensWithBody Create an API token

Takes any type of body and a specified content type.

Corresponds with POST /api/tokens (the `PostApiTokens` operationId).

type ClientInterface

type ClientInterface interface {

	// DeleteApiApplicationsWithBody Delete applications
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with DELETE /api/applications (the `DeleteApiApplications` operationId).
	DeleteApiApplicationsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteApiApplications Delete applications
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with DELETE /api/applications (the `DeleteApiApplications` operationId).
	DeleteApiApplications(ctx context.Context, body DeleteApiApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetApiApplications List applications
	//
	// Corresponds with GET /api/applications (the `GetApiApplications` operationId).
	GetApiApplications(ctx context.Context, params *GetApiApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PatchApiApplicationsWithBody Change applications
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with PATCH /api/applications (the `PatchApiApplications` operationId).
	PatchApiApplicationsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PatchApiApplications Change applications
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with PATCH /api/applications (the `PatchApiApplications` operationId).
	PatchApiApplications(ctx context.Context, body PatchApiApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostApiApplicationsWithBody Create applications
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /api/applications (the `PostApiApplications` operationId).
	PostApiApplicationsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostApiApplications Create applications
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /api/applications (the `PostApiApplications` operationId).
	PostApiApplications(ctx context.Context, body PostApiApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteApiApplicationsDeletedWithBody Delete applications from the trash for good
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with DELETE /api/applications/deleted (the `DeleteApiApplicationsDeleted` operationId).
	DeleteApiApplicationsDeletedWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteApiApplicationsDeleted Delete applications from the trash for good
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with DELETE /api/applications/deleted (the `DeleteApiApplicationsDeleted` operationId).
	DeleteApiApplicationsDeleted(ctx context.Context, body DeleteApiApplicationsDeletedJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetApiApplicationsDeleted List deleted applications
	//
	// Corresponds with GET /api/applications/deleted (the `GetApiApplicationsDeleted` operationId).
	GetApiApplicationsDeleted(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostApiApplicationsRestoreWithBody Restore deleted applications
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /api/applications/restore (the `PostApiApplicationsRestore` operationId).
	PostApiApplicationsRestoreWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostApiApplicationsRestore Restore deleted applications
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /api/applications/restore (the `PostApiApplicationsRestore` operationId).
	PostApiApplicationsRestore(ctx context.Context, body PostApiApplicationsRestoreJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteApiData Delete every application
	//
	// Corresponds with DELETE /api/data (the `DeleteApiData` operationId).
	DeleteApiData(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetApiExport Export all the data as JSON
	//
	// Corresponds with GET /api/export (the `GetApiExport` operationId).
	GetApiExport(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostApiImportWithBody Restore an export
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /api/import (the `PostApiImport` operationId).
	PostApiImportWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostApiImport Restore an export
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /api/import (the `PostApiImport` operationId).
	PostApiImport(ctx context.Context, body PostApiImportJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostApiLoginWithBody Log in
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /api/login (the `PostApiLogin` operationId).
	PostApiLoginWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostApiLogin Log in
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /api/login (the `PostApiLogin` operationId).
	PostApiLogin(ctx context.Context, body PostApiLoginJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostApiLogout Log out
	//
	// Corresponds with POST /api/logout (the `PostApiLogout` operationId).
	PostApiLogout(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetApiMe Who is asking
	//
	// Corresponds with GET /api/me (the `GetApiMe` operationId).
	GetApiMe(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetApiPreferences Read the preferences
	//
	// Corresponds with GET /api/preferences (the `GetApiPreferences` operationId).
	GetApiPreferences(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PatchApiPreferencesWithBody Change the preferences
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with PATCH /api/preferences (the `PatchApiPreferences` operationId).
	PatchApiPreferencesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PatchApiPreferences Change the preferences
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with PATCH /api/preferences (the `PatchApiPreferences` operationId).
	PatchApiPreferences(ctx context.Context, body PatchApiPreferencesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetApiSources List the sources in use
	//
	// Corresponds with GET /api/sources (the `GetApiSources` operationId).
	GetApiSources(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetApiStats Count the applications
	//
	// Corresponds with GET /api/stats (the `GetApiStats` operationId).
	GetApiStats(ctx context.Context, params *GetApiStatsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetApiStatusChanges List the status history
	//
	// Corresponds with GET /api/status-changes (the `GetApiStatusChanges` operationId).
	GetApiStatusChanges(ctx context.Context, params *GetApiStatusChangesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetApiTokens List the tokens
	//
	// Corresponds with GET /api/tokens (the `GetApiTokens` operationId).
	GetApiTokens(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostApiTokensWithBody Create an API token
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /api/tokens (the `PostApiTokens` operationId).
	PostApiTokensWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostApiTokens Create an API token
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /api/tokens (the `PostApiTokens` operationId).
	PostApiTokens(ctx context.Context, body PostApiTokensJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteApiTokensId Revoke a token
	//
	// Corresponds with DELETE /api/tokens/{id} (the `DeleteApiTokensId` operationId).
	DeleteApiTokensId(ctx context.Context, id string, 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 Bearer

func Bearer(token string) ClientOption

Bearer sends token with every request.

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 New

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

New is the API client of every command: a call ends after Timeout, or at the deadline its ctx already has.

func NewClientWithResponses

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

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

func (*ClientWithResponses) DeleteApiApplicationsDeletedWithBodyWithResponse added in v0.4.0

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

DeleteApiApplicationsDeletedWithBodyWithResponse Delete applications from the trash for good

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

Corresponds with DELETE /api/applications/deleted (the `DeleteApiApplicationsDeleted` operationId).

func (*ClientWithResponses) DeleteApiApplicationsDeletedWithResponse added in v0.4.0

func (c *ClientWithResponses) DeleteApiApplicationsDeletedWithResponse(ctx context.Context, body DeleteApiApplicationsDeletedJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteApiApplicationsDeletedResponse, error)

DeleteApiApplicationsDeletedWithResponse Delete applications from the trash for good

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

Corresponds with DELETE /api/applications/deleted (the `DeleteApiApplicationsDeleted` operationId).

func (*ClientWithResponses) DeleteApiApplicationsWithBodyWithResponse

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

DeleteApiApplicationsWithBodyWithResponse Delete applications

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

Corresponds with DELETE /api/applications (the `DeleteApiApplications` operationId).

func (*ClientWithResponses) DeleteApiApplicationsWithResponse

func (c *ClientWithResponses) DeleteApiApplicationsWithResponse(ctx context.Context, body DeleteApiApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteApiApplicationsResponse, error)

DeleteApiApplicationsWithResponse Delete applications

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

Corresponds with DELETE /api/applications (the `DeleteApiApplications` operationId).

func (*ClientWithResponses) DeleteApiDataWithResponse added in v0.2.0

func (c *ClientWithResponses) DeleteApiDataWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*DeleteApiDataResponse, error)

DeleteApiDataWithResponse Delete every application

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

Corresponds with DELETE /api/data (the `DeleteApiData` operationId).

func (*ClientWithResponses) DeleteApiTokensIdWithResponse

func (c *ClientWithResponses) DeleteApiTokensIdWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteApiTokensIdResponse, error)

DeleteApiTokensIdWithResponse Revoke a token

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

Corresponds with DELETE /api/tokens/{id} (the `DeleteApiTokensId` operationId).

func (*ClientWithResponses) GetApiApplicationsDeletedWithResponse added in v0.4.0

func (c *ClientWithResponses) GetApiApplicationsDeletedWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiApplicationsDeletedResponse, error)

GetApiApplicationsDeletedWithResponse List deleted applications

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

Corresponds with GET /api/applications/deleted (the `GetApiApplicationsDeleted` operationId).

func (*ClientWithResponses) GetApiApplicationsWithResponse

func (c *ClientWithResponses) GetApiApplicationsWithResponse(ctx context.Context, params *GetApiApplicationsParams, reqEditors ...RequestEditorFn) (*GetApiApplicationsResponse, error)

GetApiApplicationsWithResponse List applications

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

Corresponds with GET /api/applications (the `GetApiApplications` operationId).

func (*ClientWithResponses) GetApiExportWithResponse added in v0.5.0

func (c *ClientWithResponses) GetApiExportWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiExportResponse, error)

GetApiExportWithResponse Export all the data as JSON

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

Corresponds with GET /api/export (the `GetApiExport` operationId).

func (*ClientWithResponses) GetApiMeWithResponse

func (c *ClientWithResponses) GetApiMeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiMeResponse, error)

GetApiMeWithResponse Who is asking

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

Corresponds with GET /api/me (the `GetApiMe` operationId).

func (*ClientWithResponses) GetApiPreferencesWithResponse added in v0.2.0

func (c *ClientWithResponses) GetApiPreferencesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiPreferencesResponse, error)

GetApiPreferencesWithResponse Read the preferences

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

Corresponds with GET /api/preferences (the `GetApiPreferences` operationId).

func (*ClientWithResponses) GetApiSourcesWithResponse added in v0.2.0

func (c *ClientWithResponses) GetApiSourcesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiSourcesResponse, error)

GetApiSourcesWithResponse List the sources in use

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

Corresponds with GET /api/sources (the `GetApiSources` operationId).

func (*ClientWithResponses) GetApiStatsWithResponse

func (c *ClientWithResponses) GetApiStatsWithResponse(ctx context.Context, params *GetApiStatsParams, reqEditors ...RequestEditorFn) (*GetApiStatsResponse, error)

GetApiStatsWithResponse Count the applications

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

Corresponds with GET /api/stats (the `GetApiStats` operationId).

func (*ClientWithResponses) GetApiStatusChangesWithResponse added in v0.2.0

func (c *ClientWithResponses) GetApiStatusChangesWithResponse(ctx context.Context, params *GetApiStatusChangesParams, reqEditors ...RequestEditorFn) (*GetApiStatusChangesResponse, error)

GetApiStatusChangesWithResponse List the status history

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

Corresponds with GET /api/status-changes (the `GetApiStatusChanges` operationId).

func (*ClientWithResponses) GetApiTokensWithResponse

func (c *ClientWithResponses) GetApiTokensWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiTokensResponse, error)

GetApiTokensWithResponse List the tokens

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

Corresponds with GET /api/tokens (the `GetApiTokens` operationId).

func (*ClientWithResponses) PatchApiApplicationsWithBodyWithResponse

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

PatchApiApplicationsWithBodyWithResponse Change applications

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

Corresponds with PATCH /api/applications (the `PatchApiApplications` operationId).

func (*ClientWithResponses) PatchApiApplicationsWithResponse

func (c *ClientWithResponses) PatchApiApplicationsWithResponse(ctx context.Context, body PatchApiApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApiApplicationsResponse, error)

PatchApiApplicationsWithResponse Change applications

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

Corresponds with PATCH /api/applications (the `PatchApiApplications` operationId).

func (*ClientWithResponses) PatchApiPreferencesWithBodyWithResponse added in v0.2.0

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

PatchApiPreferencesWithBodyWithResponse Change the preferences

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

Corresponds with PATCH /api/preferences (the `PatchApiPreferences` operationId).

func (*ClientWithResponses) PatchApiPreferencesWithResponse added in v0.2.0

func (c *ClientWithResponses) PatchApiPreferencesWithResponse(ctx context.Context, body PatchApiPreferencesJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApiPreferencesResponse, error)

PatchApiPreferencesWithResponse Change the preferences

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

Corresponds with PATCH /api/preferences (the `PatchApiPreferences` operationId).

func (*ClientWithResponses) PostApiApplicationsRestoreWithBodyWithResponse added in v0.4.0

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

PostApiApplicationsRestoreWithBodyWithResponse Restore deleted applications

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/applications/restore (the `PostApiApplicationsRestore` operationId).

func (*ClientWithResponses) PostApiApplicationsRestoreWithResponse added in v0.4.0

func (c *ClientWithResponses) PostApiApplicationsRestoreWithResponse(ctx context.Context, body PostApiApplicationsRestoreJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiApplicationsRestoreResponse, error)

PostApiApplicationsRestoreWithResponse Restore deleted applications

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/applications/restore (the `PostApiApplicationsRestore` operationId).

func (*ClientWithResponses) PostApiApplicationsWithBodyWithResponse

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

PostApiApplicationsWithBodyWithResponse Create applications

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/applications (the `PostApiApplications` operationId).

func (*ClientWithResponses) PostApiApplicationsWithResponse

func (c *ClientWithResponses) PostApiApplicationsWithResponse(ctx context.Context, body PostApiApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiApplicationsResponse, error)

PostApiApplicationsWithResponse Create applications

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/applications (the `PostApiApplications` operationId).

func (*ClientWithResponses) PostApiImportWithBodyWithResponse added in v0.5.0

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

PostApiImportWithBodyWithResponse Restore an export

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/import (the `PostApiImport` operationId).

func (*ClientWithResponses) PostApiImportWithResponse added in v0.5.0

func (c *ClientWithResponses) PostApiImportWithResponse(ctx context.Context, body PostApiImportJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiImportResponse, error)

PostApiImportWithResponse Restore an export

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/import (the `PostApiImport` operationId).

func (*ClientWithResponses) PostApiLoginWithBodyWithResponse

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

PostApiLoginWithBodyWithResponse Log in

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/login (the `PostApiLogin` operationId).

func (*ClientWithResponses) PostApiLoginWithResponse

func (c *ClientWithResponses) PostApiLoginWithResponse(ctx context.Context, body PostApiLoginJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiLoginResponse, error)

PostApiLoginWithResponse Log in

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/login (the `PostApiLogin` operationId).

func (*ClientWithResponses) PostApiLogoutWithResponse

func (c *ClientWithResponses) PostApiLogoutWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PostApiLogoutResponse, error)

PostApiLogoutWithResponse Log out

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

Corresponds with POST /api/logout (the `PostApiLogout` operationId).

func (*ClientWithResponses) PostApiTokensWithBodyWithResponse

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

PostApiTokensWithBodyWithResponse Create an API 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 /api/tokens (the `PostApiTokens` operationId).

func (*ClientWithResponses) PostApiTokensWithResponse

func (c *ClientWithResponses) PostApiTokensWithResponse(ctx context.Context, body PostApiTokensJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiTokensResponse, error)

PostApiTokensWithResponse Create an API token

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/tokens (the `PostApiTokens` operationId).

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {

	// DeleteApiApplicationsWithBodyWithResponse Delete applications
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with DELETE /api/applications (the `DeleteApiApplications` operationId).
	DeleteApiApplicationsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteApiApplicationsResponse, error)

	// DeleteApiApplicationsWithResponse Delete applications
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with DELETE /api/applications (the `DeleteApiApplications` operationId).
	DeleteApiApplicationsWithResponse(ctx context.Context, body DeleteApiApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteApiApplicationsResponse, error)

	// GetApiApplicationsWithResponse List applications
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/applications (the `GetApiApplications` operationId).
	GetApiApplicationsWithResponse(ctx context.Context, params *GetApiApplicationsParams, reqEditors ...RequestEditorFn) (*GetApiApplicationsResponse, error)

	// PatchApiApplicationsWithBodyWithResponse Change applications
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PATCH /api/applications (the `PatchApiApplications` operationId).
	PatchApiApplicationsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchApiApplicationsResponse, error)

	// PatchApiApplicationsWithResponse Change applications
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PATCH /api/applications (the `PatchApiApplications` operationId).
	PatchApiApplicationsWithResponse(ctx context.Context, body PatchApiApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApiApplicationsResponse, error)

	// PostApiApplicationsWithBodyWithResponse Create applications
	//
	// 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/applications (the `PostApiApplications` operationId).
	PostApiApplicationsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiApplicationsResponse, error)

	// PostApiApplicationsWithResponse Create applications
	//
	// 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/applications (the `PostApiApplications` operationId).
	PostApiApplicationsWithResponse(ctx context.Context, body PostApiApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiApplicationsResponse, error)

	// DeleteApiApplicationsDeletedWithBodyWithResponse Delete applications from the trash for good
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with DELETE /api/applications/deleted (the `DeleteApiApplicationsDeleted` operationId).
	DeleteApiApplicationsDeletedWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteApiApplicationsDeletedResponse, error)

	// DeleteApiApplicationsDeletedWithResponse Delete applications from the trash for good
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with DELETE /api/applications/deleted (the `DeleteApiApplicationsDeleted` operationId).
	DeleteApiApplicationsDeletedWithResponse(ctx context.Context, body DeleteApiApplicationsDeletedJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteApiApplicationsDeletedResponse, error)

	// GetApiApplicationsDeletedWithResponse List deleted applications
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/applications/deleted (the `GetApiApplicationsDeleted` operationId).
	GetApiApplicationsDeletedWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiApplicationsDeletedResponse, error)

	// PostApiApplicationsRestoreWithBodyWithResponse Restore deleted applications
	//
	// 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/applications/restore (the `PostApiApplicationsRestore` operationId).
	PostApiApplicationsRestoreWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiApplicationsRestoreResponse, error)

	// PostApiApplicationsRestoreWithResponse Restore deleted applications
	//
	// 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/applications/restore (the `PostApiApplicationsRestore` operationId).
	PostApiApplicationsRestoreWithResponse(ctx context.Context, body PostApiApplicationsRestoreJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiApplicationsRestoreResponse, error)

	// DeleteApiDataWithResponse Delete every application
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with DELETE /api/data (the `DeleteApiData` operationId).
	DeleteApiDataWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*DeleteApiDataResponse, error)

	// GetApiExportWithResponse Export all the data as JSON
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/export (the `GetApiExport` operationId).
	GetApiExportWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiExportResponse, error)

	// PostApiImportWithBodyWithResponse Restore an export
	//
	// 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/import (the `PostApiImport` operationId).
	PostApiImportWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiImportResponse, error)

	// PostApiImportWithResponse Restore an export
	//
	// 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/import (the `PostApiImport` operationId).
	PostApiImportWithResponse(ctx context.Context, body PostApiImportJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiImportResponse, error)

	// PostApiLoginWithBodyWithResponse Log in
	//
	// 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/login (the `PostApiLogin` operationId).
	PostApiLoginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiLoginResponse, error)

	// PostApiLoginWithResponse Log in
	//
	// 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/login (the `PostApiLogin` operationId).
	PostApiLoginWithResponse(ctx context.Context, body PostApiLoginJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiLoginResponse, error)

	// PostApiLogoutWithResponse Log out
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/logout (the `PostApiLogout` operationId).
	PostApiLogoutWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PostApiLogoutResponse, error)

	// GetApiMeWithResponse Who is asking
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/me (the `GetApiMe` operationId).
	GetApiMeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiMeResponse, error)

	// GetApiPreferencesWithResponse Read the preferences
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/preferences (the `GetApiPreferences` operationId).
	GetApiPreferencesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiPreferencesResponse, error)

	// PatchApiPreferencesWithBodyWithResponse Change the preferences
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PATCH /api/preferences (the `PatchApiPreferences` operationId).
	PatchApiPreferencesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchApiPreferencesResponse, error)

	// PatchApiPreferencesWithResponse Change the preferences
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PATCH /api/preferences (the `PatchApiPreferences` operationId).
	PatchApiPreferencesWithResponse(ctx context.Context, body PatchApiPreferencesJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApiPreferencesResponse, error)

	// GetApiSourcesWithResponse List the sources in use
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/sources (the `GetApiSources` operationId).
	GetApiSourcesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiSourcesResponse, error)

	// GetApiStatsWithResponse Count the applications
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/stats (the `GetApiStats` operationId).
	GetApiStatsWithResponse(ctx context.Context, params *GetApiStatsParams, reqEditors ...RequestEditorFn) (*GetApiStatsResponse, error)

	// GetApiStatusChangesWithResponse List the status history
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/status-changes (the `GetApiStatusChanges` operationId).
	GetApiStatusChangesWithResponse(ctx context.Context, params *GetApiStatusChangesParams, reqEditors ...RequestEditorFn) (*GetApiStatusChangesResponse, error)

	// GetApiTokensWithResponse List the tokens
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/tokens (the `GetApiTokens` operationId).
	GetApiTokensWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiTokensResponse, error)

	// PostApiTokensWithBodyWithResponse Create an API 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 /api/tokens (the `PostApiTokens` operationId).
	PostApiTokensWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiTokensResponse, error)

	// PostApiTokensWithResponse Create an API token
	//
	// 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/tokens (the `PostApiTokens` operationId).
	PostApiTokensWithResponse(ctx context.Context, body PostApiTokensJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiTokensResponse, error)

	// DeleteApiTokensIdWithResponse Revoke a token
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with DELETE /api/tokens/{id} (the `DeleteApiTokensId` operationId).
	DeleteApiTokensIdWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteApiTokensIdResponse, error)
}

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

type CreateapitokenInput

type CreateapitokenInput struct {
	// ExpiresIn ExpiresIn is how long the token works, 90d when left out.
	ExpiresIn *CreateapitokenInputExpiresIn `json:"expires_in,omitempty"`
	Name      string                        `json:"name"`

	// ReadOnly ReadOnly makes a token that reads and changes nothing.
	ReadOnly *bool `json:"read_only,omitempty"`
}

CreateapitokenInput defines model for createapitoken.Input.

type CreateapitokenInputExpiresIn

type CreateapitokenInputExpiresIn string

CreateapitokenInputExpiresIn ExpiresIn is how long the token works, 90d when left out.

Defines values for CreateapitokenInputExpiresIn.

func (CreateapitokenInputExpiresIn) Valid

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

type CreateapitokenResult

type CreateapitokenResult struct {
	ApiToken DomainToken `json:"api_token"`
	Token    string      `json:"token"`
}

CreateapitokenResult defines model for createapitoken.Result.

type CreatesessionInput

type CreatesessionInput struct {
	Password string `json:"password"`

	// Token Token asks the token in the answer too, for a client without cookies (the CLI): the web keeps it HttpOnly.
	Token *bool `json:"token,omitempty"`
}

CreatesessionInput defines model for createsession.Input.

type CreatesessionResult

type CreatesessionResult struct {
	ExpiresAt string  `json:"expires_at"`
	Token     *string `json:"token,omitempty"`
}

CreatesessionResult defines model for createsession.Result.

type DeleteApiApplicationsDeletedJSONRequestBody added in v0.4.0

type DeleteApiApplicationsDeletedJSONRequestBody = ForgetapplicationsInput

DeleteApiApplicationsDeletedJSONRequestBody defines body for DeleteApiApplicationsDeleted for application/json ContentType.

type DeleteApiApplicationsDeletedResponse added in v0.4.0

type DeleteApiApplicationsDeletedResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *DomainBatchResult
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *RespondFailure
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *RespondFailure
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *RespondFailure
}

func ParseDeleteApiApplicationsDeletedResponse added in v0.4.0

func ParseDeleteApiApplicationsDeletedResponse(rsp *http.Response) (*DeleteApiApplicationsDeletedResponse, error)

ParseDeleteApiApplicationsDeletedResponse parses an HTTP response from a DeleteApiApplicationsDeletedWithResponse call

func (DeleteApiApplicationsDeletedResponse) ContentType added in v0.4.0

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

func (DeleteApiApplicationsDeletedResponse) GetBody added in v0.4.0

GetBody returns the raw response body bytes

func (DeleteApiApplicationsDeletedResponse) GetJSON200 added in v0.4.0

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

func (DeleteApiApplicationsDeletedResponse) GetJSON400 added in v0.4.0

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

func (DeleteApiApplicationsDeletedResponse) GetJSON401 added in v0.4.0

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

func (DeleteApiApplicationsDeletedResponse) GetJSON403 added in v0.4.0

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

func (DeleteApiApplicationsDeletedResponse) Status added in v0.4.0

Status returns HTTPResponse.Status

func (DeleteApiApplicationsDeletedResponse) StatusCode added in v0.4.0

StatusCode returns HTTPResponse.StatusCode

type DeleteApiApplicationsJSONRequestBody

type DeleteApiApplicationsJSONRequestBody = DeleteapplicationsInput

DeleteApiApplicationsJSONRequestBody defines body for DeleteApiApplications for application/json ContentType.

type DeleteApiApplicationsResponse

type DeleteApiApplicationsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *DomainBatchResult
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *RespondFailure
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *RespondFailure
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *RespondFailure
}

func ParseDeleteApiApplicationsResponse

func ParseDeleteApiApplicationsResponse(rsp *http.Response) (*DeleteApiApplicationsResponse, error)

ParseDeleteApiApplicationsResponse parses an HTTP response from a DeleteApiApplicationsWithResponse call

func (DeleteApiApplicationsResponse) ContentType

func (r DeleteApiApplicationsResponse) ContentType() string

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

func (DeleteApiApplicationsResponse) GetBody

func (r DeleteApiApplicationsResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (DeleteApiApplicationsResponse) GetJSON200

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

func (DeleteApiApplicationsResponse) GetJSON400

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

func (DeleteApiApplicationsResponse) GetJSON401

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

func (DeleteApiApplicationsResponse) GetJSON403

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

func (DeleteApiApplicationsResponse) Status

Status returns HTTPResponse.Status

func (DeleteApiApplicationsResponse) StatusCode

func (r DeleteApiApplicationsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteApiDataResponse added in v0.2.0

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

func ParseDeleteApiDataResponse added in v0.2.0

func ParseDeleteApiDataResponse(rsp *http.Response) (*DeleteApiDataResponse, error)

ParseDeleteApiDataResponse parses an HTTP response from a DeleteApiDataWithResponse call

func (DeleteApiDataResponse) ContentType added in v0.2.0

func (r DeleteApiDataResponse) ContentType() string

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

func (DeleteApiDataResponse) GetBody added in v0.2.0

func (r DeleteApiDataResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (DeleteApiDataResponse) GetJSON200 added in v0.2.0

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

func (DeleteApiDataResponse) GetJSON401 added in v0.2.0

func (r DeleteApiDataResponse) GetJSON401() *RespondFailure

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

func (DeleteApiDataResponse) GetJSON403 added in v0.2.0

func (r DeleteApiDataResponse) GetJSON403() *RespondFailure

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

func (DeleteApiDataResponse) Status added in v0.2.0

func (r DeleteApiDataResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteApiDataResponse) StatusCode added in v0.2.0

func (r DeleteApiDataResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteApiTokensIdResponse

type DeleteApiTokensIdResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *RespondFailure
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *RespondFailure
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *RespondFailure
}

func ParseDeleteApiTokensIdResponse

func ParseDeleteApiTokensIdResponse(rsp *http.Response) (*DeleteApiTokensIdResponse, error)

ParseDeleteApiTokensIdResponse parses an HTTP response from a DeleteApiTokensIdWithResponse call

func (DeleteApiTokensIdResponse) ContentType

func (r DeleteApiTokensIdResponse) ContentType() string

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

func (DeleteApiTokensIdResponse) GetBody

func (r DeleteApiTokensIdResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (DeleteApiTokensIdResponse) GetJSON401

func (r DeleteApiTokensIdResponse) GetJSON401() *RespondFailure

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

func (DeleteApiTokensIdResponse) GetJSON403

func (r DeleteApiTokensIdResponse) GetJSON403() *RespondFailure

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

func (DeleteApiTokensIdResponse) GetJSON404

func (r DeleteApiTokensIdResponse) GetJSON404() *RespondFailure

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

func (DeleteApiTokensIdResponse) Status

func (r DeleteApiTokensIdResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteApiTokensIdResponse) StatusCode

func (r DeleteApiTokensIdResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteapplicationsInput

type DeleteapplicationsInput struct {
	AppliedAfter *string `json:"applied_after,omitempty"`

	// AppliedBefore AppliedBefore and AppliedAfter are strict: applied_at < before, applied_at > after.
	AppliedBefore *string `json:"applied_before,omitempty"`

	// DryRun DryRun deletes nothing: the result is what the call would delete.
	DryRun *bool `json:"dry_run,omitempty"`

	// Ids IDs are the applications by id.
	Ids *[]string `json:"ids,omitempty"`

	// Location Location is this city, whatever the case.
	Location *string `json:"location,omitempty"`

	// Q Q is text found in the company, the address, website, source_detail, contact or comment, case-insensitive.
	Q      *string `json:"q,omitempty"`
	Source *string `json:"source,omitempty"`

	// Status Status is any of these statuses.
	Status *[]DomainStatus `json:"status,omitempty"`

	// Summary Summary leaves the ids out of the result: the counts and failures only.
	Summary *bool `json:"summary,omitempty"`

	// UntouchedSince UntouchedSince is the applications without news since this day: no status change, follow-up nor interview.
	UntouchedSince *string `json:"untouched_since,omitempty"`
}

DeleteapplicationsInput defines model for deleteapplications.Input.

type DomainApplication

type DomainApplication struct {
	AppliedAt    *string `json:"applied_at,omitempty"`
	Comment      *string `json:"comment,omitempty"`
	Company      *string `json:"company,omitempty"`
	ContactEmail *string `json:"contact_email,omitempty"`
	ContactName  *string `json:"contact_name,omitempty"`
	Country      *string `json:"country,omitempty"`
	CreatedAt    *string `json:"created_at,omitempty"`

	// FollowedUpAt FollowedUpAt is the last follow-up, set by an update with followed_up.
	FollowedUpAt *string `json:"followed_up_at,omitempty"`
	Id           string  `json:"id"`

	// InterviewAt InterviewAt is the next interview's local date and time.
	InterviewAt *string `json:"interview_at,omitempty"`

	// Location Location is the city; Street, PostalCode and Country complete the address when known.
	Location     *string       `json:"location,omitempty"`
	PostalCode   *string       `json:"postal_code,omitempty"`
	Rating       *int          `json:"rating,omitempty"`
	Source       *string       `json:"source,omitempty"`
	SourceDetail *string       `json:"source_detail,omitempty"`
	Status       *DomainStatus `json:"status,omitempty"`
	Street       *string       `json:"street,omitempty"`

	// Truncated Truncated tells that comment was cut at max_chars.
	Truncated *bool   `json:"truncated,omitempty"`
	UpdatedAt *string `json:"updated_at,omitempty"`

	// Website Website is the company's site, or an e-mail to write to when it has none.
	Website *string `json:"website,omitempty"`
}

DomainApplication defines model for domain.Application.

type DomainBackup added in v0.5.0

type DomainBackup struct {
	Applications  []DomainApplication        `json:"applications"`
	Deleted       []DomainDeletedApplication `json:"deleted"`
	ExportedAt    string                     `json:"exported_at"`
	FollowUps     []DomainFollowUp           `json:"follow_ups"`
	StatusChanges []DomainStatusChange       `json:"status_changes"`
	Version       int                        `json:"version"`
}

DomainBackup defines model for domain.Backup.

type DomainBatchFailure

type DomainBatchFailure struct {
	Error string  `json:"error"`
	Id    *string `json:"id,omitempty"`
	Index *int    `json:"index,omitempty"`
	Op    *int    `json:"op,omitempty"`
}

DomainBatchFailure defines model for domain.BatchFailure.

type DomainBatchResult

type DomainBatchResult struct {
	Count  int                   `json:"count"`
	DryRun *bool                 `json:"dry_run,omitempty"`
	Failed *[]DomainBatchFailure `json:"failed,omitempty"`
	Ids    *[]string             `json:"ids,omitempty"`
}

DomainBatchResult defines model for domain.BatchResult.

type DomainChanges

type DomainChanges struct {
	AppliedAt    *string `json:"applied_at,omitempty"`
	Comment      *string `json:"comment,omitempty"`
	Company      *string `json:"company,omitempty"`
	ContactEmail *string `json:"contact_email,omitempty"`
	ContactName  *string `json:"contact_name,omitempty"`
	Country      *string `json:"country,omitempty"`

	// FollowedUp FollowedUp records a follow-up now: followed_up_at becomes now, and the status counts as news again.
	FollowedUp *bool `json:"followed_up,omitempty"`

	// InterviewAt InterviewAt, ContactName and ContactEmail are cleared by "".
	InterviewAt  *string       `json:"interview_at,omitempty"`
	Location     *string       `json:"location,omitempty"`
	PostalCode   *string       `json:"postal_code,omitempty"`
	Rating       *int          `json:"rating,omitempty"`
	Source       *string       `json:"source,omitempty"`
	SourceDetail *string       `json:"source_detail,omitempty"`
	Status       *DomainStatus `json:"status,omitempty"`
	Street       *string       `json:"street,omitempty"`

	// UndoFollowUp UndoFollowUp forgets the last follow-up: followed_up_at goes back to the one before, if any.
	UndoFollowUp *bool `json:"undo_follow_up,omitempty"`

	// UndoStatus UndoStatus takes the status back to the one before its last change and forgets that change: a status set by
	// mistake leaves no step in the history.
	UndoStatus *bool   `json:"undo_status,omitempty"`
	Website    *string `json:"website,omitempty"`
}

DomainChanges defines model for domain.Changes.

type DomainDeletedApplication added in v0.4.0

type DomainDeletedApplication struct {
	// Application Application is the row as it was, in JSON: a column the applications gain needs nothing here.
	Application DomainApplication `json:"application"`
	DeletedAt   string            `json:"deleted_at"`
	Id          string            `json:"id"`
}

DomainDeletedApplication defines model for domain.DeletedApplication.

type DomainFollowUp added in v0.5.0

type DomainFollowUp struct {
	ApplicationId string `json:"application_id"`
	At            string `json:"at"`
}

DomainFollowUp defines model for domain.FollowUp.

type DomainNewApplication

type DomainNewApplication struct {
	AppliedAt    *string       `json:"applied_at,omitempty"`
	Comment      *string       `json:"comment,omitempty"`
	Company      string        `json:"company"`
	ContactEmail *string       `json:"contact_email,omitempty"`
	ContactName  *string       `json:"contact_name,omitempty"`
	Country      *string       `json:"country,omitempty"`
	InterviewAt  *string       `json:"interview_at,omitempty"`
	Location     string        `json:"location"`
	PostalCode   *string       `json:"postal_code,omitempty"`
	Rating       *int          `json:"rating,omitempty"`
	Source       *string       `json:"source,omitempty"`
	SourceDetail *string       `json:"source_detail,omitempty"`
	Status       *DomainStatus `json:"status,omitempty"`
	Street       *string       `json:"street,omitempty"`
	Website      *string       `json:"website,omitempty"`
}

DomainNewApplication defines model for domain.NewApplication.

type DomainPreferenceChanges added in v0.2.0

type DomainPreferenceChanges struct {
	DefaultCountry  *string                      `json:"default_country,omitempty"`
	DefaultLocation *string                      `json:"default_location,omitempty"`
	FollowUpDays    *int                         `json:"follow_up_days,omitempty"`
	NoReplyDays     *int                         `json:"no_reply_days,omitempty"`
	Plan            *DomainPreferenceChangesPlan `json:"plan,omitempty"`
	TrashDays       *int                         `json:"trash_days,omitempty"`
}

DomainPreferenceChanges defines model for domain.PreferenceChanges.

type DomainPreferenceChangesPlan added in v0.2.0

type DomainPreferenceChangesPlan string

DomainPreferenceChangesPlan defines model for DomainPreferenceChanges.Plan.

const (
	DomainPreferenceChangesPlanBase DomainPreferenceChangesPlan = "base"
	DomainPreferenceChangesPlanPro  DomainPreferenceChangesPlan = "pro"
)

Defines values for DomainPreferenceChangesPlan.

func (DomainPreferenceChangesPlan) Valid added in v0.2.0

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

type DomainPreferences added in v0.2.0

type DomainPreferences struct {
	DefaultCountry string `json:"default_country"`

	// DefaultLocation DefaultLocation and DefaultCountry fill a new application of the web app; both may be empty.
	DefaultLocation string `json:"default_location"`

	// FollowUpDays FollowUpDays is how long an application waits without news before it is to follow up.
	FollowUpDays int `json:"follow_up_days"`

	// NoReplyDays NoReplyDays is how long a waiting application stays without news (since its last follow-up, status change or
	// interview, else the day it applied) before the server moves it to no_reply; 0 never does.
	NoReplyDays int                   `json:"no_reply_days"`
	Plan        DomainPreferencesPlan `json:"plan"`

	// TrashDays TrashDays is how long a deleted application can be restored, before it is gone with its history.
	TrashDays int `json:"trash_days"`
}

DomainPreferences defines model for domain.Preferences.

type DomainPreferencesPlan added in v0.2.0

type DomainPreferencesPlan string

DomainPreferencesPlan defines model for DomainPreferences.Plan.

const (
	DomainPreferencesPlanBase DomainPreferencesPlan = "base"
	DomainPreferencesPlanPro  DomainPreferencesPlan = "pro"
)

Defines values for DomainPreferencesPlan.

func (DomainPreferencesPlan) Valid added in v0.2.0

func (e DomainPreferencesPlan) Valid() bool

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

type DomainStatus

type DomainStatus string

DomainStatus defines model for domain.Status.

const (
	StatusApplied   DomainStatus = "applied"
	StatusInterview DomainStatus = "interview"
	StatusNoReply   DomainStatus = "no_reply"
	StatusOffer     DomainStatus = "offer"
	StatusRejected  DomainStatus = "rejected"
	StatusResponded DomainStatus = "responded"
)

Defines values for DomainStatus.

func (DomainStatus) Valid

func (e DomainStatus) Valid() bool

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

type DomainStatusChange added in v0.2.0

type DomainStatusChange struct {
	ApplicationId string `json:"application_id"`
	At            string `json:"at"`

	// Company Company is read from the application, to tell the changes apart without reading the applications.
	Company *string `json:"company,omitempty"`

	// From From is the status before the change, empty when the application was created with Status.
	From   DomainStatus `json:"from"`
	Status DomainStatus `json:"status"`
}

DomainStatusChange defines model for domain.StatusChange.

type DomainToken

type DomainToken struct {
	CreatedAt string `json:"created_at"`

	// ExpiresAt no limit when absent
	ExpiresAt *string         `json:"expires_at,omitempty"`
	Id        string          `json:"id"`
	Kind      DomainTokenKind `json:"kind"`

	// LastUsedAt never used when absent
	LastUsedAt *string `json:"last_used_at,omitempty"`
	Name       string  `json:"name"`
	ReadOnly   bool    `json:"read_only"`
}

DomainToken defines model for domain.Token.

type DomainTokenKind

type DomainTokenKind string

DomainTokenKind defines model for domain.TokenKind.

const (
	TokenAPI     DomainTokenKind = "api"
	TokenOAuth   DomainTokenKind = "oauth"
	TokenSession DomainTokenKind = "session"
)

Defines values for DomainTokenKind.

func (DomainTokenKind) Valid

func (e DomainTokenKind) Valid() bool

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

type ForgetapplicationsInput added in v0.4.0

type ForgetapplicationsInput struct {
	// All All empties the trash; without it, ids are required.
	All *bool     `json:"all,omitempty"`
	Ids *[]string `json:"ids,omitempty"`
}

ForgetapplicationsInput defines model for forgetapplications.Input.

type GetApiApplicationsDeletedResponse added in v0.4.0

type GetApiApplicationsDeletedResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *[]DomainDeletedApplication
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *RespondFailure
}

func ParseGetApiApplicationsDeletedResponse added in v0.4.0

func ParseGetApiApplicationsDeletedResponse(rsp *http.Response) (*GetApiApplicationsDeletedResponse, error)

ParseGetApiApplicationsDeletedResponse parses an HTTP response from a GetApiApplicationsDeletedWithResponse call

func (GetApiApplicationsDeletedResponse) ContentType added in v0.4.0

func (r GetApiApplicationsDeletedResponse) ContentType() string

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

func (GetApiApplicationsDeletedResponse) GetBody added in v0.4.0

GetBody returns the raw response body bytes

func (GetApiApplicationsDeletedResponse) GetJSON200 added in v0.4.0

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

func (GetApiApplicationsDeletedResponse) GetJSON401 added in v0.4.0

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

func (GetApiApplicationsDeletedResponse) Status added in v0.4.0

Status returns HTTPResponse.Status

func (GetApiApplicationsDeletedResponse) StatusCode added in v0.4.0

func (r GetApiApplicationsDeletedResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetApiApplicationsParams

type GetApiApplicationsParams struct {
	// Ids Applications by id, comma separated or repeated
	Ids *[]string `form:"ids,omitempty" json:"ids,omitempty"`

	// Status Any of these statuses
	Status *[]GetApiApplicationsParamsStatus `form:"status,omitempty" json:"status,omitempty"`

	// Source Source: spontaneous, job_post, recruiter or a name given by the user
	Source *string `form:"source,omitempty" json:"source,omitempty"`

	// Location This city, whatever the case
	Location *string `form:"location,omitempty" json:"location,omitempty"`

	// Q Text in company, address, website, source, contact or comment
	Q *string `form:"q,omitempty" json:"q,omitempty"`

	// AppliedBefore applied_at < this day (2026-01-31)
	AppliedBefore *string `form:"applied_before,omitempty" json:"applied_before,omitempty"`

	// AppliedAfter applied_at > this day (2026-01-31)
	AppliedAfter *string `form:"applied_after,omitempty" json:"applied_after,omitempty"`

	// UntouchedSince Not updated since this day (2026-01-31)
	UntouchedSince *string `form:"untouched_since,omitempty" json:"untouched_since,omitempty"`

	// Fields Columns returned, all when empty; id always comes
	Fields *[]string `form:"fields,omitempty" json:"fields,omitempty"`

	// MaxChars Cut each comment to this many characters (truncated: true)
	MaxChars *int `form:"max_chars,omitempty" json:"max_chars,omitempty"`

	// Sort applied_at, company, location, source, status, rating, followed_up_at, created_at, updated_at; - first to reverse; -applied_at by default
	Sort *string `form:"sort,omitempty" json:"sort,omitempty"`

	// Limit Most applications returned, all when 0
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

	// Offset Applications skipped
	Offset *int `form:"offset,omitempty" json:"offset,omitempty"`

	// CountOnly No application, X-Total-Count only
	CountOnly *bool `form:"count_only,omitempty" json:"count_only,omitempty"`
}

GetApiApplicationsParams defines parameters for GetApiApplications.

type GetApiApplicationsParamsStatus

type GetApiApplicationsParamsStatus string

GetApiApplicationsParamsStatus defines parameters for GetApiApplications.

const (
	Applied   GetApiApplicationsParamsStatus = "applied"
	Interview GetApiApplicationsParamsStatus = "interview"
	NoReply   GetApiApplicationsParamsStatus = "no_reply"
	Offer     GetApiApplicationsParamsStatus = "offer"
	Rejected  GetApiApplicationsParamsStatus = "rejected"
	Responded GetApiApplicationsParamsStatus = "responded"
)

Defines values for GetApiApplicationsParamsStatus.

func (GetApiApplicationsParamsStatus) Valid

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

type GetApiApplicationsResponse

type GetApiApplicationsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *[]DomainApplication
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *RespondFailure
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *RespondFailure
	// Headers200 the parsed response headers for an HTTP 200 response
	Headers200 *GetApiApplicationsResponse200Headers
}

func ParseGetApiApplicationsResponse

func ParseGetApiApplicationsResponse(rsp *http.Response) (*GetApiApplicationsResponse, error)

ParseGetApiApplicationsResponse parses an HTTP response from a GetApiApplicationsWithResponse call

func (GetApiApplicationsResponse) ContentType

func (r GetApiApplicationsResponse) ContentType() string

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

func (GetApiApplicationsResponse) GetBody

func (r GetApiApplicationsResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetApiApplicationsResponse) GetJSON200

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

func (GetApiApplicationsResponse) GetJSON400

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

func (GetApiApplicationsResponse) GetJSON401

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

func (GetApiApplicationsResponse) Status

Status returns HTTPResponse.Status

func (GetApiApplicationsResponse) StatusCode

func (r GetApiApplicationsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetApiApplicationsResponse200Headers

type GetApiApplicationsResponse200Headers struct {
	XTotalCount *int
}

GetApiApplicationsResponse200Headers the declared response headers of an HTTP 200 response for GetApiApplications

type GetApiExportResponse added in v0.5.0

type GetApiExportResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *DomainBackup
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *RespondFailure
}

func ParseGetApiExportResponse added in v0.5.0

func ParseGetApiExportResponse(rsp *http.Response) (*GetApiExportResponse, error)

ParseGetApiExportResponse parses an HTTP response from a GetApiExportWithResponse call

func (GetApiExportResponse) ContentType added in v0.5.0

func (r GetApiExportResponse) ContentType() string

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

func (GetApiExportResponse) GetBody added in v0.5.0

func (r GetApiExportResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetApiExportResponse) GetJSON200 added in v0.5.0

func (r GetApiExportResponse) GetJSON200() *DomainBackup

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

func (GetApiExportResponse) GetJSON401 added in v0.5.0

func (r GetApiExportResponse) GetJSON401() *RespondFailure

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

func (GetApiExportResponse) Status added in v0.5.0

func (r GetApiExportResponse) Status() string

Status returns HTTPResponse.Status

func (GetApiExportResponse) StatusCode added in v0.5.0

func (r GetApiExportResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetApiMeResponse

type GetApiMeResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *LoginMeResult
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *RespondFailure
}

func ParseGetApiMeResponse

func ParseGetApiMeResponse(rsp *http.Response) (*GetApiMeResponse, error)

ParseGetApiMeResponse parses an HTTP response from a GetApiMeWithResponse call

func (GetApiMeResponse) ContentType

func (r GetApiMeResponse) ContentType() string

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

func (GetApiMeResponse) GetBody

func (r GetApiMeResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetApiMeResponse) GetJSON200

func (r GetApiMeResponse) GetJSON200() *LoginMeResult

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

func (GetApiMeResponse) GetJSON401

func (r GetApiMeResponse) GetJSON401() *RespondFailure

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

func (GetApiMeResponse) Status

func (r GetApiMeResponse) Status() string

Status returns HTTPResponse.Status

func (GetApiMeResponse) StatusCode

func (r GetApiMeResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetApiPreferencesResponse added in v0.2.0

type GetApiPreferencesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *DomainPreferences
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *RespondFailure
}

func ParseGetApiPreferencesResponse added in v0.2.0

func ParseGetApiPreferencesResponse(rsp *http.Response) (*GetApiPreferencesResponse, error)

ParseGetApiPreferencesResponse parses an HTTP response from a GetApiPreferencesWithResponse call

func (GetApiPreferencesResponse) ContentType added in v0.2.0

func (r GetApiPreferencesResponse) ContentType() string

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

func (GetApiPreferencesResponse) GetBody added in v0.2.0

func (r GetApiPreferencesResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetApiPreferencesResponse) GetJSON200 added in v0.2.0

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

func (GetApiPreferencesResponse) GetJSON401 added in v0.2.0

func (r GetApiPreferencesResponse) GetJSON401() *RespondFailure

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

func (GetApiPreferencesResponse) Status added in v0.2.0

func (r GetApiPreferencesResponse) Status() string

Status returns HTTPResponse.Status

func (GetApiPreferencesResponse) StatusCode added in v0.2.0

func (r GetApiPreferencesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetApiSourcesResponse added in v0.2.0

type GetApiSourcesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *[]ListsourcesSource
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *RespondFailure
}

func ParseGetApiSourcesResponse added in v0.2.0

func ParseGetApiSourcesResponse(rsp *http.Response) (*GetApiSourcesResponse, error)

ParseGetApiSourcesResponse parses an HTTP response from a GetApiSourcesWithResponse call

func (GetApiSourcesResponse) ContentType added in v0.2.0

func (r GetApiSourcesResponse) ContentType() string

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

func (GetApiSourcesResponse) GetBody added in v0.2.0

func (r GetApiSourcesResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetApiSourcesResponse) GetJSON200 added in v0.2.0

func (r GetApiSourcesResponse) GetJSON200() *[]ListsourcesSource

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

func (GetApiSourcesResponse) GetJSON401 added in v0.2.0

func (r GetApiSourcesResponse) GetJSON401() *RespondFailure

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

func (GetApiSourcesResponse) Status added in v0.2.0

func (r GetApiSourcesResponse) Status() string

Status returns HTTPResponse.Status

func (GetApiSourcesResponse) StatusCode added in v0.2.0

func (r GetApiSourcesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetApiStatsParams added in v0.3.0

type GetApiStatsParams struct {
	// Source Source: spontaneous, job_post, recruiter or a name given by the user, any case
	Source *string `form:"source,omitempty" json:"source,omitempty"`

	// AppliedBefore applied_at < this day (2026-01-31)
	AppliedBefore *string `form:"applied_before,omitempty" json:"applied_before,omitempty"`

	// AppliedAfter applied_at > this day (2026-01-31)
	AppliedAfter *string `form:"applied_after,omitempty" json:"applied_after,omitempty"`
}

GetApiStatsParams defines parameters for GetApiStats.

type GetApiStatsResponse

type GetApiStatsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *ReadstatsStats
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *RespondFailure
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *RespondFailure
}

func ParseGetApiStatsResponse

func ParseGetApiStatsResponse(rsp *http.Response) (*GetApiStatsResponse, error)

ParseGetApiStatsResponse parses an HTTP response from a GetApiStatsWithResponse call

func (GetApiStatsResponse) ContentType

func (r GetApiStatsResponse) ContentType() string

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

func (GetApiStatsResponse) GetBody

func (r GetApiStatsResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetApiStatsResponse) GetJSON200

func (r GetApiStatsResponse) GetJSON200() *ReadstatsStats

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

func (GetApiStatsResponse) GetJSON400 added in v0.3.0

func (r GetApiStatsResponse) GetJSON400() *RespondFailure

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

func (GetApiStatsResponse) GetJSON401

func (r GetApiStatsResponse) GetJSON401() *RespondFailure

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

func (GetApiStatsResponse) Status

func (r GetApiStatsResponse) Status() string

Status returns HTTPResponse.Status

func (GetApiStatsResponse) StatusCode

func (r GetApiStatsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetApiStatusChangesParams added in v0.2.0

type GetApiStatusChangesParams struct {
	// Ids Of these applications, comma separated or repeated
	Ids *[]string `form:"ids,omitempty" json:"ids,omitempty"`

	// Since Reached on this day or after (2026-01-31)
	Since *string `form:"since,omitempty" json:"since,omitempty"`
}

GetApiStatusChangesParams defines parameters for GetApiStatusChanges.

type GetApiStatusChangesResponse added in v0.2.0

type GetApiStatusChangesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *[]DomainStatusChange
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *RespondFailure
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *RespondFailure
}

func ParseGetApiStatusChangesResponse added in v0.2.0

func ParseGetApiStatusChangesResponse(rsp *http.Response) (*GetApiStatusChangesResponse, error)

ParseGetApiStatusChangesResponse parses an HTTP response from a GetApiStatusChangesWithResponse call

func (GetApiStatusChangesResponse) ContentType added in v0.2.0

func (r GetApiStatusChangesResponse) ContentType() string

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

func (GetApiStatusChangesResponse) GetBody added in v0.2.0

func (r GetApiStatusChangesResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetApiStatusChangesResponse) GetJSON200 added in v0.2.0

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

func (GetApiStatusChangesResponse) GetJSON400 added in v0.2.0

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

func (GetApiStatusChangesResponse) GetJSON401 added in v0.2.0

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

func (GetApiStatusChangesResponse) Status added in v0.2.0

Status returns HTTPResponse.Status

func (GetApiStatusChangesResponse) StatusCode added in v0.2.0

func (r GetApiStatusChangesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetApiTokensResponse

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

func ParseGetApiTokensResponse

func ParseGetApiTokensResponse(rsp *http.Response) (*GetApiTokensResponse, error)

ParseGetApiTokensResponse parses an HTTP response from a GetApiTokensWithResponse call

func (GetApiTokensResponse) ContentType

func (r GetApiTokensResponse) ContentType() string

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

func (GetApiTokensResponse) GetBody

func (r GetApiTokensResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetApiTokensResponse) GetJSON200

func (r GetApiTokensResponse) GetJSON200() *[]DomainToken

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

func (GetApiTokensResponse) GetJSON401

func (r GetApiTokensResponse) GetJSON401() *RespondFailure

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

func (GetApiTokensResponse) GetJSON403

func (r GetApiTokensResponse) GetJSON403() *RespondFailure

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

func (GetApiTokensResponse) Status

func (r GetApiTokensResponse) Status() string

Status returns HTTPResponse.Status

func (GetApiTokensResponse) StatusCode

func (r GetApiTokensResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

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

Doer performs HTTP requests.

The standard http.Client implements this interface.

type ImportdataResult added in v0.5.0

type ImportdataResult struct {
	Added   int                   `json:"added"`
	Deleted int                   `json:"deleted"`
	Failed  *[]DomainBatchFailure `json:"failed,omitempty"`
	Skipped int                   `json:"skipped"`
}

ImportdataResult defines model for importdata.Result.

type ListsourcesSource added in v0.2.0

type ListsourcesSource struct {
	Count  int    `json:"count"`
	Source string `json:"source"`
}

ListsourcesSource defines model for listsources.Source.

type LoginMeResult

type LoginMeResult struct {
	Kind     DomainTokenKind `json:"kind"`
	Name     *string         `json:"name,omitempty"`
	ReadOnly bool            `json:"read_only"`
	Version  string          `json:"version"`
}

LoginMeResult defines model for login.MeResult.

type PatchApiApplicationsJSONRequestBody

type PatchApiApplicationsJSONRequestBody = UpdateapplicationsInput

PatchApiApplicationsJSONRequestBody defines body for PatchApiApplications for application/json ContentType.

type PatchApiApplicationsResponse

type PatchApiApplicationsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *DomainBatchResult
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *RespondFailure
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *RespondFailure
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *RespondFailure
}

func ParsePatchApiApplicationsResponse

func ParsePatchApiApplicationsResponse(rsp *http.Response) (*PatchApiApplicationsResponse, error)

ParsePatchApiApplicationsResponse parses an HTTP response from a PatchApiApplicationsWithResponse call

func (PatchApiApplicationsResponse) ContentType

func (r PatchApiApplicationsResponse) ContentType() string

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

func (PatchApiApplicationsResponse) GetBody

func (r PatchApiApplicationsResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (PatchApiApplicationsResponse) GetJSON200

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

func (PatchApiApplicationsResponse) GetJSON400

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

func (PatchApiApplicationsResponse) GetJSON401

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

func (PatchApiApplicationsResponse) GetJSON403

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

func (PatchApiApplicationsResponse) Status

Status returns HTTPResponse.Status

func (PatchApiApplicationsResponse) StatusCode

func (r PatchApiApplicationsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PatchApiPreferencesJSONRequestBody added in v0.2.0

type PatchApiPreferencesJSONRequestBody = DomainPreferenceChanges

PatchApiPreferencesJSONRequestBody defines body for PatchApiPreferences for application/json ContentType.

type PatchApiPreferencesResponse added in v0.2.0

type PatchApiPreferencesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *DomainPreferences
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *RespondFailure
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *RespondFailure
}

func ParsePatchApiPreferencesResponse added in v0.2.0

func ParsePatchApiPreferencesResponse(rsp *http.Response) (*PatchApiPreferencesResponse, error)

ParsePatchApiPreferencesResponse parses an HTTP response from a PatchApiPreferencesWithResponse call

func (PatchApiPreferencesResponse) ContentType added in v0.2.0

func (r PatchApiPreferencesResponse) ContentType() string

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

func (PatchApiPreferencesResponse) GetBody added in v0.2.0

func (r PatchApiPreferencesResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (PatchApiPreferencesResponse) GetJSON200 added in v0.2.0

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

func (PatchApiPreferencesResponse) GetJSON400 added in v0.2.0

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

func (PatchApiPreferencesResponse) GetJSON401 added in v0.2.0

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

func (PatchApiPreferencesResponse) Status added in v0.2.0

Status returns HTTPResponse.Status

func (PatchApiPreferencesResponse) StatusCode added in v0.2.0

func (r PatchApiPreferencesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostApiApplicationsJSONBody

type PostApiApplicationsJSONBody = []DomainNewApplication

PostApiApplicationsJSONBody defines parameters for PostApiApplications.

type PostApiApplicationsJSONRequestBody

type PostApiApplicationsJSONRequestBody = PostApiApplicationsJSONBody

PostApiApplicationsJSONRequestBody defines body for PostApiApplications for application/json ContentType.

type PostApiApplicationsResponse

type PostApiApplicationsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *DomainBatchResult
	// JSON201 the response for an HTTP 201 `application/json` response
	JSON201 *DomainBatchResult
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *RespondFailure
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *RespondFailure
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *RespondFailure
}

func ParsePostApiApplicationsResponse

func ParsePostApiApplicationsResponse(rsp *http.Response) (*PostApiApplicationsResponse, error)

ParsePostApiApplicationsResponse parses an HTTP response from a PostApiApplicationsWithResponse call

func (PostApiApplicationsResponse) ContentType

func (r PostApiApplicationsResponse) ContentType() string

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

func (PostApiApplicationsResponse) GetBody

func (r PostApiApplicationsResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (PostApiApplicationsResponse) GetJSON200

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

func (PostApiApplicationsResponse) GetJSON201

GetJSON201 returns the response for an HTTP 201 `application/json` response

func (PostApiApplicationsResponse) GetJSON400

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

func (PostApiApplicationsResponse) GetJSON401

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

func (PostApiApplicationsResponse) GetJSON403

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

func (PostApiApplicationsResponse) Status

Status returns HTTPResponse.Status

func (PostApiApplicationsResponse) StatusCode

func (r PostApiApplicationsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostApiApplicationsRestoreJSONRequestBody added in v0.4.0

type PostApiApplicationsRestoreJSONRequestBody = RestoreapplicationsInput

PostApiApplicationsRestoreJSONRequestBody defines body for PostApiApplicationsRestore for application/json ContentType.

type PostApiApplicationsRestoreResponse added in v0.4.0

type PostApiApplicationsRestoreResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *DomainBatchResult
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *RespondFailure
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *RespondFailure
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *RespondFailure
}

func ParsePostApiApplicationsRestoreResponse added in v0.4.0

func ParsePostApiApplicationsRestoreResponse(rsp *http.Response) (*PostApiApplicationsRestoreResponse, error)

ParsePostApiApplicationsRestoreResponse parses an HTTP response from a PostApiApplicationsRestoreWithResponse call

func (PostApiApplicationsRestoreResponse) ContentType added in v0.4.0

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

func (PostApiApplicationsRestoreResponse) GetBody added in v0.4.0

GetBody returns the raw response body bytes

func (PostApiApplicationsRestoreResponse) GetJSON200 added in v0.4.0

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

func (PostApiApplicationsRestoreResponse) GetJSON400 added in v0.4.0

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

func (PostApiApplicationsRestoreResponse) GetJSON401 added in v0.4.0

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

func (PostApiApplicationsRestoreResponse) GetJSON403 added in v0.4.0

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

func (PostApiApplicationsRestoreResponse) Status added in v0.4.0

Status returns HTTPResponse.Status

func (PostApiApplicationsRestoreResponse) StatusCode added in v0.4.0

func (r PostApiApplicationsRestoreResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostApiImportJSONRequestBody added in v0.5.0

type PostApiImportJSONRequestBody = DomainBackup

PostApiImportJSONRequestBody defines body for PostApiImport for application/json ContentType.

type PostApiImportResponse added in v0.5.0

type PostApiImportResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *ImportdataResult
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *RespondFailure
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *RespondFailure
}

func ParsePostApiImportResponse added in v0.5.0

func ParsePostApiImportResponse(rsp *http.Response) (*PostApiImportResponse, error)

ParsePostApiImportResponse parses an HTTP response from a PostApiImportWithResponse call

func (PostApiImportResponse) ContentType added in v0.5.0

func (r PostApiImportResponse) ContentType() string

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

func (PostApiImportResponse) GetBody added in v0.5.0

func (r PostApiImportResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (PostApiImportResponse) GetJSON200 added in v0.5.0

func (r PostApiImportResponse) GetJSON200() *ImportdataResult

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

func (PostApiImportResponse) GetJSON400 added in v0.5.0

func (r PostApiImportResponse) GetJSON400() *RespondFailure

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

func (PostApiImportResponse) GetJSON401 added in v0.5.0

func (r PostApiImportResponse) GetJSON401() *RespondFailure

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

func (PostApiImportResponse) Status added in v0.5.0

func (r PostApiImportResponse) Status() string

Status returns HTTPResponse.Status

func (PostApiImportResponse) StatusCode added in v0.5.0

func (r PostApiImportResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostApiLoginJSONRequestBody

type PostApiLoginJSONRequestBody = CreatesessionInput

PostApiLoginJSONRequestBody defines body for PostApiLogin for application/json ContentType.

type PostApiLoginResponse

type PostApiLoginResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *CreatesessionResult
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *RespondFailure
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *RespondFailure
	// JSON429 the response for an HTTP 429 `application/json` response
	JSON429 *RespondFailure
}

func ParsePostApiLoginResponse

func ParsePostApiLoginResponse(rsp *http.Response) (*PostApiLoginResponse, error)

ParsePostApiLoginResponse parses an HTTP response from a PostApiLoginWithResponse call

func (PostApiLoginResponse) ContentType

func (r PostApiLoginResponse) ContentType() string

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

func (PostApiLoginResponse) GetBody

func (r PostApiLoginResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (PostApiLoginResponse) GetJSON200

func (r PostApiLoginResponse) GetJSON200() *CreatesessionResult

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

func (PostApiLoginResponse) GetJSON400

func (r PostApiLoginResponse) GetJSON400() *RespondFailure

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

func (PostApiLoginResponse) GetJSON401

func (r PostApiLoginResponse) GetJSON401() *RespondFailure

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

func (PostApiLoginResponse) GetJSON429

func (r PostApiLoginResponse) GetJSON429() *RespondFailure

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

func (PostApiLoginResponse) Status

func (r PostApiLoginResponse) Status() string

Status returns HTTPResponse.Status

func (PostApiLoginResponse) StatusCode

func (r PostApiLoginResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostApiLogoutResponse

type PostApiLogoutResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *RespondFailure
}

func ParsePostApiLogoutResponse

func ParsePostApiLogoutResponse(rsp *http.Response) (*PostApiLogoutResponse, error)

ParsePostApiLogoutResponse parses an HTTP response from a PostApiLogoutWithResponse call

func (PostApiLogoutResponse) ContentType

func (r PostApiLogoutResponse) ContentType() string

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

func (PostApiLogoutResponse) GetBody

func (r PostApiLogoutResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (PostApiLogoutResponse) GetJSON401

func (r PostApiLogoutResponse) GetJSON401() *RespondFailure

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

func (PostApiLogoutResponse) Status

func (r PostApiLogoutResponse) Status() string

Status returns HTTPResponse.Status

func (PostApiLogoutResponse) StatusCode

func (r PostApiLogoutResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostApiTokensJSONRequestBody

type PostApiTokensJSONRequestBody = CreateapitokenInput

PostApiTokensJSONRequestBody defines body for PostApiTokens for application/json ContentType.

type PostApiTokensResponse

type PostApiTokensResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON201 the response for an HTTP 201 `application/json` response
	JSON201 *CreateapitokenResult
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *RespondFailure
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *RespondFailure
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *RespondFailure
}

func ParsePostApiTokensResponse

func ParsePostApiTokensResponse(rsp *http.Response) (*PostApiTokensResponse, error)

ParsePostApiTokensResponse parses an HTTP response from a PostApiTokensWithResponse call

func (PostApiTokensResponse) ContentType

func (r PostApiTokensResponse) ContentType() string

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

func (PostApiTokensResponse) GetBody

func (r PostApiTokensResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (PostApiTokensResponse) GetJSON201

GetJSON201 returns the response for an HTTP 201 `application/json` response

func (PostApiTokensResponse) GetJSON400

func (r PostApiTokensResponse) GetJSON400() *RespondFailure

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

func (PostApiTokensResponse) GetJSON401

func (r PostApiTokensResponse) GetJSON401() *RespondFailure

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

func (PostApiTokensResponse) GetJSON403

func (r PostApiTokensResponse) GetJSON403() *RespondFailure

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

func (PostApiTokensResponse) Status

func (r PostApiTokensResponse) Status() string

Status returns HTTPResponse.Status

func (PostApiTokensResponse) StatusCode

func (r PostApiTokensResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PurgeapplicationsResult added in v0.2.0

type PurgeapplicationsResult struct {
	Count int `json:"count"`
}

PurgeapplicationsResult defines model for purgeapplications.Result.

type ReadstatsStats

type ReadstatsStats struct {
	// BySource BySource has the sources in use: an agent reuses their names rather than make a near double.
	BySource map[string]int `json:"by_source"`

	// ByStatus ByStatus has every status, 0 included.
	ByStatus map[string]int `json:"by_status"`

	// ResponseRate ResponseRate is the share of applications that got past applied, 0 to 1; left out without applications.
	ResponseRate *float32 `json:"response_rate,omitempty"`

	// ResponseRateBySource ResponseRateBySource is ResponseRate for each source of BySource.
	ResponseRateBySource map[string]float32 `json:"response_rate_by_source"`
	Total                int                `json:"total"`
}

ReadstatsStats defines model for readstats.Stats.

type RequestEditorFn

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

RequestEditorFn is the function signature for the RequestEditor callback function

type RespondFailure

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

RespondFailure defines model for respond.Failure.

type RestoreapplicationsInput added in v0.4.0

type RestoreapplicationsInput struct {
	Ids []string `json:"ids"`
}

RestoreapplicationsInput defines model for restoreapplications.Input.

type Session

type Session struct {
	URL   string `json:"url"`
	Token string `json:"token"`
}

Session is the server and the session token of callback login, or of CALLBACK_URL and CALLBACK_SESSION.

func Read

func Read() Session

Read takes CALLBACK_URL and CALLBACK_SESSION first, each on its own, for an agent that cannot run callback login where it runs, then the file; what is missing stays empty.

func (Session) Client

func (s Session) Client() (*ClientWithResponses, error)

Client talks to the session's server with its token.

func (Session) Save

func (s Session) Save() error

Save writes the session to SessionFile, readable by the user only.

type UpdateapplicationsInput

type UpdateapplicationsInput struct {
	// DryRun DryRun writes nothing: the result is what the call would write.
	DryRun *bool                  `json:"dry_run,omitempty"`
	Ops    []UpdateapplicationsOp `json:"ops"`

	// Summary Summary leaves the ids out of the result: the counts and failures only.
	Summary *bool `json:"summary,omitempty"`
}

UpdateapplicationsInput defines model for updateapplications.Input.

type UpdateapplicationsOp

type UpdateapplicationsOp struct {
	AppliedAfter *string `json:"applied_after,omitempty"`

	// AppliedBefore AppliedBefore and AppliedAfter are strict: applied_at < before, applied_at > after.
	AppliedBefore *string `json:"applied_before,omitempty"`

	// Ids IDs are the applications by id.
	Ids *[]string `json:"ids,omitempty"`

	// Location Location is this city, whatever the case.
	Location *string `json:"location,omitempty"`

	// Q Q is text found in the company, the address, website, source_detail, contact or comment, case-insensitive.
	Q      *string       `json:"q,omitempty"`
	Set    DomainChanges `json:"set"`
	Source *string       `json:"source,omitempty"`

	// Status Status is any of these statuses.
	Status *[]DomainStatus `json:"status,omitempty"`

	// UntouchedSince UntouchedSince is the applications without news since this day: no status change, follow-up nor interview.
	UntouchedSince *string `json:"untouched_since,omitempty"`
}

UpdateapplicationsOp defines model for updateapplications.Op.

Directories

Path Synopsis
Package apitest serves the real API to the tests of the CLI commands and the MCP, which are clients of it.
Package apitest serves the real API to the tests of the CLI commands and the MCP, which are clients of it.

Jump to

Keyboard shortcuts

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