client

package
v0.26.7 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

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

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

Index

Constants

View Source
const (
	BearerAuthScopes = "BearerAuth.Scopes"
)

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.

func NewBulkInviteMembersByEmailRequest

func NewBulkInviteMembersByEmailRequest(server string, body BulkInviteMembersByEmailJSONRequestBody) (*http.Request, error)

NewBulkInviteMembersByEmailRequest calls the generic BulkInviteMembersByEmail builder with application/json body

func NewBulkInviteMembersByEmailRequestWithBody

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

NewBulkInviteMembersByEmailRequestWithBody generates requests for BulkInviteMembersByEmail with any type of body

func NewConfirmInvitationRequest

func NewConfirmInvitationRequest(server string, body ConfirmInvitationJSONRequestBody) (*http.Request, error)

NewConfirmInvitationRequest calls the generic ConfirmInvitation builder with application/json body

func NewConfirmInvitationRequestWithBody

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

NewConfirmInvitationRequestWithBody generates requests for ConfirmInvitation with any type of body

func NewCreateAccountRequest

func NewCreateAccountRequest(server string, body CreateAccountJSONRequestBody) (*http.Request, error)

NewCreateAccountRequest calls the generic CreateAccount builder with application/json body

func NewCreateAccountRequestWithBody

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

NewCreateAccountRequestWithBody generates requests for CreateAccount with any type of body

func NewCreateMonitorRequest

func NewCreateMonitorRequest(server string, body CreateMonitorJSONRequestBody) (*http.Request, error)

NewCreateMonitorRequest calls the generic CreateMonitor builder with application/json body

func NewCreateMonitorRequestWithBody

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

NewCreateMonitorRequestWithBody generates requests for CreateMonitor with any type of body

func NewDeleteMonitorRequest

func NewDeleteMonitorRequest(server string, monitorID string) (*http.Request, error)

NewDeleteMonitorRequest generates requests for DeleteMonitor

func NewEditMonitorRequest

func NewEditMonitorRequest(server string, monitorID string, body EditMonitorJSONRequestBody) (*http.Request, error)

NewEditMonitorRequest calls the generic EditMonitor builder with application/json body

func NewEditMonitorRequestWithBody

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

NewEditMonitorRequestWithBody generates requests for EditMonitor with any type of body

func NewGetAllIncidentsRequest

func NewGetAllIncidentsRequest(server string, params *GetAllIncidentsParams) (*http.Request, error)

NewGetAllIncidentsRequest generates requests for GetAllIncidents

func NewGetAllMonitorsRequest

func NewGetAllMonitorsRequest(server string, params *GetAllMonitorsParams) (*http.Request, error)

NewGetAllMonitorsRequest generates requests for GetAllMonitors

func NewGetIncidentByIDRequest

func NewGetIncidentByIDRequest(server string, incidentID string) (*http.Request, error)

NewGetIncidentByIDRequest generates requests for GetIncidentByID

func NewGetMonitorByIDRequest

func NewGetMonitorByIDRequest(server string, monitorID string) (*http.Request, error)

NewGetMonitorByIDRequest generates requests for GetMonitorByID

func NewGetMonitorResponseTimeStatsRequest

func NewGetMonitorResponseTimeStatsRequest(server string, monitorID string, params *GetMonitorResponseTimeStatsParams) (*http.Request, error)

NewGetMonitorResponseTimeStatsRequest generates requests for GetMonitorResponseTimeStats

func NewGetProfileDetailsRequest

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

NewGetProfileDetailsRequest generates requests for GetProfileDetails

func NewLoginRequest

func NewLoginRequest(server string, body LoginJSONRequestBody) (*http.Request, error)

NewLoginRequest calls the generic Login builder with application/json body

func NewLoginRequestWithBody

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

NewLoginRequestWithBody generates requests for Login with any type of body

func NewToggleMonitorPauseRequest

func NewToggleMonitorPauseRequest(server string, monitorID string, body ToggleMonitorPauseJSONRequestBody) (*http.Request, error)

NewToggleMonitorPauseRequest calls the generic ToggleMonitorPause builder with application/json body

func NewToggleMonitorPauseRequestWithBody

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

NewToggleMonitorPauseRequestWithBody generates requests for ToggleMonitorPause with any type of body

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

Types

type BulkInviteMembersByEmail

type BulkInviteMembersByEmail struct {
	Emails []string `json:"emails"`
}

BulkInviteMembersByEmail defines model for BulkInviteMembersByEmail.

type BulkInviteMembersByEmailJSONRequestBody

type BulkInviteMembersByEmailJSONRequestBody = BulkInviteMembersByEmail

BulkInviteMembersByEmailJSONRequestBody defines body for BulkInviteMembersByEmail for application/json ContentType.

type BulkInviteMembersByEmailResponse

type BulkInviteMembersByEmailResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSONDefault  *DefaultError
}

func ParseBulkInviteMembersByEmailResponse

func ParseBulkInviteMembersByEmailResponse(rsp *http.Response) (*BulkInviteMembersByEmailResponse, error)

ParseBulkInviteMembersByEmailResponse parses an HTTP response from a BulkInviteMembersByEmailWithResponse call

func (BulkInviteMembersByEmailResponse) Status

Status returns HTTPResponse.Status

func (BulkInviteMembersByEmailResponse) StatusCode

func (r BulkInviteMembersByEmailResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

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

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

func (*Client) BulkInviteMembersByEmailWithBody

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

func (*Client) ConfirmInvitation

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

func (*Client) ConfirmInvitationWithBody

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

func (*Client) CreateAccount

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

func (*Client) CreateAccountWithBody

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

func (*Client) CreateMonitor

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

func (*Client) CreateMonitorWithBody

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

func (*Client) DeleteMonitor

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

func (*Client) EditMonitor

func (c *Client) EditMonitor(ctx context.Context, monitorID string, body EditMonitorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) EditMonitorWithBody

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

func (*Client) GetAllIncidents

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

func (*Client) GetAllMonitors

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

func (*Client) GetIncidentByID

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

func (*Client) GetMonitorByID

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

func (*Client) GetMonitorResponseTimeStats

func (c *Client) GetMonitorResponseTimeStats(ctx context.Context, monitorID string, params *GetMonitorResponseTimeStatsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetProfileDetails

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

func (*Client) Login

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

func (*Client) LoginWithBody

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

func (*Client) ToggleMonitorPause

func (c *Client) ToggleMonitorPause(ctx context.Context, monitorID string, body ToggleMonitorPauseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ToggleMonitorPauseWithBody

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

type ClientInterface

type ClientInterface interface {
	// BulkInviteMembersByEmailWithBody request with any body
	BulkInviteMembersByEmailWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	BulkInviteMembersByEmail(ctx context.Context, body BulkInviteMembersByEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetProfileDetails request
	GetProfileDetails(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateAccountWithBody request with any body
	CreateAccountWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateAccount(ctx context.Context, body CreateAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ConfirmInvitationWithBody request with any body
	ConfirmInvitationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	ConfirmInvitation(ctx context.Context, body ConfirmInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// LoginWithBody request with any body
	LoginWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	Login(ctx context.Context, body LoginJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetAllIncidents request
	GetAllIncidents(ctx context.Context, params *GetAllIncidentsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetIncidentByID request
	GetIncidentByID(ctx context.Context, incidentID string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetAllMonitors request
	GetAllMonitors(ctx context.Context, params *GetAllMonitorsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateMonitorWithBody request with any body
	CreateMonitorWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateMonitor(ctx context.Context, body CreateMonitorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteMonitor request
	DeleteMonitor(ctx context.Context, monitorID string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetMonitorByID request
	GetMonitorByID(ctx context.Context, monitorID string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ToggleMonitorPauseWithBody request with any body
	ToggleMonitorPauseWithBody(ctx context.Context, monitorID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	ToggleMonitorPause(ctx context.Context, monitorID string, body ToggleMonitorPauseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// EditMonitorWithBody request with any body
	EditMonitorWithBody(ctx context.Context, monitorID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	EditMonitor(ctx context.Context, monitorID string, body EditMonitorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetMonitorResponseTimeStats request
	GetMonitorResponseTimeStats(ctx context.Context, monitorID string, params *GetMonitorResponseTimeStatsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

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

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

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

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

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

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

func (*ClientWithResponses) BulkInviteMembersByEmailWithBodyWithResponse

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

BulkInviteMembersByEmailWithBodyWithResponse request with arbitrary body returning *BulkInviteMembersByEmailResponse

func (*ClientWithResponses) BulkInviteMembersByEmailWithResponse

func (c *ClientWithResponses) BulkInviteMembersByEmailWithResponse(ctx context.Context, body BulkInviteMembersByEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*BulkInviteMembersByEmailResponse, error)

func (*ClientWithResponses) ConfirmInvitationWithBodyWithResponse

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

ConfirmInvitationWithBodyWithResponse request with arbitrary body returning *ConfirmInvitationResponse

func (*ClientWithResponses) ConfirmInvitationWithResponse

func (c *ClientWithResponses) ConfirmInvitationWithResponse(ctx context.Context, body ConfirmInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*ConfirmInvitationResponse, error)

func (*ClientWithResponses) CreateAccountWithBodyWithResponse

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

CreateAccountWithBodyWithResponse request with arbitrary body returning *CreateAccountResponse

func (*ClientWithResponses) CreateAccountWithResponse

func (c *ClientWithResponses) CreateAccountWithResponse(ctx context.Context, body CreateAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAccountResponse, error)

func (*ClientWithResponses) CreateMonitorWithBodyWithResponse

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

CreateMonitorWithBodyWithResponse request with arbitrary body returning *CreateMonitorResponse

func (*ClientWithResponses) CreateMonitorWithResponse

func (c *ClientWithResponses) CreateMonitorWithResponse(ctx context.Context, body CreateMonitorJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateMonitorResponse, error)

func (*ClientWithResponses) DeleteMonitorWithResponse

func (c *ClientWithResponses) DeleteMonitorWithResponse(ctx context.Context, monitorID string, reqEditors ...RequestEditorFn) (*DeleteMonitorResponse, error)

DeleteMonitorWithResponse request returning *DeleteMonitorResponse

func (*ClientWithResponses) EditMonitorWithBodyWithResponse

func (c *ClientWithResponses) EditMonitorWithBodyWithResponse(ctx context.Context, monitorID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EditMonitorResponse, error)

EditMonitorWithBodyWithResponse request with arbitrary body returning *EditMonitorResponse

func (*ClientWithResponses) EditMonitorWithResponse

func (c *ClientWithResponses) EditMonitorWithResponse(ctx context.Context, monitorID string, body EditMonitorJSONRequestBody, reqEditors ...RequestEditorFn) (*EditMonitorResponse, error)

func (*ClientWithResponses) GetAllIncidentsWithResponse

func (c *ClientWithResponses) GetAllIncidentsWithResponse(ctx context.Context, params *GetAllIncidentsParams, reqEditors ...RequestEditorFn) (*GetAllIncidentsResponse, error)

GetAllIncidentsWithResponse request returning *GetAllIncidentsResponse

func (*ClientWithResponses) GetAllMonitorsWithResponse

func (c *ClientWithResponses) GetAllMonitorsWithResponse(ctx context.Context, params *GetAllMonitorsParams, reqEditors ...RequestEditorFn) (*GetAllMonitorsResponse, error)

GetAllMonitorsWithResponse request returning *GetAllMonitorsResponse

func (*ClientWithResponses) GetIncidentByIDWithResponse

func (c *ClientWithResponses) GetIncidentByIDWithResponse(ctx context.Context, incidentID string, reqEditors ...RequestEditorFn) (*GetIncidentByIDResponse, error)

GetIncidentByIDWithResponse request returning *GetIncidentByIDResponse

func (*ClientWithResponses) GetMonitorByIDWithResponse

func (c *ClientWithResponses) GetMonitorByIDWithResponse(ctx context.Context, monitorID string, reqEditors ...RequestEditorFn) (*GetMonitorByIDResponse, error)

GetMonitorByIDWithResponse request returning *GetMonitorByIDResponse

func (*ClientWithResponses) GetMonitorResponseTimeStatsWithResponse

func (c *ClientWithResponses) GetMonitorResponseTimeStatsWithResponse(ctx context.Context, monitorID string, params *GetMonitorResponseTimeStatsParams, reqEditors ...RequestEditorFn) (*GetMonitorResponseTimeStatsResponse, error)

GetMonitorResponseTimeStatsWithResponse request returning *GetMonitorResponseTimeStatsResponse

func (*ClientWithResponses) GetProfileDetailsWithResponse

func (c *ClientWithResponses) GetProfileDetailsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetProfileDetailsResponse, error)

GetProfileDetailsWithResponse request returning *GetProfileDetailsResponse

func (*ClientWithResponses) LoginWithBodyWithResponse

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

LoginWithBodyWithResponse request with arbitrary body returning *LoginResponse

func (*ClientWithResponses) LoginWithResponse

func (c *ClientWithResponses) LoginWithResponse(ctx context.Context, body LoginJSONRequestBody, reqEditors ...RequestEditorFn) (*LoginResponse, error)

func (*ClientWithResponses) ToggleMonitorPauseWithBodyWithResponse

func (c *ClientWithResponses) ToggleMonitorPauseWithBodyWithResponse(ctx context.Context, monitorID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ToggleMonitorPauseResponse, error)

ToggleMonitorPauseWithBodyWithResponse request with arbitrary body returning *ToggleMonitorPauseResponse

func (*ClientWithResponses) ToggleMonitorPauseWithResponse

func (c *ClientWithResponses) ToggleMonitorPauseWithResponse(ctx context.Context, monitorID string, body ToggleMonitorPauseJSONRequestBody, reqEditors ...RequestEditorFn) (*ToggleMonitorPauseResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// BulkInviteMembersByEmailWithBodyWithResponse request with any body
	BulkInviteMembersByEmailWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*BulkInviteMembersByEmailResponse, error)

	BulkInviteMembersByEmailWithResponse(ctx context.Context, body BulkInviteMembersByEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*BulkInviteMembersByEmailResponse, error)

	// GetProfileDetailsWithResponse request
	GetProfileDetailsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetProfileDetailsResponse, error)

	// CreateAccountWithBodyWithResponse request with any body
	CreateAccountWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAccountResponse, error)

	CreateAccountWithResponse(ctx context.Context, body CreateAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAccountResponse, error)

	// ConfirmInvitationWithBodyWithResponse request with any body
	ConfirmInvitationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ConfirmInvitationResponse, error)

	ConfirmInvitationWithResponse(ctx context.Context, body ConfirmInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*ConfirmInvitationResponse, error)

	// LoginWithBodyWithResponse request with any body
	LoginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LoginResponse, error)

	LoginWithResponse(ctx context.Context, body LoginJSONRequestBody, reqEditors ...RequestEditorFn) (*LoginResponse, error)

	// GetAllIncidentsWithResponse request
	GetAllIncidentsWithResponse(ctx context.Context, params *GetAllIncidentsParams, reqEditors ...RequestEditorFn) (*GetAllIncidentsResponse, error)

	// GetIncidentByIDWithResponse request
	GetIncidentByIDWithResponse(ctx context.Context, incidentID string, reqEditors ...RequestEditorFn) (*GetIncidentByIDResponse, error)

	// GetAllMonitorsWithResponse request
	GetAllMonitorsWithResponse(ctx context.Context, params *GetAllMonitorsParams, reqEditors ...RequestEditorFn) (*GetAllMonitorsResponse, error)

	// CreateMonitorWithBodyWithResponse request with any body
	CreateMonitorWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateMonitorResponse, error)

	CreateMonitorWithResponse(ctx context.Context, body CreateMonitorJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateMonitorResponse, error)

	// DeleteMonitorWithResponse request
	DeleteMonitorWithResponse(ctx context.Context, monitorID string, reqEditors ...RequestEditorFn) (*DeleteMonitorResponse, error)

	// GetMonitorByIDWithResponse request
	GetMonitorByIDWithResponse(ctx context.Context, monitorID string, reqEditors ...RequestEditorFn) (*GetMonitorByIDResponse, error)

	// ToggleMonitorPauseWithBodyWithResponse request with any body
	ToggleMonitorPauseWithBodyWithResponse(ctx context.Context, monitorID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ToggleMonitorPauseResponse, error)

	ToggleMonitorPauseWithResponse(ctx context.Context, monitorID string, body ToggleMonitorPauseJSONRequestBody, reqEditors ...RequestEditorFn) (*ToggleMonitorPauseResponse, error)

	// EditMonitorWithBodyWithResponse request with any body
	EditMonitorWithBodyWithResponse(ctx context.Context, monitorID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EditMonitorResponse, error)

	EditMonitorWithResponse(ctx context.Context, monitorID string, body EditMonitorJSONRequestBody, reqEditors ...RequestEditorFn) (*EditMonitorResponse, error)

	// GetMonitorResponseTimeStatsWithResponse request
	GetMonitorResponseTimeStatsWithResponse(ctx context.Context, monitorID string, params *GetMonitorResponseTimeStatsParams, reqEditors ...RequestEditorFn) (*GetMonitorResponseTimeStatsResponse, error)
}

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

type ConfirmInvitationJSONRequestBody

type ConfirmInvitationJSONRequestBody = ConfirmInvitationRequest

ConfirmInvitationJSONRequestBody defines body for ConfirmInvitation for application/json ContentType.

type ConfirmInvitationRequest

type ConfirmInvitationRequest struct {
	Email           string `json:"email"`
	InvitationToken string `json:"invitation_token"`
	Password        string `json:"password"`
}

ConfirmInvitationRequest defines model for ConfirmInvitationRequest.

type ConfirmInvitationResponse

type ConfirmInvitationResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSONDefault  *DefaultError
}

func ParseConfirmInvitationResponse

func ParseConfirmInvitationResponse(rsp *http.Response) (*ConfirmInvitationResponse, error)

ParseConfirmInvitationResponse parses an HTTP response from a ConfirmInvitationWithResponse call

func (ConfirmInvitationResponse) Status

func (r ConfirmInvitationResponse) Status() string

Status returns HTTPResponse.Status

func (ConfirmInvitationResponse) StatusCode

func (r ConfirmInvitationResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateAccountJSONRequestBody

type CreateAccountJSONRequestBody = CreateAccountRequest

CreateAccountJSONRequestBody defines body for CreateAccount for application/json ContentType.

type CreateAccountRequest

type CreateAccountRequest struct {
	AccountName string `json:"account_name"`
	Email       string `json:"email"`
	Password    string `json:"password"`
}

CreateAccountRequest defines model for CreateAccountRequest.

type CreateAccountResponse

type CreateAccountResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSONDefault  *DefaultError
}

func ParseCreateAccountResponse

func ParseCreateAccountResponse(rsp *http.Response) (*CreateAccountResponse, error)

ParseCreateAccountResponse parses an HTTP response from a CreateAccountWithResponse call

func (CreateAccountResponse) Status

func (r CreateAccountResponse) Status() string

Status returns HTTPResponse.Status

func (CreateAccountResponse) StatusCode

func (r CreateAccountResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateMonitorJSONRequestBody

type CreateMonitorJSONRequestBody = CreateMonitorRequest

CreateMonitorJSONRequestBody defines body for CreateMonitor for application/json ContentType.

type CreateMonitorRequest

type CreateMonitorRequest struct {
	CheckIntervalInSeconds int    `json:"check_interval_in_seconds"`
	EndpointUrl            string `json:"endpoint_url"`
}

CreateMonitorRequest defines model for CreateMonitorRequest.

type CreateMonitorResponse

type CreateMonitorResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSONDefault  *DefaultError
}

func ParseCreateMonitorResponse

func ParseCreateMonitorResponse(rsp *http.Response) (*CreateMonitorResponse, error)

ParseCreateMonitorResponse parses an HTTP response from a CreateMonitorWithResponse call

func (CreateMonitorResponse) Status

func (r CreateMonitorResponse) Status() string

Status returns HTTPResponse.Status

func (CreateMonitorResponse) StatusCode

func (r CreateMonitorResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DefaultError

type DefaultError = ErrorResponse

DefaultError defines model for DefaultError.

type DeleteMonitorResponse

type DeleteMonitorResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSONDefault  *DefaultError
}

func ParseDeleteMonitorResponse

func ParseDeleteMonitorResponse(rsp *http.Response) (*DeleteMonitorResponse, error)

ParseDeleteMonitorResponse parses an HTTP response from a DeleteMonitorWithResponse call

func (DeleteMonitorResponse) Status

func (r DeleteMonitorResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteMonitorResponse) StatusCode

func (r DeleteMonitorResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type EditMonitorJSONRequestBody

type EditMonitorJSONRequestBody = EditMonitorRequest

EditMonitorJSONRequestBody defines body for EditMonitor for application/json ContentType.

type EditMonitorRequest

type EditMonitorRequest struct {
	CheckIntervalInSeconds int    `json:"check_interval_in_seconds"`
	EndpointUrl            string `json:"endpoint_url"`
}

EditMonitorRequest defines model for EditMonitorRequest.

type EditMonitorResponse

type EditMonitorResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSONDefault  *DefaultError
}

func ParseEditMonitorResponse

func ParseEditMonitorResponse(rsp *http.Response) (*EditMonitorResponse, error)

ParseEditMonitorResponse parses an HTTP response from a EditMonitorWithResponse call

func (EditMonitorResponse) Status

func (r EditMonitorResponse) Status() string

Status returns HTTPResponse.Status

func (EditMonitorResponse) StatusCode

func (r EditMonitorResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ErrorResponse

type ErrorResponse struct {
	// Error Error custom error code such as 'email_in_use'
	Error string `json:"error"`

	// Message A description about the error
	Message string `json:"message"`
}

ErrorResponse defines model for ErrorResponse.

type FullIncident

type FullIncident struct {
	Cause          string     `json:"cause"`
	CheckedUrl     string     `json:"checked_url"`
	CreatedAt      time.Time  `json:"created_at"`
	Id             string     `json:"id"`
	MonitorId      string     `json:"monitor_id"`
	ResolvedAt     *time.Time `json:"resolved_at,omitempty"`
	ResponseStatus *int       `json:"response_status,omitempty"`
}

FullIncident defines model for FullIncident.

type GetAllIncidentsParams

type GetAllIncidentsParams struct {
	Page  *int `form:"page,omitempty" json:"page,omitempty"`
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
}

GetAllIncidentsParams defines parameters for GetAllIncidents.

type GetAllIncidentsPayload

type GetAllIncidentsPayload struct {
	Data       []Incident `json:"data"`
	Page       int        `json:"page"`
	PageCount  int        `json:"page_count"`
	PerPage    int        `json:"per_page"`
	TotalCount int64      `json:"total_count"`
}

GetAllIncidentsPayload defines model for GetAllIncidentsPayload.

type GetAllIncidentsResponse

type GetAllIncidentsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *GetAllIncidentsPayload
	JSONDefault  *DefaultError
}

func ParseGetAllIncidentsResponse

func ParseGetAllIncidentsResponse(rsp *http.Response) (*GetAllIncidentsResponse, error)

ParseGetAllIncidentsResponse parses an HTTP response from a GetAllIncidentsWithResponse call

func (GetAllIncidentsResponse) Status

func (r GetAllIncidentsResponse) Status() string

Status returns HTTPResponse.Status

func (GetAllIncidentsResponse) StatusCode

func (r GetAllIncidentsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetAllMonitorByIdPayload

type GetAllMonitorByIdPayload struct {
	Data Monitor `json:"data"`
}

GetAllMonitorByIdPayload defines model for GetAllMonitorByIdPayload.

type GetAllMonitorsParams

type GetAllMonitorsParams struct {
	Page  *int `form:"page,omitempty" json:"page,omitempty"`
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
}

GetAllMonitorsParams defines parameters for GetAllMonitors.

type GetAllMonitorsPayload

type GetAllMonitorsPayload struct {
	Data       []Monitor `json:"data"`
	Page       int       `json:"page"`
	PageCount  int       `json:"page_count"`
	PerPage    int       `json:"per_page"`
	TotalCount int64     `json:"total_count"`
}

GetAllMonitorsPayload defines model for GetAllMonitorsPayload.

type GetAllMonitorsResponse

type GetAllMonitorsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *GetAllMonitorsPayload
	JSONDefault  *DefaultError
}

func ParseGetAllMonitorsResponse

func ParseGetAllMonitorsResponse(rsp *http.Response) (*GetAllMonitorsResponse, error)

ParseGetAllMonitorsResponse parses an HTTP response from a GetAllMonitorsWithResponse call

func (GetAllMonitorsResponse) Status

func (r GetAllMonitorsResponse) Status() string

Status returns HTTPResponse.Status

func (GetAllMonitorsResponse) StatusCode

func (r GetAllMonitorsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetIncidentByByIdPayload

type GetIncidentByByIdPayload struct {
	Data FullIncident `json:"data"`
}

GetIncidentByByIdPayload defines model for GetIncidentByByIdPayload.

type GetIncidentByIDResponse

type GetIncidentByIDResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *GetIncidentByByIdPayload
	JSONDefault  *DefaultError
}

func ParseGetIncidentByIDResponse

func ParseGetIncidentByIDResponse(rsp *http.Response) (*GetIncidentByIDResponse, error)

ParseGetIncidentByIDResponse parses an HTTP response from a GetIncidentByIDWithResponse call

func (GetIncidentByIDResponse) Status

func (r GetIncidentByIDResponse) Status() string

Status returns HTTPResponse.Status

func (GetIncidentByIDResponse) StatusCode

func (r GetIncidentByIDResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetMonitorByIDResponse

type GetMonitorByIDResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *GetAllMonitorByIdPayload
	JSONDefault  *DefaultError
}

func ParseGetMonitorByIDResponse

func ParseGetMonitorByIDResponse(rsp *http.Response) (*GetMonitorByIDResponse, error)

ParseGetMonitorByIDResponse parses an HTTP response from a GetMonitorByIDWithResponse call

func (GetMonitorByIDResponse) Status

func (r GetMonitorByIDResponse) Status() string

Status returns HTTPResponse.Status

func (GetMonitorByIDResponse) StatusCode

func (r GetMonitorByIDResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetMonitorResponseTimeStatsParams

type GetMonitorResponseTimeStatsParams struct {
	RangeInDays *int `form:"range_in_days,omitempty" json:"range_in_days,omitempty"`
}

GetMonitorResponseTimeStatsParams defines parameters for GetMonitorResponseTimeStats.

type GetMonitorResponseTimeStatsPayload

type GetMonitorResponseTimeStatsPayload struct {
	Data []ResponseTimeStat `json:"data"`
}

GetMonitorResponseTimeStatsPayload defines model for GetMonitorResponseTimeStatsPayload.

type GetMonitorResponseTimeStatsResponse

type GetMonitorResponseTimeStatsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *GetMonitorResponseTimeStatsPayload
	JSONDefault  *DefaultError
}

func ParseGetMonitorResponseTimeStatsResponse

func ParseGetMonitorResponseTimeStatsResponse(rsp *http.Response) (*GetMonitorResponseTimeStatsResponse, error)

ParseGetMonitorResponseTimeStatsResponse parses an HTTP response from a GetMonitorResponseTimeStatsWithResponse call

func (GetMonitorResponseTimeStatsResponse) Status

Status returns HTTPResponse.Status

func (GetMonitorResponseTimeStatsResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type GetProfileDetailsPayload

type GetProfileDetailsPayload struct {
	Data User `json:"data"`
}

GetProfileDetailsPayload defines model for GetProfileDetailsPayload.

type GetProfileDetailsResponse

type GetProfileDetailsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *GetProfileDetailsPayload
	JSONDefault  *DefaultError
}

func ParseGetProfileDetailsResponse

func ParseGetProfileDetailsResponse(rsp *http.Response) (*GetProfileDetailsResponse, error)

ParseGetProfileDetailsResponse parses an HTTP response from a GetProfileDetailsWithResponse call

func (GetProfileDetailsResponse) Status

func (r GetProfileDetailsResponse) Status() string

Status returns HTTPResponse.Status

func (GetProfileDetailsResponse) StatusCode

func (r GetProfileDetailsResponse) 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 Incident

type Incident struct {
	Cause      string     `json:"cause"`
	CheckedUrl string     `json:"checked_url"`
	CreatedAt  time.Time  `json:"created_at"`
	Id         string     `json:"id"`
	ResolvedAt *time.Time `json:"resolved_at,omitempty"`
}

Incident defines model for Incident.

type LogInPayload

type LogInPayload struct {
	Token string `json:"token"`
}

LogInPayload defines model for LogInPayload.

type LogInRequest

type LogInRequest struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

LogInRequest defines model for LogInRequest.

type LoginJSONRequestBody

type LoginJSONRequestBody = LogInRequest

LoginJSONRequestBody defines body for Login for application/json ContentType.

type LoginResponse

type LoginResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *LogInPayload
	JSONDefault  *DefaultError
}

func ParseLoginResponse

func ParseLoginResponse(rsp *http.Response) (*LoginResponse, error)

ParseLoginResponse parses an HTTP response from a LoginWithResponse call

func (LoginResponse) Status

func (r LoginResponse) Status() string

Status returns HTTPResponse.Status

func (LoginResponse) StatusCode

func (r LoginResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Monitor

type Monitor struct {
	CheckIntervalInSeconds int        `json:"check_interval_in_seconds"`
	CreatedAt              time.Time  `json:"created_at"`
	DownSince              *time.Time `json:"down_since,omitempty"`
	EndpointUrl            string     `json:"endpoint_url"`
	Id                     string     `json:"id"`
	Incidents              []Incident `json:"incidents"`
	IsEndpointUp           bool       `json:"is_endpoint_up"`
	IsPaused               bool       `json:"is_paused"`
	LastCheckedAt          *time.Time `json:"last_checked_at,omitempty"`
	UpSince                *time.Time `json:"up_since,omitempty"`
}

Monitor defines model for Monitor.

type RequestEditorFn

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

RequestEditorFn is the function signature for the RequestEditor callback function

type ResponseTimeStat

type ResponseTimeStat struct {
	Date   time.Time `json:"date"`
	Region string    `json:"region"`
	Value  int       `json:"value"`
}

ResponseTimeStat defines model for ResponseTimeStat.

type ToggleMonitorPauseJSONRequestBody

type ToggleMonitorPauseJSONRequestBody = ToggleMonitorPauseRequest

ToggleMonitorPauseJSONRequestBody defines body for ToggleMonitorPause for application/json ContentType.

type ToggleMonitorPauseRequest

type ToggleMonitorPauseRequest struct {
	Pause bool `json:"pause"`
}

ToggleMonitorPauseRequest defines model for ToggleMonitorPauseRequest.

type ToggleMonitorPauseResponse

type ToggleMonitorPauseResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSONDefault  *DefaultError
}

func ParseToggleMonitorPauseResponse

func ParseToggleMonitorPauseResponse(rsp *http.Response) (*ToggleMonitorPauseResponse, error)

ParseToggleMonitorPauseResponse parses an HTTP response from a ToggleMonitorPauseWithResponse call

func (ToggleMonitorPauseResponse) Status

Status returns HTTPResponse.Status

func (ToggleMonitorPauseResponse) StatusCode

func (r ToggleMonitorPauseResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type User

type User struct {
	CreatedAt time.Time `json:"created_at"`
	Email     string    `json:"email"`
	FirstName string    `json:"first_name"`
	Id        string    `json:"id"`
	LastName  string    `json:"last_name"`
	Role      string    `json:"role"`
}

User defines model for User.

Jump to

Keyboard shortcuts

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