internal

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Some helpers around the auto generated openapi.go structs for easy grafana data.Frame creation across auto created types

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

Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT.

Index

Constants

View Source
const (
	ProdEndpoint  = "https://app.metrist.io"
	Dev1Endpoint  = "https://app-dev1.metrist.io"
	LocalEndpoint = "https://host.docker.internal:4443"
)
View Source
const (
	AuthorizationScopes = "authorization.Scopes"
)

Variables

View Source
var BuildHash string
View Source
var Environment = "dev"

Functions

func Endpoint

func Endpoint() string

func NewBackendWebMonitorCheckControllerGetRequest

func NewBackendWebMonitorCheckControllerGetRequest(server string, params *BackendWebMonitorCheckControllerGetParams) (*http.Request, error)

NewBackendWebMonitorCheckControllerGetRequest generates requests for BackendWebMonitorCheckControllerGet

func NewBackendWebMonitorConfigControllerDeleteRequest

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

NewBackendWebMonitorConfigControllerDeleteRequest generates requests for BackendWebMonitorConfigControllerDelete

func NewBackendWebMonitorConfigControllerPostRequest

func NewBackendWebMonitorConfigControllerPostRequest(server string, body BackendWebMonitorConfigControllerPostJSONRequestBody) (*http.Request, error)

NewBackendWebMonitorConfigControllerPostRequest calls the generic BackendWebMonitorConfigControllerPost builder with application/json body

func NewBackendWebMonitorConfigControllerPostRequestWithBody

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

NewBackendWebMonitorConfigControllerPostRequestWithBody generates requests for BackendWebMonitorConfigControllerPost with any type of body

func NewBackendWebMonitorErrorControllerGetRequest

func NewBackendWebMonitorErrorControllerGetRequest(server string, params *BackendWebMonitorErrorControllerGetParams) (*http.Request, error)

NewBackendWebMonitorErrorControllerGetRequest generates requests for BackendWebMonitorErrorControllerGet

func NewBackendWebMonitorInstanceControllerGetRequest

func NewBackendWebMonitorInstanceControllerGetRequest(server string, params *BackendWebMonitorInstanceControllerGetParams) (*http.Request, error)

NewBackendWebMonitorInstanceControllerGetRequest generates requests for BackendWebMonitorInstanceControllerGet

func NewBackendWebMonitorListControllerGetRequest

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

NewBackendWebMonitorListControllerGetRequest generates requests for BackendWebMonitorListControllerGet

func NewBackendWebMonitorStatusControllerGetRequest

func NewBackendWebMonitorStatusControllerGetRequest(server string, params *BackendWebMonitorStatusControllerGetParams) (*http.Request, error)

NewBackendWebMonitorStatusControllerGetRequest generates requests for BackendWebMonitorStatusControllerGet

func NewBackendWebMonitorTelemetryControllerGetRequest

func NewBackendWebMonitorTelemetryControllerGetRequest(server string, params *BackendWebMonitorTelemetryControllerGetParams) (*http.Request, error)

NewBackendWebMonitorTelemetryControllerGetRequest generates requests for BackendWebMonitorTelemetryControllerGet

func NewBackendWebStatusPageChangeControllerGetRequest

func NewBackendWebStatusPageChangeControllerGetRequest(server string, params *BackendWebStatusPageChangeControllerGetParams) (*http.Request, error)

NewBackendWebStatusPageChangeControllerGetRequest generates requests for BackendWebStatusPageChangeControllerGet

func NewBackendWebVerifyAuthControllerGetRequest

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

NewBackendWebVerifyAuthControllerGetRequest generates requests for BackendWebVerifyAuthControllerGet

Types

type BackendWebMonitorCheckControllerGetParams

type BackendWebMonitorCheckControllerGetParams struct {
	// IncludeShared Whether to include SHARED data in returned results. If omitted SHARED data will not be included
	IncludeShared *bool `form:"include_shared,omitempty" json:"include_shared,omitempty"`

	// M One or more monitors to get the errors for.
	// These should be the logical names for the monitors.
	// If omitted all monitors on the account are included
	M []string `form:"m[]" json:"m[]"`
}

BackendWebMonitorCheckControllerGetParams defines parameters for BackendWebMonitorCheckControllerGet.

type BackendWebMonitorCheckControllerGetResponse

type BackendWebMonitorCheckControllerGetResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *MonitorChecksResponse
}

func ParseBackendWebMonitorCheckControllerGetResponse

func ParseBackendWebMonitorCheckControllerGetResponse(rsp *http.Response) (*BackendWebMonitorCheckControllerGetResponse, error)

ParseBackendWebMonitorCheckControllerGetResponse parses an HTTP response from a BackendWebMonitorCheckControllerGetWithResponse call

func (BackendWebMonitorCheckControllerGetResponse) Status

Status returns HTTPResponse.Status

func (BackendWebMonitorCheckControllerGetResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type BackendWebMonitorConfigControllerDeleteResponse

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

func ParseBackendWebMonitorConfigControllerDeleteResponse

func ParseBackendWebMonitorConfigControllerDeleteResponse(rsp *http.Response) (*BackendWebMonitorConfigControllerDeleteResponse, error)

ParseBackendWebMonitorConfigControllerDeleteResponse parses an HTTP response from a BackendWebMonitorConfigControllerDeleteWithResponse call

func (BackendWebMonitorConfigControllerDeleteResponse) Status

Status returns HTTPResponse.Status

func (BackendWebMonitorConfigControllerDeleteResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type BackendWebMonitorConfigControllerPostJSONRequestBody

type BackendWebMonitorConfigControllerPostJSONRequestBody = MonitorConfig

BackendWebMonitorConfigControllerPostJSONRequestBody defines body for BackendWebMonitorConfigControllerPost for application/json ContentType.

type BackendWebMonitorConfigControllerPostResponse

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

func ParseBackendWebMonitorConfigControllerPostResponse

func ParseBackendWebMonitorConfigControllerPostResponse(rsp *http.Response) (*BackendWebMonitorConfigControllerPostResponse, error)

ParseBackendWebMonitorConfigControllerPostResponse parses an HTTP response from a BackendWebMonitorConfigControllerPostWithResponse call

func (BackendWebMonitorConfigControllerPostResponse) Status

Status returns HTTPResponse.Status

func (BackendWebMonitorConfigControllerPostResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type BackendWebMonitorErrorControllerGetParams

type BackendWebMonitorErrorControllerGetParams struct {
	From time.Time `form:"from" json:"from"`
	To   time.Time `form:"to" json:"to"`

	// CursorAfter Fetch the records after this cursor.
	CursorAfter *string `form:"cursor_after,omitempty" json:"cursor_after,omitempty"`

	// CursorBefore Fetch the records before this cursor.
	CursorBefore *string `form:"cursor_before,omitempty" json:"cursor_before,omitempty"`

	// Limit Limit of the result set
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

	// OnlyShared Whether to only return SHARED data in returned results. If omitted, the account specific data is returned
	OnlyShared *bool `form:"only_shared,omitempty" json:"only_shared,omitempty"`

	// C The checks to limit the query to
	C *[]string `form:"c[],omitempty" json:"c[],omitempty"`

	// I The instances to limit the query to
	I *[]string `form:"i[],omitempty" json:"i[],omitempty"`

	// M One or more monitors to get the errors for.
	// These should be the logical names for the monitors.
	// If omitted all monitors on the account are included
	M []string `form:"m[]" json:"m[]"`
}

BackendWebMonitorErrorControllerGetParams defines parameters for BackendWebMonitorErrorControllerGet.

type BackendWebMonitorErrorControllerGetResponse

type BackendWebMonitorErrorControllerGetResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *MonitorErrorResponse
}

func ParseBackendWebMonitorErrorControllerGetResponse

func ParseBackendWebMonitorErrorControllerGetResponse(rsp *http.Response) (*BackendWebMonitorErrorControllerGetResponse, error)

ParseBackendWebMonitorErrorControllerGetResponse parses an HTTP response from a BackendWebMonitorErrorControllerGetWithResponse call

func (BackendWebMonitorErrorControllerGetResponse) Status

Status returns HTTPResponse.Status

func (BackendWebMonitorErrorControllerGetResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type BackendWebMonitorInstanceControllerGetParams

type BackendWebMonitorInstanceControllerGetParams struct {
	// IncludeShared Whether to include SHARED data in returned results. If omitted SHARED data will not be included
	IncludeShared *bool `form:"include_shared,omitempty" json:"include_shared,omitempty"`

	// M One or more monitors to get the errors for.
	// These should be the logical names for the monitors.
	// If omitted all monitors on the account are included
	M []string `form:"m[]" json:"m[]"`
}

BackendWebMonitorInstanceControllerGetParams defines parameters for BackendWebMonitorInstanceControllerGet.

type BackendWebMonitorInstanceControllerGetResponse

type BackendWebMonitorInstanceControllerGetResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *MonitorInstancesResponse
}

func ParseBackendWebMonitorInstanceControllerGetResponse

func ParseBackendWebMonitorInstanceControllerGetResponse(rsp *http.Response) (*BackendWebMonitorInstanceControllerGetResponse, error)

ParseBackendWebMonitorInstanceControllerGetResponse parses an HTTP response from a BackendWebMonitorInstanceControllerGetWithResponse call

func (BackendWebMonitorInstanceControllerGetResponse) Status

Status returns HTTPResponse.Status

func (BackendWebMonitorInstanceControllerGetResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type BackendWebMonitorListControllerGetResponse

type BackendWebMonitorListControllerGetResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *MonitorListResponse
}

func ParseBackendWebMonitorListControllerGetResponse

func ParseBackendWebMonitorListControllerGetResponse(rsp *http.Response) (*BackendWebMonitorListControllerGetResponse, error)

ParseBackendWebMonitorListControllerGetResponse parses an HTTP response from a BackendWebMonitorListControllerGetWithResponse call

func (BackendWebMonitorListControllerGetResponse) Status

Status returns HTTPResponse.Status

func (BackendWebMonitorListControllerGetResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type BackendWebMonitorStatusControllerGetParams

type BackendWebMonitorStatusControllerGetParams struct {
	// M One or more monitors to get the errors for.
	// These should be the logical names for the monitors.
	// If omitted all monitors on the account are included
	M []string `form:"m[]" json:"m[]"`
}

BackendWebMonitorStatusControllerGetParams defines parameters for BackendWebMonitorStatusControllerGet.

type BackendWebMonitorStatusControllerGetResponse

type BackendWebMonitorStatusControllerGetResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *MonitorStatusesResponse
}

func ParseBackendWebMonitorStatusControllerGetResponse

func ParseBackendWebMonitorStatusControllerGetResponse(rsp *http.Response) (*BackendWebMonitorStatusControllerGetResponse, error)

ParseBackendWebMonitorStatusControllerGetResponse parses an HTTP response from a BackendWebMonitorStatusControllerGetWithResponse call

func (BackendWebMonitorStatusControllerGetResponse) Status

Status returns HTTPResponse.Status

func (BackendWebMonitorStatusControllerGetResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type BackendWebMonitorTelemetryControllerGetParams

type BackendWebMonitorTelemetryControllerGetParams struct {
	From time.Time `form:"from" json:"from"`
	To   time.Time `form:"to" json:"to"`

	// IncludeShared Whether to include SHARED data in returned results. If omitted SHARED data will not be included
	IncludeShared *bool `form:"include_shared,omitempty" json:"include_shared,omitempty"`

	// C The checks to limit the query to
	C *[]string `form:"c[],omitempty" json:"c[],omitempty"`

	// I The instances to limit the query to
	I *[]string `form:"i[],omitempty" json:"i[],omitempty"`

	// M One or more monitors to get the errors for.
	// These should be the logical names for the monitors.
	// If omitted all monitors on the account are included
	M []string `form:"m[]" json:"m[]"`
}

BackendWebMonitorTelemetryControllerGetParams defines parameters for BackendWebMonitorTelemetryControllerGet.

type BackendWebMonitorTelemetryControllerGetResponse

type BackendWebMonitorTelemetryControllerGetResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *MonitorTelemetryResponse
}

func ParseBackendWebMonitorTelemetryControllerGetResponse

func ParseBackendWebMonitorTelemetryControllerGetResponse(rsp *http.Response) (*BackendWebMonitorTelemetryControllerGetResponse, error)

ParseBackendWebMonitorTelemetryControllerGetResponse parses an HTTP response from a BackendWebMonitorTelemetryControllerGetWithResponse call

func (BackendWebMonitorTelemetryControllerGetResponse) Status

Status returns HTTPResponse.Status

func (BackendWebMonitorTelemetryControllerGetResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type BackendWebStatusPageChangeControllerGetParams

type BackendWebStatusPageChangeControllerGetParams struct {
	From time.Time  `form:"from" json:"from"`
	To   *time.Time `form:"to,omitempty" json:"to,omitempty"`

	// CursorAfter Fetch the records after this cursor.
	CursorAfter *string `form:"cursor_after,omitempty" json:"cursor_after,omitempty"`

	// CursorBefore Fetch the records before this cursor.
	CursorBefore *string `form:"cursor_before,omitempty" json:"cursor_before,omitempty"`

	// Limit Limit of the result set
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

	// M One or more monitors to get the errors for.
	// These should be the logical names for the monitors.
	// If omitted all monitors on the account are included
	M []string `form:"m[]" json:"m[]"`
}

BackendWebStatusPageChangeControllerGetParams defines parameters for BackendWebStatusPageChangeControllerGet.

type BackendWebStatusPageChangeControllerGetResponse

type BackendWebStatusPageChangeControllerGetResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *StatusPageChangesResponse
}

func ParseBackendWebStatusPageChangeControllerGetResponse

func ParseBackendWebStatusPageChangeControllerGetResponse(rsp *http.Response) (*BackendWebStatusPageChangeControllerGetResponse, error)

ParseBackendWebStatusPageChangeControllerGetResponse parses an HTTP response from a BackendWebStatusPageChangeControllerGetWithResponse call

func (BackendWebStatusPageChangeControllerGetResponse) Status

Status returns HTTPResponse.Status

func (BackendWebStatusPageChangeControllerGetResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type BackendWebVerifyAuthControllerGetResponse

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

func ParseBackendWebVerifyAuthControllerGetResponse

func ParseBackendWebVerifyAuthControllerGetResponse(rsp *http.Response) (*BackendWebVerifyAuthControllerGetResponse, error)

ParseBackendWebVerifyAuthControllerGetResponse parses an HTTP response from a BackendWebVerifyAuthControllerGetWithResponse call

func (BackendWebVerifyAuthControllerGetResponse) Status

Status returns HTTPResponse.Status

func (BackendWebVerifyAuthControllerGetResponse) StatusCode

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

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

func (*Client) BackendWebMonitorConfigControllerDelete

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

func (*Client) BackendWebMonitorConfigControllerPost

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

func (*Client) BackendWebMonitorConfigControllerPostWithBody

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

func (*Client) BackendWebMonitorErrorControllerGet

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

func (*Client) BackendWebMonitorInstanceControllerGet

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

func (*Client) BackendWebMonitorListControllerGet

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

func (*Client) BackendWebMonitorStatusControllerGet

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

func (*Client) BackendWebMonitorTelemetryControllerGet

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

func (*Client) BackendWebStatusPageChangeControllerGet

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

func (*Client) BackendWebVerifyAuthControllerGet

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

type ClientInterface

type ClientInterface interface {
	// BackendWebMonitorCheckControllerGet request
	BackendWebMonitorCheckControllerGet(ctx context.Context, params *BackendWebMonitorCheckControllerGetParams, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	BackendWebMonitorConfigControllerPost(ctx context.Context, body BackendWebMonitorConfigControllerPostJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// BackendWebMonitorConfigControllerDelete request
	BackendWebMonitorConfigControllerDelete(ctx context.Context, monitor string, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

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

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

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

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

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

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

	// BackendWebVerifyAuthControllerGet request
	BackendWebVerifyAuthControllerGet(ctx context.Context, 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) BackendWebMonitorCheckControllerGetWithResponse

func (c *ClientWithResponses) BackendWebMonitorCheckControllerGetWithResponse(ctx context.Context, params *BackendWebMonitorCheckControllerGetParams, reqEditors ...RequestEditorFn) (*BackendWebMonitorCheckControllerGetResponse, error)

BackendWebMonitorCheckControllerGetWithResponse request returning *BackendWebMonitorCheckControllerGetResponse

func (*ClientWithResponses) BackendWebMonitorConfigControllerDeleteWithResponse

func (c *ClientWithResponses) BackendWebMonitorConfigControllerDeleteWithResponse(ctx context.Context, monitor string, id string, reqEditors ...RequestEditorFn) (*BackendWebMonitorConfigControllerDeleteResponse, error)

BackendWebMonitorConfigControllerDeleteWithResponse request returning *BackendWebMonitorConfigControllerDeleteResponse

func (*ClientWithResponses) BackendWebMonitorConfigControllerPostWithBodyWithResponse

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

BackendWebMonitorConfigControllerPostWithBodyWithResponse request with arbitrary body returning *BackendWebMonitorConfigControllerPostResponse

func (*ClientWithResponses) BackendWebMonitorErrorControllerGetWithResponse

func (c *ClientWithResponses) BackendWebMonitorErrorControllerGetWithResponse(ctx context.Context, params *BackendWebMonitorErrorControllerGetParams, reqEditors ...RequestEditorFn) (*BackendWebMonitorErrorControllerGetResponse, error)

BackendWebMonitorErrorControllerGetWithResponse request returning *BackendWebMonitorErrorControllerGetResponse

func (*ClientWithResponses) BackendWebMonitorInstanceControllerGetWithResponse

func (c *ClientWithResponses) BackendWebMonitorInstanceControllerGetWithResponse(ctx context.Context, params *BackendWebMonitorInstanceControllerGetParams, reqEditors ...RequestEditorFn) (*BackendWebMonitorInstanceControllerGetResponse, error)

BackendWebMonitorInstanceControllerGetWithResponse request returning *BackendWebMonitorInstanceControllerGetResponse

func (*ClientWithResponses) BackendWebMonitorListControllerGetWithResponse

func (c *ClientWithResponses) BackendWebMonitorListControllerGetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*BackendWebMonitorListControllerGetResponse, error)

BackendWebMonitorListControllerGetWithResponse request returning *BackendWebMonitorListControllerGetResponse

func (*ClientWithResponses) BackendWebMonitorStatusControllerGetWithResponse

func (c *ClientWithResponses) BackendWebMonitorStatusControllerGetWithResponse(ctx context.Context, params *BackendWebMonitorStatusControllerGetParams, reqEditors ...RequestEditorFn) (*BackendWebMonitorStatusControllerGetResponse, error)

BackendWebMonitorStatusControllerGetWithResponse request returning *BackendWebMonitorStatusControllerGetResponse

func (*ClientWithResponses) BackendWebMonitorTelemetryControllerGetWithResponse

func (c *ClientWithResponses) BackendWebMonitorTelemetryControllerGetWithResponse(ctx context.Context, params *BackendWebMonitorTelemetryControllerGetParams, reqEditors ...RequestEditorFn) (*BackendWebMonitorTelemetryControllerGetResponse, error)

BackendWebMonitorTelemetryControllerGetWithResponse request returning *BackendWebMonitorTelemetryControllerGetResponse

func (*ClientWithResponses) BackendWebStatusPageChangeControllerGetWithResponse

func (c *ClientWithResponses) BackendWebStatusPageChangeControllerGetWithResponse(ctx context.Context, params *BackendWebStatusPageChangeControllerGetParams, reqEditors ...RequestEditorFn) (*BackendWebStatusPageChangeControllerGetResponse, error)

BackendWebStatusPageChangeControllerGetWithResponse request returning *BackendWebStatusPageChangeControllerGetResponse

func (*ClientWithResponses) BackendWebVerifyAuthControllerGetWithResponse

func (c *ClientWithResponses) BackendWebVerifyAuthControllerGetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*BackendWebVerifyAuthControllerGetResponse, error)

BackendWebVerifyAuthControllerGetWithResponse request returning *BackendWebVerifyAuthControllerGetResponse

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// BackendWebMonitorCheckControllerGet request
	BackendWebMonitorCheckControllerGetWithResponse(ctx context.Context, params *BackendWebMonitorCheckControllerGetParams, reqEditors ...RequestEditorFn) (*BackendWebMonitorCheckControllerGetResponse, error)

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

	BackendWebMonitorConfigControllerPostWithResponse(ctx context.Context, body BackendWebMonitorConfigControllerPostJSONRequestBody, reqEditors ...RequestEditorFn) (*BackendWebMonitorConfigControllerPostResponse, error)

	// BackendWebMonitorConfigControllerDelete request
	BackendWebMonitorConfigControllerDeleteWithResponse(ctx context.Context, monitor string, id string, reqEditors ...RequestEditorFn) (*BackendWebMonitorConfigControllerDeleteResponse, error)

	// BackendWebMonitorErrorControllerGet request
	BackendWebMonitorErrorControllerGetWithResponse(ctx context.Context, params *BackendWebMonitorErrorControllerGetParams, reqEditors ...RequestEditorFn) (*BackendWebMonitorErrorControllerGetResponse, error)

	// BackendWebMonitorInstanceControllerGet request
	BackendWebMonitorInstanceControllerGetWithResponse(ctx context.Context, params *BackendWebMonitorInstanceControllerGetParams, reqEditors ...RequestEditorFn) (*BackendWebMonitorInstanceControllerGetResponse, error)

	// BackendWebMonitorListControllerGet request
	BackendWebMonitorListControllerGetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*BackendWebMonitorListControllerGetResponse, error)

	// BackendWebMonitorStatusControllerGet request
	BackendWebMonitorStatusControllerGetWithResponse(ctx context.Context, params *BackendWebMonitorStatusControllerGetParams, reqEditors ...RequestEditorFn) (*BackendWebMonitorStatusControllerGetResponse, error)

	// BackendWebStatusPageChangeControllerGet request
	BackendWebStatusPageChangeControllerGetWithResponse(ctx context.Context, params *BackendWebStatusPageChangeControllerGetParams, reqEditors ...RequestEditorFn) (*BackendWebStatusPageChangeControllerGetResponse, error)

	// BackendWebMonitorTelemetryControllerGet request
	BackendWebMonitorTelemetryControllerGetWithResponse(ctx context.Context, params *BackendWebMonitorTelemetryControllerGetParams, reqEditors ...RequestEditorFn) (*BackendWebMonitorTelemetryControllerGetResponse, error)

	// BackendWebVerifyAuthControllerGet request
	BackendWebVerifyAuthControllerGetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*BackendWebVerifyAuthControllerGetResponse, error)
}

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

type FrameData added in v0.0.3

type FrameData interface {
	GetTimestamp() (time.Time, error)
	GetGraphVals(timestamp time.Time) []any
	GetTableVals(timestamp time.Time) []any
	GetKey() string
	GetGraphFrameDefinition() data.Frame
	GetTableFrameDefinition() data.Frame
	// contains filtered or unexported methods
}

type HttpRequestDoer

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

Doer performs HTTP requests.

The standard http.Client implements this interface.

type MonitorCheck

type MonitorCheck struct {
	// LogicalName The logical name of the check
	LogicalName *string `json:"logical_name,omitempty"`

	// Name The display name of the check
	Name *string `json:"name,omitempty"`
}

MonitorCheck A single monitor check

type MonitorChecksResponse added in v0.0.3

type MonitorChecksResponse = []struct {
	// Checks The unique checks for that monitor
	Checks *[]MonitorCheck `json:"checks,omitempty"`

	// MonitorLogicalName The logical name of the monitor
	MonitorLogicalName *string `json:"monitor_logical_name,omitempty"`
}

MonitorChecksResponse A list of monitors + their checks

type MonitorConfig

type MonitorConfig struct {
	// IntervalSecs The time between monitor runs in seconds
	IntervalSecs int `json:"interval_secs"`

	// MonitorLogicalName The monitor logical name of the monitor to configure
	MonitorLogicalName string `json:"monitor_logical_name"`

	// RunGroups The run groups for this config
	RunGroups []interface{} `json:"run_groups"`
	RunSpec   struct {
		// Name The name of the monitor
		Name *string `json:"name,omitempty"`

		// RunType The run type, one of dll, exe
		RunType *MonitorConfigRunSpecRunType `json:"run_type,omitempty"`
	} `json:"run_spec"`

	// Steps The run groups for this config
	Steps []struct {
		// CheckLogicalName The name of the check to run
		CheckLogicalName *string `json:"check_logical_name,omitempty"`

		// TimeoutSecs The timeout value for the check
		TimeoutSecs *int `json:"timeout_secs,omitempty"`
	} `json:"steps"`
}

MonitorConfig A monitor configuration definition

type MonitorConfigRunSpecRunType

type MonitorConfigRunSpecRunType string

MonitorConfigRunSpecRunType The run type, one of dll, exe

const (
	Dll MonitorConfigRunSpecRunType = "dll"
	Exe MonitorConfigRunSpecRunType = "exe"
)

Defines values for MonitorConfigRunSpecRunType.

type MonitorErrorCount

type MonitorErrorCount struct {
	// Check Check that generated the error
	Check *string `json:"check,omitempty"`

	// Count Error count
	Count *int `json:"count,omitempty"`

	// Instance Instance that generated the error
	Instance *string `json:"instance,omitempty"`

	// MonitorLogicalName Logical name of monitor
	MonitorLogicalName *string `json:"monitor_logical_name,omitempty"`

	// Timestamp Time when the error was generated
	Timestamp *string `json:"timestamp,omitempty"`
}

MonitorErrorCount A count of monitor errors per Monitor, Instance and Check

func (*MonitorErrorCount) GetGraphFrameDefinition added in v0.0.3

func (errorCount *MonitorErrorCount) GetGraphFrameDefinition() data.Frame

func (*MonitorErrorCount) GetGraphVals added in v0.0.3

func (errorCount *MonitorErrorCount) GetGraphVals(timestamp time.Time) []any

func (*MonitorErrorCount) GetKey added in v0.0.3

func (errorCount *MonitorErrorCount) GetKey() string

func (*MonitorErrorCount) GetTableFrameDefinition added in v0.0.3

func (errorCount *MonitorErrorCount) GetTableFrameDefinition() data.Frame

func (*MonitorErrorCount) GetTableVals added in v0.0.3

func (errorCount *MonitorErrorCount) GetTableVals(timestamp time.Time) []any

func (*MonitorErrorCount) GetTimestamp added in v0.0.3

func (errorCount *MonitorErrorCount) GetTimestamp() (time.Time, error)

Monitor Errors

type MonitorErrorResponse

type MonitorErrorResponse struct {
	// Entries Returned values
	Entries *[]MonitorErrorCount `json:"entries,omitempty"`

	// Metadata Provides cursor data for an API request
	Metadata *PagingMetadata `json:"metadata,omitempty"`
}

MonitorErrorResponse Response containing monitor errors and

type MonitorInstancesResponse added in v0.0.3

type MonitorInstancesResponse = []struct {
	// Instances The unique instances for that monitor
	Instances *[]string `json:"instances,omitempty"`

	// MonitorLogicalName The logical name of the monitor
	MonitorLogicalName *string `json:"monitor_logical_name,omitempty"`
}

MonitorInstancesResponse A list of monitors + their instances

type MonitorListResponse added in v0.0.3

type MonitorListResponse = []struct {
	// LogicalName The logical name of the monitor
	LogicalName *string `json:"logical_name,omitempty"`

	// Name The name of the monitor
	Name *string `json:"name,omitempty"`
}

MonitorListResponse A list of monitors

type MonitorStatusesResponse added in v0.0.3

type MonitorStatusesResponse = []struct {
	// LastChecked The last time this monitor was checked by Metrist
	LastChecked *string `json:"last_checked,omitempty"`

	// MonitorLogicalName Logical name of monitor
	MonitorLogicalName *string `json:"monitor_logical_name,omitempty"`

	// State The state of the monitor up, degraded, issues, down, maintenance
	State *MonitorStatusesResponseState `json:"state,omitempty"`
}

MonitorStatusesResponse A collection of monitor statuses

type MonitorStatusesResponseState added in v0.0.3

type MonitorStatusesResponseState string

MonitorStatusesResponseState The state of the monitor up, degraded, issues, down, maintenance

const (
	Degraded    MonitorStatusesResponseState = "degraded"
	Down        MonitorStatusesResponseState = "down"
	Issues      MonitorStatusesResponseState = "issues"
	Maintenance MonitorStatusesResponseState = "maintenance"
	Up          MonitorStatusesResponseState = "up"
)

Defines values for MonitorStatusesResponseState.

type MonitorTelemetry

type MonitorTelemetry struct {
	// Check Check that generated the telemetry
	Check *string `json:"check,omitempty"`

	// Instance Instance that generated the telemetry
	Instance *string `json:"instance,omitempty"`

	// MonitorLogicalName Logical name of monitor
	MonitorLogicalName *string `json:"monitor_logical_name,omitempty"`

	// Timestamp ime when the error was generated
	Timestamp *string `json:"timestamp,omitempty"`

	// Value The average time this check took to execute in milliseconds
	Value *float32 `json:"value,omitempty"`
}

MonitorTelemetry A collection of Telemetry Entries

func (*MonitorTelemetry) GetGraphFrameDefinition added in v0.0.3

func (te *MonitorTelemetry) GetGraphFrameDefinition() data.Frame

func (*MonitorTelemetry) GetGraphVals added in v0.0.3

func (te *MonitorTelemetry) GetGraphVals(timestamp time.Time) []any

func (*MonitorTelemetry) GetKey added in v0.0.3

func (te *MonitorTelemetry) GetKey() string

func (*MonitorTelemetry) GetTableFrameDefinition added in v0.0.3

func (te *MonitorTelemetry) GetTableFrameDefinition() data.Frame

func (*MonitorTelemetry) GetTableVals added in v0.0.3

func (te *MonitorTelemetry) GetTableVals(timestamp time.Time) []any

func (*MonitorTelemetry) GetTimestamp added in v0.0.3

func (te *MonitorTelemetry) GetTimestamp() (time.Time, error)

Monitor Telemetry

type MonitorTelemetryResponse added in v0.0.3

type MonitorTelemetryResponse = []MonitorTelemetry

MonitorTelemetryResponse An array of MonitorTelemetry

type PagingMetadata

type PagingMetadata struct {
	// CursorAfter an opaque cursor representing the last row of the current page
	CursorAfter *string `json:"cursor_after,omitempty"`

	// CursorBefore an opaque cursor representing the first row of the current page
	CursorBefore *string `json:"cursor_before,omitempty"`
}

PagingMetadata Provides cursor data for an API request

type RequestEditorFn

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

RequestEditorFn is the function signature for the RequestEditor callback function

type StatusPageChangesResponse added in v0.0.3

type StatusPageChangesResponse struct {
	// Entries Returned values
	Entries *[]StatusPageComponentChange `json:"entries,omitempty"`

	// Metadata Provides cursor data for an API request
	Metadata *PagingMetadata `json:"metadata,omitempty"`
}

StatusPageChangesResponse A collection of Status Page Component Changes

type StatusPageComponentChange

type StatusPageComponentChange struct {
	// Component Component name that was changed
	Component *string `json:"component,omitempty"`

	// Id Unique Metrist id for the change
	Id *string `json:"id,omitempty"`

	// MonitorLogicalName Logical name of monitor
	MonitorLogicalName *string `json:"monitor_logical_name,omitempty"`

	// Status Status from the provider status page
	Status *string `json:"status,omitempty"`

	// Timestamp Time when the change occurred
	Timestamp *string `json:"timestamp,omitempty"`
}

StatusPageComponentChange A single change for a single status page component

func (*StatusPageComponentChange) GetGraphFrameDefinition added in v0.0.3

func (spc *StatusPageComponentChange) GetGraphFrameDefinition() data.Frame

func (*StatusPageComponentChange) GetGraphVals added in v0.0.3

func (spc *StatusPageComponentChange) GetGraphVals(timestamp time.Time) []any

func (*StatusPageComponentChange) GetKey added in v0.0.3

func (spc *StatusPageComponentChange) GetKey() string

func (*StatusPageComponentChange) GetTableFrameDefinition added in v0.0.3

func (spc *StatusPageComponentChange) GetTableFrameDefinition() data.Frame

func (*StatusPageComponentChange) GetTableVals added in v0.0.3

func (spc *StatusPageComponentChange) GetTableVals(timestamp time.Time) []any

func (*StatusPageComponentChange) GetTimestamp added in v0.0.3

func (spc *StatusPageComponentChange) GetTimestamp() (time.Time, error)

Status Page Changes

Jump to

Keyboard shortcuts

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