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 ¶
- Variables
- func Decode[T any](response *http.Response, err error) (T, error)
- func Fail(response *http.Response, body []byte) error
- func NewDeleteApiApplicationsRequest(server string, body DeleteApiApplicationsJSONRequestBody) (*http.Request, error)
- func NewDeleteApiApplicationsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewDeleteApiTokensIdRequest(server string, id string) (*http.Request, error)
- func NewGetApiApplicationsRequest(server string, params *GetApiApplicationsParams) (*http.Request, error)
- func NewGetApiMeRequest(server string) (*http.Request, error)
- func NewGetApiStatsRequest(server string) (*http.Request, error)
- func NewGetApiTokensRequest(server string) (*http.Request, error)
- func NewPatchApiApplicationsRequest(server string, body PatchApiApplicationsJSONRequestBody) (*http.Request, error)
- func NewPatchApiApplicationsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewPostApiApplicationsRequest(server string, body PostApiApplicationsJSONRequestBody) (*http.Request, error)
- func NewPostApiApplicationsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewPostApiLoginRequest(server string, body PostApiLoginJSONRequestBody) (*http.Request, error)
- func NewPostApiLoginRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewPostApiLogoutRequest(server string) (*http.Request, error)
- func NewPostApiTokensRequest(server string, body PostApiTokensJSONRequestBody) (*http.Request, error)
- func NewPostApiTokensRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func Paged[T any](response *http.Response, err error) (T, int, error)
- func SessionFile() (string, error)
- type Client
- func (c *Client) DeleteApiApplications(ctx context.Context, body DeleteApiApplicationsJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) DeleteApiApplicationsWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) DeleteApiTokensId(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetApiApplications(ctx context.Context, params *GetApiApplicationsParams, ...) (*http.Response, error)
- func (c *Client) GetApiMe(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetApiStats(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetApiTokens(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) PatchApiApplications(ctx context.Context, body PatchApiApplicationsJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) PatchApiApplicationsWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) PostApiApplications(ctx context.Context, body PostApiApplicationsJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) PostApiApplicationsWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) PostApiLogin(ctx context.Context, body PostApiLoginJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) PostApiLoginWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) PostApiLogout(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) PostApiTokens(ctx context.Context, body PostApiTokensJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) PostApiTokensWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) DeleteApiApplicationsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*DeleteApiApplicationsResponse, error)
- func (c *ClientWithResponses) DeleteApiApplicationsWithResponse(ctx context.Context, body DeleteApiApplicationsJSONRequestBody, ...) (*DeleteApiApplicationsResponse, error)
- func (c *ClientWithResponses) DeleteApiTokensIdWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteApiTokensIdResponse, error)
- func (c *ClientWithResponses) GetApiApplicationsWithResponse(ctx context.Context, params *GetApiApplicationsParams, ...) (*GetApiApplicationsResponse, error)
- func (c *ClientWithResponses) GetApiMeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiMeResponse, error)
- func (c *ClientWithResponses) GetApiStatsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiStatsResponse, error)
- func (c *ClientWithResponses) GetApiTokensWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiTokensResponse, error)
- func (c *ClientWithResponses) PatchApiApplicationsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*PatchApiApplicationsResponse, error)
- func (c *ClientWithResponses) PatchApiApplicationsWithResponse(ctx context.Context, body PatchApiApplicationsJSONRequestBody, ...) (*PatchApiApplicationsResponse, error)
- func (c *ClientWithResponses) PostApiApplicationsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*PostApiApplicationsResponse, error)
- func (c *ClientWithResponses) PostApiApplicationsWithResponse(ctx context.Context, body PostApiApplicationsJSONRequestBody, ...) (*PostApiApplicationsResponse, error)
- func (c *ClientWithResponses) PostApiLoginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*PostApiLoginResponse, error)
- func (c *ClientWithResponses) PostApiLoginWithResponse(ctx context.Context, body PostApiLoginJSONRequestBody, ...) (*PostApiLoginResponse, error)
- func (c *ClientWithResponses) PostApiLogoutWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PostApiLogoutResponse, error)
- func (c *ClientWithResponses) PostApiTokensWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*PostApiTokensResponse, error)
- func (c *ClientWithResponses) PostApiTokensWithResponse(ctx context.Context, body PostApiTokensJSONRequestBody, ...) (*PostApiTokensResponse, error)
- type ClientWithResponsesInterface
- type CreateapitokenInput
- type CreateapitokenInputExpiresIn
- type CreateapitokenResult
- type CreatesessionInput
- type CreatesessionResult
- type DeleteApiApplicationsJSONRequestBody
- type DeleteApiApplicationsResponse
- func (r DeleteApiApplicationsResponse) ContentType() string
- func (r DeleteApiApplicationsResponse) GetBody() []byte
- func (r DeleteApiApplicationsResponse) GetJSON200() *DomainBatchResult
- func (r DeleteApiApplicationsResponse) GetJSON400() *RespondFailure
- func (r DeleteApiApplicationsResponse) GetJSON401() *RespondFailure
- func (r DeleteApiApplicationsResponse) GetJSON403() *RespondFailure
- func (r DeleteApiApplicationsResponse) Status() string
- func (r DeleteApiApplicationsResponse) StatusCode() int
- type DeleteApiTokensIdResponse
- func (r DeleteApiTokensIdResponse) ContentType() string
- func (r DeleteApiTokensIdResponse) GetBody() []byte
- func (r DeleteApiTokensIdResponse) GetJSON401() *RespondFailure
- func (r DeleteApiTokensIdResponse) GetJSON403() *RespondFailure
- func (r DeleteApiTokensIdResponse) GetJSON404() *RespondFailure
- func (r DeleteApiTokensIdResponse) Status() string
- func (r DeleteApiTokensIdResponse) StatusCode() int
- type DeleteapplicationsInput
- type DomainApplication
- type DomainBatchFailure
- type DomainBatchResult
- type DomainChanges
- type DomainNewApplication
- type DomainSource
- type DomainStatus
- type DomainToken
- type DomainTokenKind
- type GetApiApplicationsParams
- type GetApiApplicationsParamsSource
- type GetApiApplicationsParamsStatus
- type GetApiApplicationsResponse
- func (r GetApiApplicationsResponse) ContentType() string
- func (r GetApiApplicationsResponse) GetBody() []byte
- func (r GetApiApplicationsResponse) GetJSON200() *[]DomainApplication
- func (r GetApiApplicationsResponse) GetJSON400() *RespondFailure
- func (r GetApiApplicationsResponse) GetJSON401() *RespondFailure
- func (r GetApiApplicationsResponse) Status() string
- func (r GetApiApplicationsResponse) StatusCode() int
- type GetApiApplicationsResponse200Headers
- type GetApiMeResponse
- type GetApiStatsResponse
- func (r GetApiStatsResponse) ContentType() string
- func (r GetApiStatsResponse) GetBody() []byte
- func (r GetApiStatsResponse) GetJSON200() *ReadstatsStats
- func (r GetApiStatsResponse) GetJSON401() *RespondFailure
- func (r GetApiStatsResponse) Status() string
- func (r GetApiStatsResponse) StatusCode() int
- type GetApiTokensResponse
- func (r GetApiTokensResponse) ContentType() string
- func (r GetApiTokensResponse) GetBody() []byte
- func (r GetApiTokensResponse) GetJSON200() *[]DomainToken
- func (r GetApiTokensResponse) GetJSON401() *RespondFailure
- func (r GetApiTokensResponse) GetJSON403() *RespondFailure
- func (r GetApiTokensResponse) Status() string
- func (r GetApiTokensResponse) StatusCode() int
- type HttpRequestDoer
- type LoginMeResult
- type PatchApiApplicationsJSONRequestBody
- type PatchApiApplicationsResponse
- func (r PatchApiApplicationsResponse) ContentType() string
- func (r PatchApiApplicationsResponse) GetBody() []byte
- func (r PatchApiApplicationsResponse) GetJSON200() *DomainBatchResult
- func (r PatchApiApplicationsResponse) GetJSON400() *RespondFailure
- func (r PatchApiApplicationsResponse) GetJSON401() *RespondFailure
- func (r PatchApiApplicationsResponse) GetJSON403() *RespondFailure
- func (r PatchApiApplicationsResponse) Status() string
- func (r PatchApiApplicationsResponse) StatusCode() int
- type PostApiApplicationsJSONBody
- type PostApiApplicationsJSONRequestBody
- type PostApiApplicationsResponse
- func (r PostApiApplicationsResponse) ContentType() string
- func (r PostApiApplicationsResponse) GetBody() []byte
- func (r PostApiApplicationsResponse) GetJSON200() *DomainBatchResult
- func (r PostApiApplicationsResponse) GetJSON201() *DomainBatchResult
- func (r PostApiApplicationsResponse) GetJSON400() *RespondFailure
- func (r PostApiApplicationsResponse) GetJSON401() *RespondFailure
- func (r PostApiApplicationsResponse) GetJSON403() *RespondFailure
- func (r PostApiApplicationsResponse) Status() string
- func (r PostApiApplicationsResponse) StatusCode() int
- type PostApiLoginJSONRequestBody
- type PostApiLoginResponse
- func (r PostApiLoginResponse) ContentType() string
- func (r PostApiLoginResponse) GetBody() []byte
- func (r PostApiLoginResponse) GetJSON200() *CreatesessionResult
- func (r PostApiLoginResponse) GetJSON400() *RespondFailure
- func (r PostApiLoginResponse) GetJSON401() *RespondFailure
- func (r PostApiLoginResponse) GetJSON429() *RespondFailure
- func (r PostApiLoginResponse) Status() string
- func (r PostApiLoginResponse) StatusCode() int
- type PostApiLogoutResponse
- type PostApiTokensJSONRequestBody
- type PostApiTokensResponse
- func (r PostApiTokensResponse) ContentType() string
- func (r PostApiTokensResponse) GetBody() []byte
- func (r PostApiTokensResponse) GetJSON201() *CreateapitokenResult
- func (r PostApiTokensResponse) GetJSON400() *RespondFailure
- func (r PostApiTokensResponse) GetJSON401() *RespondFailure
- func (r PostApiTokensResponse) GetJSON403() *RespondFailure
- func (r PostApiTokensResponse) Status() string
- func (r PostApiTokensResponse) StatusCode() int
- type ReadstatsStats
- type RequestEditorFn
- type RespondFailure
- type Session
- type UpdateapplicationsInput
- type UpdateapplicationsOp
Constants ¶
This section is empty.
Variables ¶
var ( ErrNoSession = errors.New("not logged in: run " + config.Current.Name + " login <url>") ErrTimeout = errors.New("the server did not answer in time") )
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 ¶
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 ¶
Fail is the error of an answer the caller did not expect: the API's message, else the HTTP status.
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 NewDeleteApiTokensIdRequest ¶
NewDeleteApiTokensIdRequest constructs an http.Request for the DeleteApiTokensId method
func NewGetApiApplicationsRequest ¶
func NewGetApiApplicationsRequest(server string, params *GetApiApplicationsParams) (*http.Request, error)
NewGetApiApplicationsRequest constructs an http.Request for the GetApiApplications method
func NewGetApiMeRequest ¶
NewGetApiMeRequest constructs an http.Request for the GetApiMe method
func NewGetApiStatsRequest ¶
NewGetApiStatsRequest constructs an http.Request for the GetApiStats method
func NewGetApiTokensRequest ¶
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 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 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 ¶
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 SessionFile ¶
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) 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) 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) 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) GetApiStats ¶
func (c *Client) GetApiStats(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
GetApiStats Count the applications
Corresponds with GET /api/stats (the `GetApiStats` 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) 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) 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) 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)
// 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)
// GetApiStats Count the applications
//
// Corresponds with GET /api/stats (the `GetApiStats` operationId).
GetApiStats(ctx context.Context, 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 ¶
ClientOption allows setting custom parameters during construction
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) 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) 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) 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) 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) GetApiStatsWithResponse ¶
func (c *ClientWithResponses) GetApiStatsWithResponse(ctx context.Context, 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) 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) 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) 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)
// 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)
// 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, reqEditors ...RequestEditorFn) (*GetApiStatsResponse, 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.
const ( N1y CreateapitokenInputExpiresIn = "1y" N30d CreateapitokenInputExpiresIn = "30d" N7d CreateapitokenInputExpiresIn = "7d" N90d CreateapitokenInputExpiresIn = "90d" Never CreateapitokenInputExpiresIn = "never" )
Defines values for CreateapitokenInputExpiresIn.
func (CreateapitokenInputExpiresIn) Valid ¶
func (e CreateapitokenInputExpiresIn) Valid() bool
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 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 ¶
func (r DeleteApiApplicationsResponse) GetJSON200() *DomainBatchResult
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (DeleteApiApplicationsResponse) GetJSON400 ¶
func (r DeleteApiApplicationsResponse) GetJSON400() *RespondFailure
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (DeleteApiApplicationsResponse) GetJSON401 ¶
func (r DeleteApiApplicationsResponse) GetJSON401() *RespondFailure
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (DeleteApiApplicationsResponse) GetJSON403 ¶
func (r DeleteApiApplicationsResponse) GetJSON403() *RespondFailure
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (DeleteApiApplicationsResponse) Status ¶
func (r DeleteApiApplicationsResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteApiApplicationsResponse) StatusCode ¶
func (r DeleteApiApplicationsResponse) 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"`
// Q Q is text found in the company, location, website, source_detail or comment, case-insensitive.
Q *string `json:"q,omitempty"`
Source *DomainSource `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 not updated since this day.
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"`
CreatedAt *string `json:"created_at,omitempty"`
Id string `json:"id"`
Location *string `json:"location,omitempty"`
Rating *int `json:"rating,omitempty"`
Source *DomainSource `json:"source,omitempty"`
SourceDetail *string `json:"source_detail,omitempty"`
Status *DomainStatus `json:"status,omitempty"`
// Truncated Truncated tells that comment was cut at max_chars.
Truncated *bool `json:"truncated,omitempty"`
UpdatedAt *string `json:"updated_at,omitempty"`
Website *string `json:"website,omitempty"`
}
DomainApplication defines model for domain.Application.
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"`
Location *string `json:"location,omitempty"`
Rating *int `json:"rating,omitempty"`
Source *DomainSource `json:"source,omitempty"`
SourceDetail *string `json:"source_detail,omitempty"`
Status *DomainStatus `json:"status,omitempty"`
Website *string `json:"website,omitempty"`
}
DomainChanges defines model for domain.Changes.
type DomainNewApplication ¶
type DomainNewApplication struct {
AppliedAt *string `json:"applied_at,omitempty"`
Comment *string `json:"comment,omitempty"`
Company string `json:"company"`
Location string `json:"location"`
Rating *int `json:"rating,omitempty"`
Source *DomainSource `json:"source,omitempty"`
SourceDetail *string `json:"source_detail,omitempty"`
Status *DomainStatus `json:"status,omitempty"`
Website *string `json:"website,omitempty"`
}
DomainNewApplication defines model for domain.NewApplication.
type DomainSource ¶
type DomainSource string
DomainSource defines model for domain.Source.
const ( SourceJobPost DomainSource = "job_post" SourceRecruiter DomainSource = "recruiter" SourceSpontaneous DomainSource = "spontaneous" )
Defines values for DomainSource.
func (DomainSource) Valid ¶
func (e DomainSource) Valid() bool
Valid indicates whether the value is a known member of the DomainSource enum.
type DomainStatus ¶
type DomainStatus string
DomainStatus defines model for domain.Status.
const ( StatusApplied DomainStatus = "applied" StatusInterview DomainStatus = "interview" 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 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 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
Source *GetApiApplicationsParamsSource `form:"source,omitempty" json:"source,omitempty"`
// Q Text in company, location, website, source_detail 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, source, status, rating, 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 GetApiApplicationsParamsSource ¶
type GetApiApplicationsParamsSource string
GetApiApplicationsParamsSource defines parameters for GetApiApplications.
const ( JobPost GetApiApplicationsParamsSource = "job_post" Recruiter GetApiApplicationsParamsSource = "recruiter" Spontaneous GetApiApplicationsParamsSource = "spontaneous" )
Defines values for GetApiApplicationsParamsSource.
func (GetApiApplicationsParamsSource) Valid ¶
func (e GetApiApplicationsParamsSource) Valid() bool
Valid indicates whether the value is a known member of the GetApiApplicationsParamsSource enum.
type GetApiApplicationsParamsStatus ¶
type GetApiApplicationsParamsStatus string
GetApiApplicationsParamsStatus defines parameters for GetApiApplications.
const ( Applied GetApiApplicationsParamsStatus = "applied" Interview GetApiApplicationsParamsStatus = "interview" Offer GetApiApplicationsParamsStatus = "offer" Rejected GetApiApplicationsParamsStatus = "rejected" Responded GetApiApplicationsParamsStatus = "responded" )
Defines values for GetApiApplicationsParamsStatus.
func (GetApiApplicationsParamsStatus) Valid ¶
func (e GetApiApplicationsParamsStatus) Valid() bool
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 ¶
func (r GetApiApplicationsResponse) GetJSON200() *[]DomainApplication
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetApiApplicationsResponse) GetJSON400 ¶
func (r GetApiApplicationsResponse) GetJSON400() *RespondFailure
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (GetApiApplicationsResponse) GetJSON401 ¶
func (r GetApiApplicationsResponse) GetJSON401() *RespondFailure
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (GetApiApplicationsResponse) Status ¶
func (r GetApiApplicationsResponse) Status() string
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 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 GetApiStatsResponse ¶
type GetApiStatsResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *ReadstatsStats
// 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) 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 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 ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
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 ¶
func (r PatchApiApplicationsResponse) GetJSON200() *DomainBatchResult
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (PatchApiApplicationsResponse) GetJSON400 ¶
func (r PatchApiApplicationsResponse) GetJSON400() *RespondFailure
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (PatchApiApplicationsResponse) GetJSON401 ¶
func (r PatchApiApplicationsResponse) GetJSON401() *RespondFailure
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (PatchApiApplicationsResponse) GetJSON403 ¶
func (r PatchApiApplicationsResponse) GetJSON403() *RespondFailure
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (PatchApiApplicationsResponse) Status ¶
func (r PatchApiApplicationsResponse) Status() string
Status returns HTTPResponse.Status
func (PatchApiApplicationsResponse) StatusCode ¶
func (r PatchApiApplicationsResponse) 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 ¶
func (r PostApiApplicationsResponse) GetJSON200() *DomainBatchResult
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (PostApiApplicationsResponse) GetJSON201 ¶
func (r PostApiApplicationsResponse) GetJSON201() *DomainBatchResult
GetJSON201 returns the response for an HTTP 201 `application/json` response
func (PostApiApplicationsResponse) GetJSON400 ¶
func (r PostApiApplicationsResponse) GetJSON400() *RespondFailure
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (PostApiApplicationsResponse) GetJSON401 ¶
func (r PostApiApplicationsResponse) GetJSON401() *RespondFailure
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (PostApiApplicationsResponse) GetJSON403 ¶
func (r PostApiApplicationsResponse) GetJSON403() *RespondFailure
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (PostApiApplicationsResponse) Status ¶
func (r PostApiApplicationsResponse) Status() string
Status returns HTTPResponse.Status
func (PostApiApplicationsResponse) StatusCode ¶
func (r PostApiApplicationsResponse) 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 ¶
func (r PostApiTokensResponse) GetJSON201() *CreateapitokenResult
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 ReadstatsStats ¶
type ReadstatsStats struct {
// 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.
ResponseRate float32 `json:"response_rate"`
Total int `json:"total"`
}
ReadstatsStats defines model for readstats.Stats.
type RequestEditorFn ¶
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 Session ¶
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.
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"`
// Q Q is text found in the company, location, website, source_detail or comment, case-insensitive.
Q *string `json:"q,omitempty"`
Set DomainChanges `json:"set"`
Source *DomainSource `json:"source,omitempty"`
// Status Status is any of these statuses.
Status *[]DomainStatus `json:"status,omitempty"`
// UntouchedSince UntouchedSince is the applications not updated since this day.
UntouchedSince *string `json:"untouched_since,omitempty"`
}
UpdateapplicationsOp defines model for updateapplications.Op.