Documentation
¶
Overview ¶
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.
Package api is the Go client for the Ionhour Integration API v1 (https://api.ionhour.com/api/v1): projects, HTTP checks, heartbeat jobs, regions and the other v1 resources.
It is a separate module from the zero-dependency heartbeat SDK (github.com/ionhour/go-sdk), so the generated client's runtime dependency never reaches heartbeat users.
The low-level client (client.gen.go, types.gen.go) is generated by oapi-codegen from the committed OpenAPI document; regenerate it with `yarn openapi:go-client`. The hand-written facade adds:
- NewClient with env fallbacks (IONHOUR_API_KEY, IONHOUR_API_BASE_URL)
- bearer auth and a User-Agent on every request
- the SDK contract retry policy (never 4xx; 429 honours Retry-After; 5xx/network backoff 1s, 2s, 2s; 3 attempts)
- *APIError parsed from the v1 error envelope, with IsUnauthorized, IsForbidden, IsNotFound, IsConflict and IsRateLimited
- ListAll pagination, wrapped by Client.ListAllChecks and friends
- automatic idempotency keys on checks_create, jobs_create and projects_create, overridable with WithIdempotencyKey
Always construct the client with NewClient; the zero value is not usable.
Quick start:
c, err := api.NewClient(api.WithAPIKey(os.Getenv("IONHOUR_API_KEY")))
if err != nil { ... }
me, err := c.Whoami(ctx)
rsp, err := c.ProjectsListWithResponse(ctx, &api.ProjectsListParams{})
if err != nil { ... }
if err := c.CheckResponse(rsp.HTTPResponse, rsp.Body); err != nil { ... }
for _, p := range rsp.JSON200.Items { ... }
The API key never appears in fmt output of a Client or in error text.
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.
Example ¶
Example mirrors the README quick start. It is compiled (not run) by go test.
package main
import (
"context"
"log"
"github.com/oapi-codegen/nullable"
"github.com/ionhour/go-sdk/api"
)
func main() {
ctx := context.Background()
c, err := api.NewClient() // IONHOUR_API_KEY, IONHOUR_API_BASE_URL
if err != nil {
log.Fatal(err)
}
me, err := c.Whoami(ctx)
if err != nil {
log.Fatal(err)
}
log.Printf("workspace %d (%s), %s key", me.WorkspaceId, me.WorkspaceName, me.PrincipalKind)
key, err := api.NewIdempotencyKey()
if err != nil {
log.Fatal(err)
}
rsp, err := c.ChecksCreateWithResponse(api.WithIdempotencyKey(ctx, key), &api.ChecksCreateParams{},
api.CreateCheckV1Dto{
Name: "Public API",
ProjectId: 7,
Slug: nullable.NewNullableWithValue("public-api"),
Config: api.V1HttpCheckConfigDto{Url: "https://api.example.com/health"},
})
if err != nil {
log.Fatal(err)
}
if err := c.CheckResponse(rsp.HTTPResponse, rsp.Body); err != nil {
log.Fatal(err)
}
log.Printf("created check %d", rsp.JSON201.Id)
got, err := c.ChecksGetOneWithResponse(ctx, "slug:public-api")
if err != nil {
log.Fatal(err)
}
if err := c.CheckResponse(got.HTTPResponse, got.Body); api.IsNotFound(err) {
log.Print("gone")
}
projects, err := c.ListAllProjects(ctx, api.ProjectsListParams{})
if err != nil {
log.Fatal(err)
}
log.Printf("%d projects", len(projects))
_, _ = c.ProjectsUpdateWithResponse(ctx, "7", api.UpdateProjectV1Dto{Description: nullable.NewNullNullable[string]()})
}
Output:
Index ¶
- Constants
- Variables
- func IsConflict(err error) bool
- func IsForbidden(err error) bool
- func IsNotFound(err error) bool
- func IsRateLimited(err error) bool
- func IsUnauthorized(err error) bool
- func ListAll[T any](ctx context.Context, fetch PageFetcher[T]) ([]T, error)
- func NewAnnouncementsAddUpdateRequest(server string, id string, announcementId int, ...) (*http.Request, error)
- func NewAnnouncementsAddUpdateRequestWithBody(server string, id string, announcementId int, contentType string, ...) (*http.Request, error)
- func NewAnnouncementsCreateRequest(server string, id string, body AnnouncementsCreateJSONRequestBody) (*http.Request, error)
- func NewAnnouncementsCreateRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error)
- func NewAnnouncementsListRequest(server string, id string, params *AnnouncementsListParams) (*http.Request, error)
- func NewAnnouncementsUpdateRequest(server string, id string, announcementId int, ...) (*http.Request, error)
- func NewAnnouncementsUpdateRequestWithBody(server string, id string, announcementId int, contentType string, ...) (*http.Request, error)
- func NewChecksCreateRequest(server string, params *ChecksCreateParams, body ChecksCreateJSONRequestBody) (*http.Request, error)
- func NewChecksCreateRequestWithBody(server string, params *ChecksCreateParams, contentType string, body io.Reader) (*http.Request, error)
- func NewChecksGetOneRequest(server string, id string) (*http.Request, error)
- func NewChecksListRequest(server string, params *ChecksListParams) (*http.Request, error)
- func NewChecksPauseRequest(server string, id string) (*http.Request, error)
- func NewChecksRemoveRequest(server string, id string) (*http.Request, error)
- func NewChecksResumeRequest(server string, id string) (*http.Request, error)
- func NewChecksUpdateRequest(server string, id string, body ChecksUpdateJSONRequestBody) (*http.Request, error)
- func NewChecksUpdateRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error)
- func NewDeploymentsCreateRequest(server string, body DeploymentsCreateJSONRequestBody) (*http.Request, error)
- func NewDeploymentsCreateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewDeploymentsEndRequest(server string, id int) (*http.Request, error)
- func NewDeploymentsListRequest(server string, params *DeploymentsListParams) (*http.Request, error)
- func NewIdempotencyKey() (string, error)
- func NewIncidentsAcknowledgeRequest(server string, id int) (*http.Request, error)
- func NewIncidentsCreateRequest(server string, body IncidentsCreateJSONRequestBody) (*http.Request, error)
- func NewIncidentsCreateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewIncidentsGetOneRequest(server string, id int) (*http.Request, error)
- func NewIncidentsListRequest(server string, params *IncidentsListParams) (*http.Request, error)
- func NewIncidentsResolveRequest(server string, id int, body IncidentsResolveJSONRequestBody) (*http.Request, error)
- func NewIncidentsResolveRequestWithBody(server string, id int, contentType string, body io.Reader) (*http.Request, error)
- func NewJobsCreateRequest(server string, params *JobsCreateParams, body JobsCreateJSONRequestBody) (*http.Request, error)
- func NewJobsCreateRequestWithBody(server string, params *JobsCreateParams, contentType string, body io.Reader) (*http.Request, error)
- func NewJobsGetOneRequest(server string, id string) (*http.Request, error)
- func NewJobsListRequest(server string, params *JobsListParams) (*http.Request, error)
- func NewJobsPauseRequest(server string, id string) (*http.Request, error)
- func NewJobsRemoveRequest(server string, id string) (*http.Request, error)
- func NewJobsResumeRequest(server string, id string) (*http.Request, error)
- func NewJobsUpdateRequest(server string, id string, body JobsUpdateJSONRequestBody) (*http.Request, error)
- func NewJobsUpdateRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error)
- func NewMaintenanceCreateRequest(server string, body MaintenanceCreateJSONRequestBody) (*http.Request, error)
- func NewMaintenanceCreateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewMaintenanceEndRequest(server string, id int) (*http.Request, error)
- func NewMaintenanceListRequest(server string, params *MaintenanceListParams) (*http.Request, error)
- func NewProjectsCreateRequest(server string, params *ProjectsCreateParams, ...) (*http.Request, error)
- func NewProjectsCreateRequestWithBody(server string, params *ProjectsCreateParams, contentType string, ...) (*http.Request, error)
- func NewProjectsGetOneRequest(server string, id string) (*http.Request, error)
- func NewProjectsListRequest(server string, params *ProjectsListParams) (*http.Request, error)
- func NewProjectsRemoveRequest(server string, id string) (*http.Request, error)
- func NewProjectsUpdateRequest(server string, id string, body ProjectsUpdateJSONRequestBody) (*http.Request, error)
- func NewProjectsUpdateRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error)
- func NewRegionsListRequest(server string) (*http.Request, error)
- func NewStatusPagesListRequest(server string, params *StatusPagesListParams) (*http.Request, error)
- func NewStatusPagesSummaryRequest(server string, id string) (*http.Request, error)
- func NewWhoamiWhoamiRequest(server string) (*http.Request, error)
- func WithIdempotencyKey(ctx context.Context, key string) context.Context
- type APIError
- type AnnouncementImpact
- type AnnouncementListStatus
- type AnnouncementStatus
- type AnnouncementTimelineEntryV1
- type AnnouncementUpdateV1Response
- type AnnouncementV1Page
- type AnnouncementV1Response
- type AnnouncementsAddUpdateJSONRequestBody
- type AnnouncementsAddUpdateResponse
- type AnnouncementsCreateJSONRequestBody
- type AnnouncementsCreateResponse
- type AnnouncementsListParams
- type AnnouncementsListResponse
- type AnnouncementsUpdateJSONRequestBody
- type AnnouncementsUpdateResponse
- type ApiKeyPermission
- type CheckStatus
- type CheckType
- type CheckV1PageResponse
- type CheckV1Response
- type ChecksCreateJSONRequestBody
- type ChecksCreateParams
- type ChecksCreateResponse
- type ChecksGetOneResponse
- type ChecksListParams
- type ChecksListResponse
- type ChecksPauseResponse
- type ChecksRemoveResponse
- type ChecksResumeResponse
- type ChecksUpdateJSONRequestBody
- type ChecksUpdateResponse
- type Client
- func (c *Client) BaseURL() string
- func (c *Client) CheckResponse(rsp *http.Response, body []byte) error
- func (c Client) Format(f fmt.State, _ rune)
- func (c Client) GoString() string
- func (c *Client) ListAllChecks(ctx context.Context, params ChecksListParams) ([]CheckV1Response, error)
- func (c *Client) ListAllJobs(ctx context.Context, params JobsListParams) ([]JobV1Response, error)
- func (c *Client) ListAllProjects(ctx context.Context, params ProjectsListParams) ([]ProjectV1Response, error)
- func (c Client) String() string
- func (c *Client) Whoami(ctx context.Context) (*WhoamiV1Response, error)
- type ClientInterface
- type ClientWithResponses
- func (c *ClientWithResponses) AnnouncementsAddUpdateWithBodyWithResponse(ctx context.Context, id string, announcementId int, contentType string, ...) (*AnnouncementsAddUpdateResponse, error)
- func (c *ClientWithResponses) AnnouncementsAddUpdateWithResponse(ctx context.Context, id string, announcementId int, ...) (*AnnouncementsAddUpdateResponse, error)
- func (c *ClientWithResponses) AnnouncementsCreateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, ...) (*AnnouncementsCreateResponse, error)
- func (c *ClientWithResponses) AnnouncementsCreateWithResponse(ctx context.Context, id string, body AnnouncementsCreateJSONRequestBody, ...) (*AnnouncementsCreateResponse, error)
- func (c *ClientWithResponses) AnnouncementsListWithResponse(ctx context.Context, id string, params *AnnouncementsListParams, ...) (*AnnouncementsListResponse, error)
- func (c *ClientWithResponses) AnnouncementsUpdateWithBodyWithResponse(ctx context.Context, id string, announcementId int, contentType string, ...) (*AnnouncementsUpdateResponse, error)
- func (c *ClientWithResponses) AnnouncementsUpdateWithResponse(ctx context.Context, id string, announcementId int, ...) (*AnnouncementsUpdateResponse, error)
- func (c *ClientWithResponses) ChecksCreateWithBodyWithResponse(ctx context.Context, params *ChecksCreateParams, contentType string, ...) (*ChecksCreateResponse, error)
- func (c *ClientWithResponses) ChecksCreateWithResponse(ctx context.Context, params *ChecksCreateParams, ...) (*ChecksCreateResponse, error)
- func (c *ClientWithResponses) ChecksGetOneWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*ChecksGetOneResponse, error)
- func (c *ClientWithResponses) ChecksListWithResponse(ctx context.Context, params *ChecksListParams, reqEditors ...RequestEditorFn) (*ChecksListResponse, error)
- func (c *ClientWithResponses) ChecksPauseWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*ChecksPauseResponse, error)
- func (c *ClientWithResponses) ChecksRemoveWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*ChecksRemoveResponse, error)
- func (c *ClientWithResponses) ChecksResumeWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*ChecksResumeResponse, error)
- func (c *ClientWithResponses) ChecksUpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, ...) (*ChecksUpdateResponse, error)
- func (c *ClientWithResponses) ChecksUpdateWithResponse(ctx context.Context, id string, body ChecksUpdateJSONRequestBody, ...) (*ChecksUpdateResponse, error)
- func (c *ClientWithResponses) DeploymentsCreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*DeploymentsCreateResponse, error)
- func (c *ClientWithResponses) DeploymentsCreateWithResponse(ctx context.Context, body DeploymentsCreateJSONRequestBody, ...) (*DeploymentsCreateResponse, error)
- func (c *ClientWithResponses) DeploymentsEndWithResponse(ctx context.Context, id int, reqEditors ...RequestEditorFn) (*DeploymentsEndResponse, error)
- func (c *ClientWithResponses) DeploymentsListWithResponse(ctx context.Context, params *DeploymentsListParams, ...) (*DeploymentsListResponse, error)
- func (c *ClientWithResponses) IncidentsAcknowledgeWithResponse(ctx context.Context, id int, reqEditors ...RequestEditorFn) (*IncidentsAcknowledgeResponse, error)
- func (c *ClientWithResponses) IncidentsCreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*IncidentsCreateResponse, error)
- func (c *ClientWithResponses) IncidentsCreateWithResponse(ctx context.Context, body IncidentsCreateJSONRequestBody, ...) (*IncidentsCreateResponse, error)
- func (c *ClientWithResponses) IncidentsGetOneWithResponse(ctx context.Context, id int, reqEditors ...RequestEditorFn) (*IncidentsGetOneResponse, error)
- func (c *ClientWithResponses) IncidentsListWithResponse(ctx context.Context, params *IncidentsListParams, ...) (*IncidentsListResponse, error)
- func (c *ClientWithResponses) IncidentsResolveWithBodyWithResponse(ctx context.Context, id int, contentType string, body io.Reader, ...) (*IncidentsResolveResponse, error)
- func (c *ClientWithResponses) IncidentsResolveWithResponse(ctx context.Context, id int, body IncidentsResolveJSONRequestBody, ...) (*IncidentsResolveResponse, error)
- func (c *ClientWithResponses) JobsCreateWithBodyWithResponse(ctx context.Context, params *JobsCreateParams, contentType string, ...) (*JobsCreateResponse, error)
- func (c *ClientWithResponses) JobsCreateWithResponse(ctx context.Context, params *JobsCreateParams, body JobsCreateJSONRequestBody, ...) (*JobsCreateResponse, error)
- func (c *ClientWithResponses) JobsGetOneWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*JobsGetOneResponse, error)
- func (c *ClientWithResponses) JobsListWithResponse(ctx context.Context, params *JobsListParams, reqEditors ...RequestEditorFn) (*JobsListResponse, error)
- func (c *ClientWithResponses) JobsPauseWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*JobsPauseResponse, error)
- func (c *ClientWithResponses) JobsRemoveWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*JobsRemoveResponse, error)
- func (c *ClientWithResponses) JobsResumeWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*JobsResumeResponse, error)
- func (c *ClientWithResponses) JobsUpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, ...) (*JobsUpdateResponse, error)
- func (c *ClientWithResponses) JobsUpdateWithResponse(ctx context.Context, id string, body JobsUpdateJSONRequestBody, ...) (*JobsUpdateResponse, error)
- func (c *ClientWithResponses) MaintenanceCreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*MaintenanceCreateResponse, error)
- func (c *ClientWithResponses) MaintenanceCreateWithResponse(ctx context.Context, body MaintenanceCreateJSONRequestBody, ...) (*MaintenanceCreateResponse, error)
- func (c *ClientWithResponses) MaintenanceEndWithResponse(ctx context.Context, id int, reqEditors ...RequestEditorFn) (*MaintenanceEndResponse, error)
- func (c *ClientWithResponses) MaintenanceListWithResponse(ctx context.Context, params *MaintenanceListParams, ...) (*MaintenanceListResponse, error)
- func (c *ClientWithResponses) ProjectsCreateWithBodyWithResponse(ctx context.Context, params *ProjectsCreateParams, contentType string, ...) (*ProjectsCreateResponse, error)
- func (c *ClientWithResponses) ProjectsCreateWithResponse(ctx context.Context, params *ProjectsCreateParams, ...) (*ProjectsCreateResponse, error)
- func (c *ClientWithResponses) ProjectsGetOneWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*ProjectsGetOneResponse, error)
- func (c *ClientWithResponses) ProjectsListWithResponse(ctx context.Context, params *ProjectsListParams, reqEditors ...RequestEditorFn) (*ProjectsListResponse, error)
- func (c *ClientWithResponses) ProjectsRemoveWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*ProjectsRemoveResponse, error)
- func (c *ClientWithResponses) ProjectsUpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, ...) (*ProjectsUpdateResponse, error)
- func (c *ClientWithResponses) ProjectsUpdateWithResponse(ctx context.Context, id string, body ProjectsUpdateJSONRequestBody, ...) (*ProjectsUpdateResponse, error)
- func (c *ClientWithResponses) RegionsListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*RegionsListResponse, error)
- func (c *ClientWithResponses) StatusPagesListWithResponse(ctx context.Context, params *StatusPagesListParams, ...) (*StatusPagesListResponse, error)
- func (c *ClientWithResponses) StatusPagesSummaryWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*StatusPagesSummaryResponse, error)
- func (c *ClientWithResponses) WhoamiWhoamiWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*WhoamiWhoamiResponse, error)
- type ClientWithResponsesInterface
- type CreateAnnouncementUpdateV1Dto
- type CreateAnnouncementV1Dto
- type CreateCheckV1Dto
- type CreateDeploymentV1Dto
- type CreateIncidentV1Dto
- type CreateJobV1Dto
- type CreateMaintenanceWindowV1Dto
- type CreateProjectV1Dto
- type DeploymentStatus
- type DeploymentV1Page
- type DeploymentV1Response
- type DeploymentsCreateJSONRequestBody
- type DeploymentsCreateResponse
- type DeploymentsEndResponse
- type DeploymentsListParams
- type DeploymentsListResponse
- type HttpRequestDoer
- type IncidentReason
- type IncidentSeverity
- type IncidentState
- type IncidentV1AcknowledgedUser
- type IncidentV1CheckRef
- type IncidentV1DetailResponse
- type IncidentV1Page
- type IncidentV1Response
- type IncidentsAcknowledgeResponse
- type IncidentsCreateJSONRequestBody
- type IncidentsCreateResponse
- type IncidentsGetOneResponse
- type IncidentsListParams
- type IncidentsListResponse
- type IncidentsResolveJSONRequestBody
- type IncidentsResolveResponse
- type IpFamily
- type JobV1Page
- type JobV1Response
- type JobsCreateJSONRequestBody
- type JobsCreateParams
- type JobsCreateResponse
- type JobsGetOneResponse
- type JobsListParams
- type JobsListResponse
- type JobsPauseResponse
- type JobsRemoveResponse
- type JobsResumeResponse
- type JobsUpdateJSONRequestBody
- type JobsUpdateResponse
- type MaintenanceCreateJSONRequestBody
- type MaintenanceCreateResponse
- type MaintenanceEndResponse
- type MaintenanceListParams
- type MaintenanceListResponse
- type MaintenanceWindowState
- type MaintenanceWindowV1Page
- type MaintenanceWindowV1Response
- type MonitorType
- type Option
- func WithAPIKey(key string) Option
- func WithBaseURL(baseURL string) Option
- func WithHTTPClient(httpClient *http.Client) Option
- func WithMaxAttempts(attempts int) Option
- func WithMaxRetryWait(d time.Duration) Option
- func WithTimeout(timeout time.Duration) Option
- func WithUserAgent(userAgent string) Option
- type OutboundHttpMethod
- type PageFetcher
- type PrincipalKind
- type ProjectV1Page
- type ProjectV1Response
- type ProjectsCreateJSONRequestBody
- type ProjectsCreateParams
- type ProjectsCreateResponse
- type ProjectsGetOneResponse
- type ProjectsListParams
- type ProjectsListResponse
- type ProjectsRemoveResponse
- type ProjectsUpdateJSONRequestBody
- type ProjectsUpdateResponse
- type RawClient
- func (c *RawClient) AnnouncementsAddUpdate(ctx context.Context, id string, announcementId int, ...) (*http.Response, error)
- func (c *RawClient) AnnouncementsAddUpdateWithBody(ctx context.Context, id string, announcementId int, contentType string, ...) (*http.Response, error)
- func (c *RawClient) AnnouncementsCreate(ctx context.Context, id string, body AnnouncementsCreateJSONRequestBody, ...) (*http.Response, error)
- func (c *RawClient) AnnouncementsCreateWithBody(ctx context.Context, id string, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *RawClient) AnnouncementsList(ctx context.Context, id string, params *AnnouncementsListParams, ...) (*http.Response, error)
- func (c *RawClient) AnnouncementsUpdate(ctx context.Context, id string, announcementId int, ...) (*http.Response, error)
- func (c *RawClient) AnnouncementsUpdateWithBody(ctx context.Context, id string, announcementId int, contentType string, ...) (*http.Response, error)
- func (c *RawClient) ChecksCreate(ctx context.Context, params *ChecksCreateParams, ...) (*http.Response, error)
- func (c *RawClient) ChecksCreateWithBody(ctx context.Context, params *ChecksCreateParams, contentType string, ...) (*http.Response, error)
- func (c *RawClient) ChecksGetOne(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *RawClient) ChecksList(ctx context.Context, params *ChecksListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *RawClient) ChecksPause(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *RawClient) ChecksRemove(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *RawClient) ChecksResume(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *RawClient) ChecksUpdate(ctx context.Context, id string, body ChecksUpdateJSONRequestBody, ...) (*http.Response, error)
- func (c *RawClient) ChecksUpdateWithBody(ctx context.Context, id string, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *RawClient) DeploymentsCreate(ctx context.Context, body DeploymentsCreateJSONRequestBody, ...) (*http.Response, error)
- func (c *RawClient) DeploymentsCreateWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *RawClient) DeploymentsEnd(ctx context.Context, id int, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *RawClient) DeploymentsList(ctx context.Context, params *DeploymentsListParams, ...) (*http.Response, error)
- func (c *RawClient) IncidentsAcknowledge(ctx context.Context, id int, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *RawClient) IncidentsCreate(ctx context.Context, body IncidentsCreateJSONRequestBody, ...) (*http.Response, error)
- func (c *RawClient) IncidentsCreateWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *RawClient) IncidentsGetOne(ctx context.Context, id int, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *RawClient) IncidentsList(ctx context.Context, params *IncidentsListParams, ...) (*http.Response, error)
- func (c *RawClient) IncidentsResolve(ctx context.Context, id int, body IncidentsResolveJSONRequestBody, ...) (*http.Response, error)
- func (c *RawClient) IncidentsResolveWithBody(ctx context.Context, id int, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *RawClient) JobsCreate(ctx context.Context, params *JobsCreateParams, body JobsCreateJSONRequestBody, ...) (*http.Response, error)
- func (c *RawClient) JobsCreateWithBody(ctx context.Context, params *JobsCreateParams, contentType string, ...) (*http.Response, error)
- func (c *RawClient) JobsGetOne(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *RawClient) JobsList(ctx context.Context, params *JobsListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *RawClient) JobsPause(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *RawClient) JobsRemove(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *RawClient) JobsResume(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *RawClient) JobsUpdate(ctx context.Context, id string, body JobsUpdateJSONRequestBody, ...) (*http.Response, error)
- func (c *RawClient) JobsUpdateWithBody(ctx context.Context, id string, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *RawClient) MaintenanceCreate(ctx context.Context, body MaintenanceCreateJSONRequestBody, ...) (*http.Response, error)
- func (c *RawClient) MaintenanceCreateWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *RawClient) MaintenanceEnd(ctx context.Context, id int, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *RawClient) MaintenanceList(ctx context.Context, params *MaintenanceListParams, ...) (*http.Response, error)
- func (c *RawClient) ProjectsCreate(ctx context.Context, params *ProjectsCreateParams, ...) (*http.Response, error)
- func (c *RawClient) ProjectsCreateWithBody(ctx context.Context, params *ProjectsCreateParams, contentType string, ...) (*http.Response, error)
- func (c *RawClient) ProjectsGetOne(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *RawClient) ProjectsList(ctx context.Context, params *ProjectsListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *RawClient) ProjectsRemove(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *RawClient) ProjectsUpdate(ctx context.Context, id string, body ProjectsUpdateJSONRequestBody, ...) (*http.Response, error)
- func (c *RawClient) ProjectsUpdateWithBody(ctx context.Context, id string, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *RawClient) RegionsList(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *RawClient) StatusPagesList(ctx context.Context, params *StatusPagesListParams, ...) (*http.Response, error)
- func (c *RawClient) StatusPagesSummary(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *RawClient) WhoamiWhoami(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- type RawClientOption
- type RegionV1Response
- type RegionsListResponse
- type RequestEditorFn
- type ResolveIncidentV1Dto
- type StatusPageV1Page
- type StatusPageV1Response
- type StatusPageVisibility
- type StatusPagesListParams
- type StatusPagesListResponse
- type StatusPagesSummaryResponse
- type UpdateAnnouncementV1Dto
- type UpdateCheckV1Dto
- type UpdateJobV1Dto
- type UpdateProjectV1Dto
- type V1ErrorResponse
- type V1ErrorResponseMessage0
- type V1ErrorResponseMessage1
- type V1ErrorResponse_Message
- func (t V1ErrorResponse_Message) AsV1ErrorResponseMessage0() (V1ErrorResponseMessage0, error)
- func (t V1ErrorResponse_Message) AsV1ErrorResponseMessage1() (V1ErrorResponseMessage1, error)
- func (t *V1ErrorResponse_Message) FromV1ErrorResponseMessage0(v V1ErrorResponseMessage0) error
- func (t *V1ErrorResponse_Message) FromV1ErrorResponseMessage1(v V1ErrorResponseMessage1) error
- func (t V1ErrorResponse_Message) MarshalJSON() ([]byte, error)
- func (t *V1ErrorResponse_Message) MergeV1ErrorResponseMessage0(v V1ErrorResponseMessage0) error
- func (t *V1ErrorResponse_Message) MergeV1ErrorResponseMessage1(v V1ErrorResponseMessage1) error
- func (t *V1ErrorResponse_Message) UnmarshalJSON(b []byte) error
- type V1HttpCheckConfigDto
- type V1HttpCheckConfigPatchDto
- type V1HttpCheckConfigResponse
- type V1RateLimitResponse
- type V1RateLimitResponseMessage0
- type V1RateLimitResponseMessage1
- type V1RateLimitResponse_Message
- func (t V1RateLimitResponse_Message) AsV1RateLimitResponseMessage0() (V1RateLimitResponseMessage0, error)
- func (t V1RateLimitResponse_Message) AsV1RateLimitResponseMessage1() (V1RateLimitResponseMessage1, error)
- func (t *V1RateLimitResponse_Message) FromV1RateLimitResponseMessage0(v V1RateLimitResponseMessage0) error
- func (t *V1RateLimitResponse_Message) FromV1RateLimitResponseMessage1(v V1RateLimitResponseMessage1) error
- func (t V1RateLimitResponse_Message) MarshalJSON() ([]byte, error)
- func (t *V1RateLimitResponse_Message) MergeV1RateLimitResponseMessage0(v V1RateLimitResponseMessage0) error
- func (t *V1RateLimitResponse_Message) MergeV1RateLimitResponseMessage1(v V1RateLimitResponseMessage1) error
- func (t *V1RateLimitResponse_Message) UnmarshalJSON(b []byte) error
- type V1RateLimitScope
- type WhoamiV1Response
- type WhoamiWhoamiResponse
- type WorkspacePlan
- type WorkspaceRole
Examples ¶
Constants ¶
const ( // Version is this module's release version, sent in the default User-Agent. Version = "0.1.0" // DefaultBaseURL is the Integration API base URL. The generated operation // paths (`/v1/...`) are appended to it. DefaultBaseURL = "https://api.ionhour.com/api" // DefaultTimeout bounds every HTTP attempt (not the whole retried call). DefaultTimeout = 30 * time.Second // DefaultMaxAttempts is the total number of attempts per request. DefaultMaxAttempts = 3 // DefaultMaxRetryWait caps how long the client will sleep on a 429 // Retry-After before giving up and returning the 429 to the caller. DefaultMaxRetryWait = 60 * time.Second // EnvAPIKey is read when no [WithAPIKey] option is given. EnvAPIKey = "IONHOUR_API_KEY" // EnvBaseURL is read when no [WithBaseURL] option is given. It is distinct // from the heartbeat SDK's IONHOUR_BASE_URL, which points at the signal // host rather than the API host. EnvBaseURL = "IONHOUR_API_BASE_URL" )
const (
BearerScopes = "bearer.Scopes"
)
Variables ¶
var ( // ErrMissingAPIKey is returned by [NewClient] when neither [WithAPIKey] nor // IONHOUR_API_KEY provides a non-blank key. ErrMissingAPIKey = errors.New("ionhour api: no API key (use WithAPIKey or set " + EnvAPIKey + ")") // ErrInvalidAPIKey is returned by [NewClient] when the (trimmed) key // contains a space, a control character or DEL. The key is never echoed. ErrInvalidAPIKey = errors.New("ionhour api: API key contains whitespace or control characters") // ErrInvalidBaseURL is returned by [NewClient] for a base URL that is not // an absolute http(s) URL, or that carries userinfo, a query or a fragment. ErrInvalidBaseURL = errors.New("ionhour api: invalid base URL") )
var ( // ErrInvalidIdempotencyKey is returned (before any request is sent) when an // idempotency key is not 1-128 printable ASCII characters without spaces, // the server's `^[\x21-\x7E]{1,128}$` rule. ErrInvalidIdempotencyKey = errors.New("ionhour api: idempotency key must be 1-128 printable ASCII characters without spaces") // ErrIdempotencyKeyNotSupported is returned (before any request is sent) // when [IdempotencyKeyEditor] is used on an operation other than // checks_create, jobs_create or projects_create. ErrIdempotencyKeyNotSupported = errors.New("ionhour api: Idempotency-Key is only honoured by checks_create, jobs_create and projects_create") )
var ErrTooManyPages = errors.New("ionhour api: list exceeded the page limit")
ErrTooManyPages is returned by ListAll when a listing claims more than maxListPages pages.
Functions ¶
func IsConflict ¶
IsConflict reports whether err is a 409 *APIError (SLUG_TAKEN, IDEMPOTENCY_KEY_IN_PROGRESS, non-empty project delete, ...).
func IsForbidden ¶
IsForbidden reports whether err is a 403 *APIError (valid credential that may not perform the call: read-only key, scope, role, plan limit, ...).
func IsNotFound ¶
IsNotFound reports whether err is a 404 *APIError (unknown id or slug, soft-deleted resource, or a resource outside the key's workspace).
func IsRateLimited ¶
IsRateLimited reports whether err is a 429 *APIError. Its RetryAfter field says how long to wait.
func IsUnauthorized ¶
IsUnauthorized reports whether err is a 401 *APIError (missing, invalid, expired or inactive credential).
func ListAll ¶
func ListAll[T any](ctx context.Context, fetch PageFetcher[T]) ([]T, error)
ListAll walks the flat v1 pagination (`{items, total, page, itemCount, pageCount, limit}`) from page 1 and returns every item in order. It stops at pageCount, on an empty page, on the first error (returning no partial result) or when ctx ends. Use it for any list endpoint; Client.ListAllChecks, Client.ListAllJobs and Client.ListAllProjects wrap the common ones.
func NewAnnouncementsAddUpdateRequest ¶
func NewAnnouncementsAddUpdateRequest(server string, id string, announcementId int, body AnnouncementsAddUpdateJSONRequestBody) (*http.Request, error)
NewAnnouncementsAddUpdateRequest calls the generic AnnouncementsAddUpdate builder with application/json body
func NewAnnouncementsAddUpdateRequestWithBody ¶
func NewAnnouncementsAddUpdateRequestWithBody(server string, id string, announcementId int, contentType string, body io.Reader) (*http.Request, error)
NewAnnouncementsAddUpdateRequestWithBody generates requests for AnnouncementsAddUpdate with any type of body
func NewAnnouncementsCreateRequest ¶
func NewAnnouncementsCreateRequest(server string, id string, body AnnouncementsCreateJSONRequestBody) (*http.Request, error)
NewAnnouncementsCreateRequest calls the generic AnnouncementsCreate builder with application/json body
func NewAnnouncementsCreateRequestWithBody ¶
func NewAnnouncementsCreateRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error)
NewAnnouncementsCreateRequestWithBody generates requests for AnnouncementsCreate with any type of body
func NewAnnouncementsListRequest ¶
func NewAnnouncementsListRequest(server string, id string, params *AnnouncementsListParams) (*http.Request, error)
NewAnnouncementsListRequest generates requests for AnnouncementsList
func NewAnnouncementsUpdateRequest ¶
func NewAnnouncementsUpdateRequest(server string, id string, announcementId int, body AnnouncementsUpdateJSONRequestBody) (*http.Request, error)
NewAnnouncementsUpdateRequest calls the generic AnnouncementsUpdate builder with application/json body
func NewAnnouncementsUpdateRequestWithBody ¶
func NewAnnouncementsUpdateRequestWithBody(server string, id string, announcementId int, contentType string, body io.Reader) (*http.Request, error)
NewAnnouncementsUpdateRequestWithBody generates requests for AnnouncementsUpdate with any type of body
func NewChecksCreateRequest ¶
func NewChecksCreateRequest(server string, params *ChecksCreateParams, body ChecksCreateJSONRequestBody) (*http.Request, error)
NewChecksCreateRequest calls the generic ChecksCreate builder with application/json body
func NewChecksCreateRequestWithBody ¶
func NewChecksCreateRequestWithBody(server string, params *ChecksCreateParams, contentType string, body io.Reader) (*http.Request, error)
NewChecksCreateRequestWithBody generates requests for ChecksCreate with any type of body
func NewChecksGetOneRequest ¶
NewChecksGetOneRequest generates requests for ChecksGetOne
func NewChecksListRequest ¶
func NewChecksListRequest(server string, params *ChecksListParams) (*http.Request, error)
NewChecksListRequest generates requests for ChecksList
func NewChecksPauseRequest ¶
NewChecksPauseRequest generates requests for ChecksPause
func NewChecksRemoveRequest ¶
NewChecksRemoveRequest generates requests for ChecksRemove
func NewChecksResumeRequest ¶
NewChecksResumeRequest generates requests for ChecksResume
func NewChecksUpdateRequest ¶
func NewChecksUpdateRequest(server string, id string, body ChecksUpdateJSONRequestBody) (*http.Request, error)
NewChecksUpdateRequest calls the generic ChecksUpdate builder with application/json body
func NewChecksUpdateRequestWithBody ¶
func NewChecksUpdateRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error)
NewChecksUpdateRequestWithBody generates requests for ChecksUpdate with any type of body
func NewDeploymentsCreateRequest ¶
func NewDeploymentsCreateRequest(server string, body DeploymentsCreateJSONRequestBody) (*http.Request, error)
NewDeploymentsCreateRequest calls the generic DeploymentsCreate builder with application/json body
func NewDeploymentsCreateRequestWithBody ¶
func NewDeploymentsCreateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewDeploymentsCreateRequestWithBody generates requests for DeploymentsCreate with any type of body
func NewDeploymentsEndRequest ¶
NewDeploymentsEndRequest generates requests for DeploymentsEnd
func NewDeploymentsListRequest ¶
func NewDeploymentsListRequest(server string, params *DeploymentsListParams) (*http.Request, error)
NewDeploymentsListRequest generates requests for DeploymentsList
func NewIdempotencyKey ¶
NewIdempotencyKey returns a random UUIDv4 (crypto/rand) for use as an idempotency key. It fails only if the system random source does.
func NewIncidentsAcknowledgeRequest ¶
NewIncidentsAcknowledgeRequest generates requests for IncidentsAcknowledge
func NewIncidentsCreateRequest ¶
func NewIncidentsCreateRequest(server string, body IncidentsCreateJSONRequestBody) (*http.Request, error)
NewIncidentsCreateRequest calls the generic IncidentsCreate builder with application/json body
func NewIncidentsCreateRequestWithBody ¶
func NewIncidentsCreateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewIncidentsCreateRequestWithBody generates requests for IncidentsCreate with any type of body
func NewIncidentsGetOneRequest ¶
NewIncidentsGetOneRequest generates requests for IncidentsGetOne
func NewIncidentsListRequest ¶
func NewIncidentsListRequest(server string, params *IncidentsListParams) (*http.Request, error)
NewIncidentsListRequest generates requests for IncidentsList
func NewIncidentsResolveRequest ¶
func NewIncidentsResolveRequest(server string, id int, body IncidentsResolveJSONRequestBody) (*http.Request, error)
NewIncidentsResolveRequest calls the generic IncidentsResolve builder with application/json body
func NewIncidentsResolveRequestWithBody ¶
func NewIncidentsResolveRequestWithBody(server string, id int, contentType string, body io.Reader) (*http.Request, error)
NewIncidentsResolveRequestWithBody generates requests for IncidentsResolve with any type of body
func NewJobsCreateRequest ¶
func NewJobsCreateRequest(server string, params *JobsCreateParams, body JobsCreateJSONRequestBody) (*http.Request, error)
NewJobsCreateRequest calls the generic JobsCreate builder with application/json body
func NewJobsCreateRequestWithBody ¶
func NewJobsCreateRequestWithBody(server string, params *JobsCreateParams, contentType string, body io.Reader) (*http.Request, error)
NewJobsCreateRequestWithBody generates requests for JobsCreate with any type of body
func NewJobsGetOneRequest ¶
NewJobsGetOneRequest generates requests for JobsGetOne
func NewJobsListRequest ¶
func NewJobsListRequest(server string, params *JobsListParams) (*http.Request, error)
NewJobsListRequest generates requests for JobsList
func NewJobsPauseRequest ¶
NewJobsPauseRequest generates requests for JobsPause
func NewJobsRemoveRequest ¶
NewJobsRemoveRequest generates requests for JobsRemove
func NewJobsResumeRequest ¶
NewJobsResumeRequest generates requests for JobsResume
func NewJobsUpdateRequest ¶
func NewJobsUpdateRequest(server string, id string, body JobsUpdateJSONRequestBody) (*http.Request, error)
NewJobsUpdateRequest calls the generic JobsUpdate builder with application/json body
func NewJobsUpdateRequestWithBody ¶
func NewJobsUpdateRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error)
NewJobsUpdateRequestWithBody generates requests for JobsUpdate with any type of body
func NewMaintenanceCreateRequest ¶
func NewMaintenanceCreateRequest(server string, body MaintenanceCreateJSONRequestBody) (*http.Request, error)
NewMaintenanceCreateRequest calls the generic MaintenanceCreate builder with application/json body
func NewMaintenanceCreateRequestWithBody ¶
func NewMaintenanceCreateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewMaintenanceCreateRequestWithBody generates requests for MaintenanceCreate with any type of body
func NewMaintenanceEndRequest ¶
NewMaintenanceEndRequest generates requests for MaintenanceEnd
func NewMaintenanceListRequest ¶
func NewMaintenanceListRequest(server string, params *MaintenanceListParams) (*http.Request, error)
NewMaintenanceListRequest generates requests for MaintenanceList
func NewProjectsCreateRequest ¶
func NewProjectsCreateRequest(server string, params *ProjectsCreateParams, body ProjectsCreateJSONRequestBody) (*http.Request, error)
NewProjectsCreateRequest calls the generic ProjectsCreate builder with application/json body
func NewProjectsCreateRequestWithBody ¶
func NewProjectsCreateRequestWithBody(server string, params *ProjectsCreateParams, contentType string, body io.Reader) (*http.Request, error)
NewProjectsCreateRequestWithBody generates requests for ProjectsCreate with any type of body
func NewProjectsGetOneRequest ¶
NewProjectsGetOneRequest generates requests for ProjectsGetOne
func NewProjectsListRequest ¶
func NewProjectsListRequest(server string, params *ProjectsListParams) (*http.Request, error)
NewProjectsListRequest generates requests for ProjectsList
func NewProjectsRemoveRequest ¶
NewProjectsRemoveRequest generates requests for ProjectsRemove
func NewProjectsUpdateRequest ¶
func NewProjectsUpdateRequest(server string, id string, body ProjectsUpdateJSONRequestBody) (*http.Request, error)
NewProjectsUpdateRequest calls the generic ProjectsUpdate builder with application/json body
func NewProjectsUpdateRequestWithBody ¶
func NewProjectsUpdateRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error)
NewProjectsUpdateRequestWithBody generates requests for ProjectsUpdate with any type of body
func NewRegionsListRequest ¶
NewRegionsListRequest generates requests for RegionsList
func NewStatusPagesListRequest ¶
func NewStatusPagesListRequest(server string, params *StatusPagesListParams) (*http.Request, error)
NewStatusPagesListRequest generates requests for StatusPagesList
func NewStatusPagesSummaryRequest ¶
NewStatusPagesSummaryRequest generates requests for StatusPagesSummary
func NewWhoamiWhoamiRequest ¶
NewWhoamiWhoamiRequest generates requests for WhoamiWhoami
func WithIdempotencyKey ¶
WithIdempotencyKey returns a context whose key the client sends as `Idempotency-Key` on checks_create, jobs_create and projects_create, the only operations that honour it. Other operations made with the context ignore it. A retry with the same key and body replays the original result for 24 hours. An explicit Params.IdempotencyKey takes precedence.
You only need this to reuse one key across your OWN retries of a logical create: when no key is given, the client mints one per call (see NewClient).
Types ¶
type APIError ¶
type APIError struct {
// Status is the HTTP status code.
Status int
// Code is the stable machine-readable code (NOT_FOUND, SLUG_TAKEN,
// RATE_LIMIT_EXCEEDED_KEY, ...). When the body is not the v1 envelope (for
// example an HTML 502 from a proxy) it is "HTTP_<status>" and Message is
// "HTTP <status>", the same convention as the Node client.
Code string
// Message is the human-readable message. Validation failures carry a list,
// joined here with "; " and kept verbatim in Messages.
Message string
// Messages is the message list for validation failures; nil otherwise.
Messages []string
// Detail is the structured context the server attaches (plan limits,
// rate-limit scope, ...): the envelope's `detail` when it is a JSON
// object, otherwise the envelope's extra top-level fields. Nil when absent.
Detail map[string]any
// RetryAfter is the parsed Retry-After header (429 / 503); zero when absent.
RetryAfter time.Duration
}
APIError is a non-2xx response from the Integration API, parsed from the v1 envelope `{statusCode, error, code, message, detail?}`.
type AnnouncementImpact ¶
type AnnouncementImpact string
AnnouncementImpact defines model for AnnouncementImpact.
const ( AnnouncementImpactCRITICAL AnnouncementImpact = "CRITICAL" AnnouncementImpactMAJOR AnnouncementImpact = "MAJOR" AnnouncementImpactMINOR AnnouncementImpact = "MINOR" AnnouncementImpactNONE AnnouncementImpact = "NONE" )
Defines values for AnnouncementImpact.
type AnnouncementListStatus ¶
type AnnouncementListStatus string
AnnouncementListStatus defines model for AnnouncementListStatus.
const ( AnnouncementListStatusOpen AnnouncementListStatus = "open" AnnouncementListStatusResolved AnnouncementListStatus = "resolved" )
Defines values for AnnouncementListStatus.
type AnnouncementStatus ¶
type AnnouncementStatus string
AnnouncementStatus defines model for AnnouncementStatus.
const ( AnnouncementStatusIDENTIFIED AnnouncementStatus = "IDENTIFIED" AnnouncementStatusINVESTIGATING AnnouncementStatus = "INVESTIGATING" AnnouncementStatusMONITORING AnnouncementStatus = "MONITORING" AnnouncementStatusRESOLVED AnnouncementStatus = "RESOLVED" )
Defines values for AnnouncementStatus.
type AnnouncementTimelineEntryV1 ¶
type AnnouncementTimelineEntryV1 struct {
Body string `json:"body"`
CreatedAt time.Time `json:"createdAt"`
Id int `json:"id"`
Status nullable.Nullable[AnnouncementStatus] `json:"status"`
}
AnnouncementTimelineEntryV1 defines model for AnnouncementTimelineEntryV1.
type AnnouncementUpdateV1Response ¶
type AnnouncementUpdateV1Response struct {
AnnouncementId int `json:"announcementId"`
Body string `json:"body"`
CreatedAt time.Time `json:"createdAt"`
Id int `json:"id"`
Status nullable.Nullable[AnnouncementStatus] `json:"status"`
}
AnnouncementUpdateV1Response defines model for AnnouncementUpdateV1Response.
type AnnouncementV1Page ¶
type AnnouncementV1Page struct {
ItemCount int `json:"itemCount"`
Items []AnnouncementV1Response `json:"items"`
Limit int `json:"limit"`
Page int `json:"page"`
PageCount int `json:"pageCount"`
Total int `json:"total"`
}
AnnouncementV1Page defines model for AnnouncementV1Page.
type AnnouncementV1Response ¶
type AnnouncementV1Response struct {
ComponentIds []int `json:"componentIds"`
CreatedAt time.Time `json:"createdAt"`
Id int `json:"id"`
Impact nullable.Nullable[AnnouncementImpact] `json:"impact"`
// PublicId Stable public identifier (lower-case ULID).
PublicId string `json:"publicId"`
ResolvedAt nullable.Nullable[time.Time] `json:"resolvedAt"`
Status AnnouncementStatus `json:"status"`
StatusPageId int `json:"statusPageId"`
Title string `json:"title"`
Updates []AnnouncementTimelineEntryV1 `json:"updates"`
}
AnnouncementV1Response defines model for AnnouncementV1Response.
type AnnouncementsAddUpdateJSONRequestBody ¶
type AnnouncementsAddUpdateJSONRequestBody = CreateAnnouncementUpdateV1Dto
AnnouncementsAddUpdateJSONRequestBody defines body for AnnouncementsAddUpdate for application/json ContentType.
type AnnouncementsAddUpdateResponse ¶
type AnnouncementsAddUpdateResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *AnnouncementUpdateV1Response
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON404 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseAnnouncementsAddUpdateResponse ¶
func ParseAnnouncementsAddUpdateResponse(rsp *http.Response) (*AnnouncementsAddUpdateResponse, error)
ParseAnnouncementsAddUpdateResponse parses an HTTP response from a AnnouncementsAddUpdateWithResponse call
func (AnnouncementsAddUpdateResponse) Status ¶
func (r AnnouncementsAddUpdateResponse) Status() string
Status returns HTTPResponse.Status
func (AnnouncementsAddUpdateResponse) StatusCode ¶
func (r AnnouncementsAddUpdateResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type AnnouncementsCreateJSONRequestBody ¶
type AnnouncementsCreateJSONRequestBody = CreateAnnouncementV1Dto
AnnouncementsCreateJSONRequestBody defines body for AnnouncementsCreate for application/json ContentType.
type AnnouncementsCreateResponse ¶
type AnnouncementsCreateResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *AnnouncementV1Response
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON404 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseAnnouncementsCreateResponse ¶
func ParseAnnouncementsCreateResponse(rsp *http.Response) (*AnnouncementsCreateResponse, error)
ParseAnnouncementsCreateResponse parses an HTTP response from a AnnouncementsCreateWithResponse call
func (AnnouncementsCreateResponse) Status ¶
func (r AnnouncementsCreateResponse) Status() string
Status returns HTTPResponse.Status
func (AnnouncementsCreateResponse) StatusCode ¶
func (r AnnouncementsCreateResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type AnnouncementsListParams ¶
type AnnouncementsListParams struct {
Page *int `form:"page,omitempty" json:"page,omitempty"`
// Limit Page size; values above 100 are clamped to 100.
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
// Status `open` = not yet resolved; `resolved` = resolved.
Status *AnnouncementListStatus `form:"status,omitempty" json:"status,omitempty"`
}
AnnouncementsListParams defines parameters for AnnouncementsList.
type AnnouncementsListResponse ¶
type AnnouncementsListResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *AnnouncementV1Page
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON404 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseAnnouncementsListResponse ¶
func ParseAnnouncementsListResponse(rsp *http.Response) (*AnnouncementsListResponse, error)
ParseAnnouncementsListResponse parses an HTTP response from a AnnouncementsListWithResponse call
func (AnnouncementsListResponse) Status ¶
func (r AnnouncementsListResponse) Status() string
Status returns HTTPResponse.Status
func (AnnouncementsListResponse) StatusCode ¶
func (r AnnouncementsListResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type AnnouncementsUpdateJSONRequestBody ¶
type AnnouncementsUpdateJSONRequestBody = UpdateAnnouncementV1Dto
AnnouncementsUpdateJSONRequestBody defines body for AnnouncementsUpdate for application/json ContentType.
type AnnouncementsUpdateResponse ¶
type AnnouncementsUpdateResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *AnnouncementV1Response
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON404 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseAnnouncementsUpdateResponse ¶
func ParseAnnouncementsUpdateResponse(rsp *http.Response) (*AnnouncementsUpdateResponse, error)
ParseAnnouncementsUpdateResponse parses an HTTP response from a AnnouncementsUpdateWithResponse call
func (AnnouncementsUpdateResponse) Status ¶
func (r AnnouncementsUpdateResponse) Status() string
Status returns HTTPResponse.Status
func (AnnouncementsUpdateResponse) StatusCode ¶
func (r AnnouncementsUpdateResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ApiKeyPermission ¶
type ApiKeyPermission string
ApiKeyPermission defines model for ApiKeyPermission.
const ( ApiKeyPermissionReadOnly ApiKeyPermission = "read_only" ApiKeyPermissionReadWrite ApiKeyPermission = "read_write" )
Defines values for ApiKeyPermission.
type CheckStatus ¶
type CheckStatus string
CheckStatus defines model for CheckStatus.
const ( CheckStatusDOWN CheckStatus = "DOWN" CheckStatusLATE CheckStatus = "LATE" CheckStatusNEW CheckStatus = "NEW" CheckStatusOK CheckStatus = "OK" CheckStatusPAUSED CheckStatus = "PAUSED" CheckStatusRESUMED CheckStatus = "RESUMED" )
Defines values for CheckStatus.
type CheckV1PageResponse ¶
type CheckV1PageResponse struct {
ItemCount int `json:"itemCount"`
Items []CheckV1Response `json:"items"`
Limit int `json:"limit"`
Page int `json:"page"`
PageCount int `json:"pageCount"`
Total int `json:"total"`
}
CheckV1PageResponse defines model for CheckV1PageResponse.
type CheckV1Response ¶
type CheckV1Response struct {
CheckType CheckType `json:"checkType"`
// Config Probe configuration. null only if the check has no live probe config (an inconsistency, never produced by v1 writes).
Config nullable.Nullable[V1HttpCheckConfigResponse] `json:"config"`
CreatedAt time.Time `json:"createdAt"`
DownSeverity IncidentSeverity `json:"downSeverity"`
GraceSeconds int `json:"graceSeconds"`
Id int `json:"id"`
IntervalSeconds int `json:"intervalSeconds"`
LateSeverity IncidentSeverity `json:"lateSeverity"`
MuteNotifications bool `json:"muteNotifications"`
Name string `json:"name"`
// Paused status === PAUSED. Change it with /pause and /resume.
Paused bool `json:"paused"`
ProjectId int `json:"projectId"`
Slug nullable.Nullable[string] `json:"slug"`
Status CheckStatus `json:"status"`
UpdatedAt time.Time `json:"updatedAt"`
}
CheckV1Response defines model for CheckV1Response.
type ChecksCreateJSONRequestBody ¶
type ChecksCreateJSONRequestBody = CreateCheckV1Dto
ChecksCreateJSONRequestBody defines body for ChecksCreate for application/json ContentType.
type ChecksCreateParams ¶
type ChecksCreateParams struct {
// IdempotencyKey Optional client-chosen key (1-128 printable ASCII characters, no spaces) that makes this create safe to retry. Scoped to the workspace, the calling credential and this route, and remembered for 24 hours. A retry with the same key and body returns the original status and the current state of the created resource with `Idempotency-Replayed: true`; the same key with a different body is rejected.
IdempotencyKey *string `json:"Idempotency-Key,omitempty"`
}
ChecksCreateParams defines parameters for ChecksCreate.
type ChecksCreateResponse ¶
type ChecksCreateResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *CheckV1Response
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON404 *V1ErrorResponse
JSON409 *V1ErrorResponse
JSON422 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseChecksCreateResponse ¶
func ParseChecksCreateResponse(rsp *http.Response) (*ChecksCreateResponse, error)
ParseChecksCreateResponse parses an HTTP response from a ChecksCreateWithResponse call
func (ChecksCreateResponse) Status ¶
func (r ChecksCreateResponse) Status() string
Status returns HTTPResponse.Status
func (ChecksCreateResponse) StatusCode ¶
func (r ChecksCreateResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ChecksGetOneResponse ¶
type ChecksGetOneResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *CheckV1Response
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON404 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseChecksGetOneResponse ¶
func ParseChecksGetOneResponse(rsp *http.Response) (*ChecksGetOneResponse, error)
ParseChecksGetOneResponse parses an HTTP response from a ChecksGetOneWithResponse call
func (ChecksGetOneResponse) Status ¶
func (r ChecksGetOneResponse) Status() string
Status returns HTTPResponse.Status
func (ChecksGetOneResponse) StatusCode ¶
func (r ChecksGetOneResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ChecksListParams ¶
type ChecksListParams struct {
Page *int `form:"page,omitempty" json:"page,omitempty"`
// Limit Page size; values above 100 are clamped to 100.
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
ProjectId *int `form:"projectId,omitempty" json:"projectId,omitempty"`
CheckType *CheckType `form:"checkType,omitempty" json:"checkType,omitempty"`
Status *CheckStatus `form:"status,omitempty" json:"status,omitempty"`
Slug *string `form:"slug,omitempty" json:"slug,omitempty"`
}
ChecksListParams defines parameters for ChecksList.
type ChecksListResponse ¶
type ChecksListResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *CheckV1PageResponse
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseChecksListResponse ¶
func ParseChecksListResponse(rsp *http.Response) (*ChecksListResponse, error)
ParseChecksListResponse parses an HTTP response from a ChecksListWithResponse call
func (ChecksListResponse) Status ¶
func (r ChecksListResponse) Status() string
Status returns HTTPResponse.Status
func (ChecksListResponse) StatusCode ¶
func (r ChecksListResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ChecksPauseResponse ¶
type ChecksPauseResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *CheckV1Response
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON404 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseChecksPauseResponse ¶
func ParseChecksPauseResponse(rsp *http.Response) (*ChecksPauseResponse, error)
ParseChecksPauseResponse parses an HTTP response from a ChecksPauseWithResponse call
func (ChecksPauseResponse) Status ¶
func (r ChecksPauseResponse) Status() string
Status returns HTTPResponse.Status
func (ChecksPauseResponse) StatusCode ¶
func (r ChecksPauseResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ChecksRemoveResponse ¶
type ChecksRemoveResponse struct {
Body []byte
HTTPResponse *http.Response
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON404 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseChecksRemoveResponse ¶
func ParseChecksRemoveResponse(rsp *http.Response) (*ChecksRemoveResponse, error)
ParseChecksRemoveResponse parses an HTTP response from a ChecksRemoveWithResponse call
func (ChecksRemoveResponse) Status ¶
func (r ChecksRemoveResponse) Status() string
Status returns HTTPResponse.Status
func (ChecksRemoveResponse) StatusCode ¶
func (r ChecksRemoveResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ChecksResumeResponse ¶
type ChecksResumeResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *CheckV1Response
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON404 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseChecksResumeResponse ¶
func ParseChecksResumeResponse(rsp *http.Response) (*ChecksResumeResponse, error)
ParseChecksResumeResponse parses an HTTP response from a ChecksResumeWithResponse call
func (ChecksResumeResponse) Status ¶
func (r ChecksResumeResponse) Status() string
Status returns HTTPResponse.Status
func (ChecksResumeResponse) StatusCode ¶
func (r ChecksResumeResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ChecksUpdateJSONRequestBody ¶
type ChecksUpdateJSONRequestBody = UpdateCheckV1Dto
ChecksUpdateJSONRequestBody defines body for ChecksUpdate for application/json ContentType.
type ChecksUpdateResponse ¶
type ChecksUpdateResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *CheckV1Response
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON404 *V1ErrorResponse
JSON409 *V1ErrorResponse
JSON422 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseChecksUpdateResponse ¶
func ParseChecksUpdateResponse(rsp *http.Response) (*ChecksUpdateResponse, error)
ParseChecksUpdateResponse parses an HTTP response from a ChecksUpdateWithResponse call
func (ChecksUpdateResponse) Status ¶
func (r ChecksUpdateResponse) Status() string
Status returns HTTPResponse.Status
func (ChecksUpdateResponse) StatusCode ¶
func (r ChecksUpdateResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Client ¶
type Client struct {
*ClientWithResponses
// contains filtered or unexported fields
}
Client is the Ionhour Integration API v1 client. It embeds the generated ClientWithResponses, so every operation is available as a method named after its operationId (checks_create -> ChecksCreateWithResponse), and adds bearer auth, the User-Agent, the contract retry policy and error parsing.
Always construct it with NewClient: the zero value has no transport, credentials or retry policy and is not usable. A Client is safe for concurrent use and immutable after construction.
Printing a Client (any fmt verb) never reveals the API key.
func NewClient ¶
NewClient builds a Client. Configuration precedence is option, then environment (IONHOUR_API_KEY, IONHOUR_API_BASE_URL), then default. It returns an error (never panics) when no API key is available (ErrMissingAPIKey), the key is malformed (ErrInvalidAPIKey) or the base URL is unusable (ErrInvalidBaseURL).
On checks_create, jobs_create and projects_create the client always sends an Idempotency-Key: the caller's (Params, WithIdempotencyKey or IdempotencyKeyEditor) or, when none is given, a fresh UUIDv4 per call. The key is fixed before the first attempt, so automatic retries replay it.
func (*Client) CheckResponse ¶
CheckResponse returns nil for a 2xx response and an *APIError otherwise, parsed from the v1 envelope. Use it with any generated *XxxResponse:
rsp, err := c.ChecksGetOneWithResponse(ctx, "slug:public-api")
if err != nil { ... }
if err := c.CheckResponse(rsp.HTTPResponse, rsp.Body); err != nil { ... }
func (*Client) ListAllChecks ¶
func (c *Client) ListAllChecks(ctx context.Context, params ChecksListParams) ([]CheckV1Response, error)
ListAllChecks returns every check matching params (Page is ignored; Limit defaults to the server maximum). params is copied, never modified.
func (*Client) ListAllJobs ¶
func (c *Client) ListAllJobs(ctx context.Context, params JobsListParams) ([]JobV1Response, error)
ListAllJobs returns every job matching params (Page is ignored; Limit defaults to the server maximum). params is copied, never modified.
func (*Client) ListAllProjects ¶
func (c *Client) ListAllProjects(ctx context.Context, params ProjectsListParams) ([]ProjectV1Response, error)
ListAllProjects returns every project matching params (Page is ignored; Limit defaults to the server maximum). params is copied, never modified.
type ClientInterface ¶
type ClientInterface interface {
// ChecksList request
ChecksList(ctx context.Context, params *ChecksListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// ChecksCreateWithBody request with any body
ChecksCreateWithBody(ctx context.Context, params *ChecksCreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
ChecksCreate(ctx context.Context, params *ChecksCreateParams, body ChecksCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ChecksRemove request
ChecksRemove(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
// ChecksGetOne request
ChecksGetOne(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
// ChecksUpdateWithBody request with any body
ChecksUpdateWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
ChecksUpdate(ctx context.Context, id string, body ChecksUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ChecksPause request
ChecksPause(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
// ChecksResume request
ChecksResume(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeploymentsList request
DeploymentsList(ctx context.Context, params *DeploymentsListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeploymentsCreateWithBody request with any body
DeploymentsCreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
DeploymentsCreate(ctx context.Context, body DeploymentsCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeploymentsEnd request
DeploymentsEnd(ctx context.Context, id int, reqEditors ...RequestEditorFn) (*http.Response, error)
// IncidentsList request
IncidentsList(ctx context.Context, params *IncidentsListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// IncidentsCreateWithBody request with any body
IncidentsCreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
IncidentsCreate(ctx context.Context, body IncidentsCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// IncidentsGetOne request
IncidentsGetOne(ctx context.Context, id int, reqEditors ...RequestEditorFn) (*http.Response, error)
// IncidentsAcknowledge request
IncidentsAcknowledge(ctx context.Context, id int, reqEditors ...RequestEditorFn) (*http.Response, error)
// IncidentsResolveWithBody request with any body
IncidentsResolveWithBody(ctx context.Context, id int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
IncidentsResolve(ctx context.Context, id int, body IncidentsResolveJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// JobsList request
JobsList(ctx context.Context, params *JobsListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// JobsCreateWithBody request with any body
JobsCreateWithBody(ctx context.Context, params *JobsCreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
JobsCreate(ctx context.Context, params *JobsCreateParams, body JobsCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// JobsRemove request
JobsRemove(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
// JobsGetOne request
JobsGetOne(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
// JobsUpdateWithBody request with any body
JobsUpdateWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
JobsUpdate(ctx context.Context, id string, body JobsUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// JobsPause request
JobsPause(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
// JobsResume request
JobsResume(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
// MaintenanceList request
MaintenanceList(ctx context.Context, params *MaintenanceListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// MaintenanceCreateWithBody request with any body
MaintenanceCreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
MaintenanceCreate(ctx context.Context, body MaintenanceCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// MaintenanceEnd request
MaintenanceEnd(ctx context.Context, id int, reqEditors ...RequestEditorFn) (*http.Response, error)
// ProjectsList request
ProjectsList(ctx context.Context, params *ProjectsListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// ProjectsCreateWithBody request with any body
ProjectsCreateWithBody(ctx context.Context, params *ProjectsCreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
ProjectsCreate(ctx context.Context, params *ProjectsCreateParams, body ProjectsCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ProjectsRemove request
ProjectsRemove(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
// ProjectsGetOne request
ProjectsGetOne(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
// ProjectsUpdateWithBody request with any body
ProjectsUpdateWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
ProjectsUpdate(ctx context.Context, id string, body ProjectsUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// RegionsList request
RegionsList(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// StatusPagesList request
StatusPagesList(ctx context.Context, params *StatusPagesListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// AnnouncementsList request
AnnouncementsList(ctx context.Context, id string, params *AnnouncementsListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// AnnouncementsCreateWithBody request with any body
AnnouncementsCreateWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
AnnouncementsCreate(ctx context.Context, id string, body AnnouncementsCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// AnnouncementsUpdateWithBody request with any body
AnnouncementsUpdateWithBody(ctx context.Context, id string, announcementId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
AnnouncementsUpdate(ctx context.Context, id string, announcementId int, body AnnouncementsUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// AnnouncementsAddUpdateWithBody request with any body
AnnouncementsAddUpdateWithBody(ctx context.Context, id string, announcementId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
AnnouncementsAddUpdate(ctx context.Context, id string, announcementId int, body AnnouncementsAddUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// StatusPagesSummary request
StatusPagesSummary(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
// WhoamiWhoami request
WhoamiWhoami(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewRawClientWithResponses ¶
func NewRawClientWithResponses(server string, opts ...RawClientOption) (*ClientWithResponses, error)
NewRawClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) AnnouncementsAddUpdateWithBodyWithResponse ¶
func (c *ClientWithResponses) AnnouncementsAddUpdateWithBodyWithResponse(ctx context.Context, id string, announcementId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AnnouncementsAddUpdateResponse, error)
AnnouncementsAddUpdateWithBodyWithResponse request with arbitrary body returning *AnnouncementsAddUpdateResponse
func (*ClientWithResponses) AnnouncementsAddUpdateWithResponse ¶
func (c *ClientWithResponses) AnnouncementsAddUpdateWithResponse(ctx context.Context, id string, announcementId int, body AnnouncementsAddUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*AnnouncementsAddUpdateResponse, error)
func (*ClientWithResponses) AnnouncementsCreateWithBodyWithResponse ¶
func (c *ClientWithResponses) AnnouncementsCreateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AnnouncementsCreateResponse, error)
AnnouncementsCreateWithBodyWithResponse request with arbitrary body returning *AnnouncementsCreateResponse
func (*ClientWithResponses) AnnouncementsCreateWithResponse ¶
func (c *ClientWithResponses) AnnouncementsCreateWithResponse(ctx context.Context, id string, body AnnouncementsCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*AnnouncementsCreateResponse, error)
func (*ClientWithResponses) AnnouncementsListWithResponse ¶
func (c *ClientWithResponses) AnnouncementsListWithResponse(ctx context.Context, id string, params *AnnouncementsListParams, reqEditors ...RequestEditorFn) (*AnnouncementsListResponse, error)
AnnouncementsListWithResponse request returning *AnnouncementsListResponse
func (*ClientWithResponses) AnnouncementsUpdateWithBodyWithResponse ¶
func (c *ClientWithResponses) AnnouncementsUpdateWithBodyWithResponse(ctx context.Context, id string, announcementId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AnnouncementsUpdateResponse, error)
AnnouncementsUpdateWithBodyWithResponse request with arbitrary body returning *AnnouncementsUpdateResponse
func (*ClientWithResponses) AnnouncementsUpdateWithResponse ¶
func (c *ClientWithResponses) AnnouncementsUpdateWithResponse(ctx context.Context, id string, announcementId int, body AnnouncementsUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*AnnouncementsUpdateResponse, error)
func (*ClientWithResponses) ChecksCreateWithBodyWithResponse ¶
func (c *ClientWithResponses) ChecksCreateWithBodyWithResponse(ctx context.Context, params *ChecksCreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ChecksCreateResponse, error)
ChecksCreateWithBodyWithResponse request with arbitrary body returning *ChecksCreateResponse
func (*ClientWithResponses) ChecksCreateWithResponse ¶
func (c *ClientWithResponses) ChecksCreateWithResponse(ctx context.Context, params *ChecksCreateParams, body ChecksCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*ChecksCreateResponse, error)
func (*ClientWithResponses) ChecksGetOneWithResponse ¶
func (c *ClientWithResponses) ChecksGetOneWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*ChecksGetOneResponse, error)
ChecksGetOneWithResponse request returning *ChecksGetOneResponse
func (*ClientWithResponses) ChecksListWithResponse ¶
func (c *ClientWithResponses) ChecksListWithResponse(ctx context.Context, params *ChecksListParams, reqEditors ...RequestEditorFn) (*ChecksListResponse, error)
ChecksListWithResponse request returning *ChecksListResponse
func (*ClientWithResponses) ChecksPauseWithResponse ¶
func (c *ClientWithResponses) ChecksPauseWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*ChecksPauseResponse, error)
ChecksPauseWithResponse request returning *ChecksPauseResponse
func (*ClientWithResponses) ChecksRemoveWithResponse ¶
func (c *ClientWithResponses) ChecksRemoveWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*ChecksRemoveResponse, error)
ChecksRemoveWithResponse request returning *ChecksRemoveResponse
func (*ClientWithResponses) ChecksResumeWithResponse ¶
func (c *ClientWithResponses) ChecksResumeWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*ChecksResumeResponse, error)
ChecksResumeWithResponse request returning *ChecksResumeResponse
func (*ClientWithResponses) ChecksUpdateWithBodyWithResponse ¶
func (c *ClientWithResponses) ChecksUpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ChecksUpdateResponse, error)
ChecksUpdateWithBodyWithResponse request with arbitrary body returning *ChecksUpdateResponse
func (*ClientWithResponses) ChecksUpdateWithResponse ¶
func (c *ClientWithResponses) ChecksUpdateWithResponse(ctx context.Context, id string, body ChecksUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*ChecksUpdateResponse, error)
func (*ClientWithResponses) DeploymentsCreateWithBodyWithResponse ¶
func (c *ClientWithResponses) DeploymentsCreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeploymentsCreateResponse, error)
DeploymentsCreateWithBodyWithResponse request with arbitrary body returning *DeploymentsCreateResponse
func (*ClientWithResponses) DeploymentsCreateWithResponse ¶
func (c *ClientWithResponses) DeploymentsCreateWithResponse(ctx context.Context, body DeploymentsCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*DeploymentsCreateResponse, error)
func (*ClientWithResponses) DeploymentsEndWithResponse ¶
func (c *ClientWithResponses) DeploymentsEndWithResponse(ctx context.Context, id int, reqEditors ...RequestEditorFn) (*DeploymentsEndResponse, error)
DeploymentsEndWithResponse request returning *DeploymentsEndResponse
func (*ClientWithResponses) DeploymentsListWithResponse ¶
func (c *ClientWithResponses) DeploymentsListWithResponse(ctx context.Context, params *DeploymentsListParams, reqEditors ...RequestEditorFn) (*DeploymentsListResponse, error)
DeploymentsListWithResponse request returning *DeploymentsListResponse
func (*ClientWithResponses) IncidentsAcknowledgeWithResponse ¶
func (c *ClientWithResponses) IncidentsAcknowledgeWithResponse(ctx context.Context, id int, reqEditors ...RequestEditorFn) (*IncidentsAcknowledgeResponse, error)
IncidentsAcknowledgeWithResponse request returning *IncidentsAcknowledgeResponse
func (*ClientWithResponses) IncidentsCreateWithBodyWithResponse ¶
func (c *ClientWithResponses) IncidentsCreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentsCreateResponse, error)
IncidentsCreateWithBodyWithResponse request with arbitrary body returning *IncidentsCreateResponse
func (*ClientWithResponses) IncidentsCreateWithResponse ¶
func (c *ClientWithResponses) IncidentsCreateWithResponse(ctx context.Context, body IncidentsCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentsCreateResponse, error)
func (*ClientWithResponses) IncidentsGetOneWithResponse ¶
func (c *ClientWithResponses) IncidentsGetOneWithResponse(ctx context.Context, id int, reqEditors ...RequestEditorFn) (*IncidentsGetOneResponse, error)
IncidentsGetOneWithResponse request returning *IncidentsGetOneResponse
func (*ClientWithResponses) IncidentsListWithResponse ¶
func (c *ClientWithResponses) IncidentsListWithResponse(ctx context.Context, params *IncidentsListParams, reqEditors ...RequestEditorFn) (*IncidentsListResponse, error)
IncidentsListWithResponse request returning *IncidentsListResponse
func (*ClientWithResponses) IncidentsResolveWithBodyWithResponse ¶
func (c *ClientWithResponses) IncidentsResolveWithBodyWithResponse(ctx context.Context, id int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentsResolveResponse, error)
IncidentsResolveWithBodyWithResponse request with arbitrary body returning *IncidentsResolveResponse
func (*ClientWithResponses) IncidentsResolveWithResponse ¶
func (c *ClientWithResponses) IncidentsResolveWithResponse(ctx context.Context, id int, body IncidentsResolveJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentsResolveResponse, error)
func (*ClientWithResponses) JobsCreateWithBodyWithResponse ¶
func (c *ClientWithResponses) JobsCreateWithBodyWithResponse(ctx context.Context, params *JobsCreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*JobsCreateResponse, error)
JobsCreateWithBodyWithResponse request with arbitrary body returning *JobsCreateResponse
func (*ClientWithResponses) JobsCreateWithResponse ¶
func (c *ClientWithResponses) JobsCreateWithResponse(ctx context.Context, params *JobsCreateParams, body JobsCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*JobsCreateResponse, error)
func (*ClientWithResponses) JobsGetOneWithResponse ¶
func (c *ClientWithResponses) JobsGetOneWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*JobsGetOneResponse, error)
JobsGetOneWithResponse request returning *JobsGetOneResponse
func (*ClientWithResponses) JobsListWithResponse ¶
func (c *ClientWithResponses) JobsListWithResponse(ctx context.Context, params *JobsListParams, reqEditors ...RequestEditorFn) (*JobsListResponse, error)
JobsListWithResponse request returning *JobsListResponse
func (*ClientWithResponses) JobsPauseWithResponse ¶
func (c *ClientWithResponses) JobsPauseWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*JobsPauseResponse, error)
JobsPauseWithResponse request returning *JobsPauseResponse
func (*ClientWithResponses) JobsRemoveWithResponse ¶
func (c *ClientWithResponses) JobsRemoveWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*JobsRemoveResponse, error)
JobsRemoveWithResponse request returning *JobsRemoveResponse
func (*ClientWithResponses) JobsResumeWithResponse ¶
func (c *ClientWithResponses) JobsResumeWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*JobsResumeResponse, error)
JobsResumeWithResponse request returning *JobsResumeResponse
func (*ClientWithResponses) JobsUpdateWithBodyWithResponse ¶
func (c *ClientWithResponses) JobsUpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*JobsUpdateResponse, error)
JobsUpdateWithBodyWithResponse request with arbitrary body returning *JobsUpdateResponse
func (*ClientWithResponses) JobsUpdateWithResponse ¶
func (c *ClientWithResponses) JobsUpdateWithResponse(ctx context.Context, id string, body JobsUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*JobsUpdateResponse, error)
func (*ClientWithResponses) MaintenanceCreateWithBodyWithResponse ¶
func (c *ClientWithResponses) MaintenanceCreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*MaintenanceCreateResponse, error)
MaintenanceCreateWithBodyWithResponse request with arbitrary body returning *MaintenanceCreateResponse
func (*ClientWithResponses) MaintenanceCreateWithResponse ¶
func (c *ClientWithResponses) MaintenanceCreateWithResponse(ctx context.Context, body MaintenanceCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*MaintenanceCreateResponse, error)
func (*ClientWithResponses) MaintenanceEndWithResponse ¶
func (c *ClientWithResponses) MaintenanceEndWithResponse(ctx context.Context, id int, reqEditors ...RequestEditorFn) (*MaintenanceEndResponse, error)
MaintenanceEndWithResponse request returning *MaintenanceEndResponse
func (*ClientWithResponses) MaintenanceListWithResponse ¶
func (c *ClientWithResponses) MaintenanceListWithResponse(ctx context.Context, params *MaintenanceListParams, reqEditors ...RequestEditorFn) (*MaintenanceListResponse, error)
MaintenanceListWithResponse request returning *MaintenanceListResponse
func (*ClientWithResponses) ProjectsCreateWithBodyWithResponse ¶
func (c *ClientWithResponses) ProjectsCreateWithBodyWithResponse(ctx context.Context, params *ProjectsCreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ProjectsCreateResponse, error)
ProjectsCreateWithBodyWithResponse request with arbitrary body returning *ProjectsCreateResponse
func (*ClientWithResponses) ProjectsCreateWithResponse ¶
func (c *ClientWithResponses) ProjectsCreateWithResponse(ctx context.Context, params *ProjectsCreateParams, body ProjectsCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*ProjectsCreateResponse, error)
func (*ClientWithResponses) ProjectsGetOneWithResponse ¶
func (c *ClientWithResponses) ProjectsGetOneWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*ProjectsGetOneResponse, error)
ProjectsGetOneWithResponse request returning *ProjectsGetOneResponse
func (*ClientWithResponses) ProjectsListWithResponse ¶
func (c *ClientWithResponses) ProjectsListWithResponse(ctx context.Context, params *ProjectsListParams, reqEditors ...RequestEditorFn) (*ProjectsListResponse, error)
ProjectsListWithResponse request returning *ProjectsListResponse
func (*ClientWithResponses) ProjectsRemoveWithResponse ¶
func (c *ClientWithResponses) ProjectsRemoveWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*ProjectsRemoveResponse, error)
ProjectsRemoveWithResponse request returning *ProjectsRemoveResponse
func (*ClientWithResponses) ProjectsUpdateWithBodyWithResponse ¶
func (c *ClientWithResponses) ProjectsUpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ProjectsUpdateResponse, error)
ProjectsUpdateWithBodyWithResponse request with arbitrary body returning *ProjectsUpdateResponse
func (*ClientWithResponses) ProjectsUpdateWithResponse ¶
func (c *ClientWithResponses) ProjectsUpdateWithResponse(ctx context.Context, id string, body ProjectsUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*ProjectsUpdateResponse, error)
func (*ClientWithResponses) RegionsListWithResponse ¶
func (c *ClientWithResponses) RegionsListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*RegionsListResponse, error)
RegionsListWithResponse request returning *RegionsListResponse
func (*ClientWithResponses) StatusPagesListWithResponse ¶
func (c *ClientWithResponses) StatusPagesListWithResponse(ctx context.Context, params *StatusPagesListParams, reqEditors ...RequestEditorFn) (*StatusPagesListResponse, error)
StatusPagesListWithResponse request returning *StatusPagesListResponse
func (*ClientWithResponses) StatusPagesSummaryWithResponse ¶
func (c *ClientWithResponses) StatusPagesSummaryWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*StatusPagesSummaryResponse, error)
StatusPagesSummaryWithResponse request returning *StatusPagesSummaryResponse
func (*ClientWithResponses) WhoamiWhoamiWithResponse ¶
func (c *ClientWithResponses) WhoamiWhoamiWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*WhoamiWhoamiResponse, error)
WhoamiWhoamiWithResponse request returning *WhoamiWhoamiResponse
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// ChecksListWithResponse request
ChecksListWithResponse(ctx context.Context, params *ChecksListParams, reqEditors ...RequestEditorFn) (*ChecksListResponse, error)
// ChecksCreateWithBodyWithResponse request with any body
ChecksCreateWithBodyWithResponse(ctx context.Context, params *ChecksCreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ChecksCreateResponse, error)
ChecksCreateWithResponse(ctx context.Context, params *ChecksCreateParams, body ChecksCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*ChecksCreateResponse, error)
// ChecksRemoveWithResponse request
ChecksRemoveWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*ChecksRemoveResponse, error)
// ChecksGetOneWithResponse request
ChecksGetOneWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*ChecksGetOneResponse, error)
// ChecksUpdateWithBodyWithResponse request with any body
ChecksUpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ChecksUpdateResponse, error)
ChecksUpdateWithResponse(ctx context.Context, id string, body ChecksUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*ChecksUpdateResponse, error)
// ChecksPauseWithResponse request
ChecksPauseWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*ChecksPauseResponse, error)
// ChecksResumeWithResponse request
ChecksResumeWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*ChecksResumeResponse, error)
// DeploymentsListWithResponse request
DeploymentsListWithResponse(ctx context.Context, params *DeploymentsListParams, reqEditors ...RequestEditorFn) (*DeploymentsListResponse, error)
// DeploymentsCreateWithBodyWithResponse request with any body
DeploymentsCreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeploymentsCreateResponse, error)
DeploymentsCreateWithResponse(ctx context.Context, body DeploymentsCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*DeploymentsCreateResponse, error)
// DeploymentsEndWithResponse request
DeploymentsEndWithResponse(ctx context.Context, id int, reqEditors ...RequestEditorFn) (*DeploymentsEndResponse, error)
// IncidentsListWithResponse request
IncidentsListWithResponse(ctx context.Context, params *IncidentsListParams, reqEditors ...RequestEditorFn) (*IncidentsListResponse, error)
// IncidentsCreateWithBodyWithResponse request with any body
IncidentsCreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentsCreateResponse, error)
IncidentsCreateWithResponse(ctx context.Context, body IncidentsCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentsCreateResponse, error)
// IncidentsGetOneWithResponse request
IncidentsGetOneWithResponse(ctx context.Context, id int, reqEditors ...RequestEditorFn) (*IncidentsGetOneResponse, error)
// IncidentsAcknowledgeWithResponse request
IncidentsAcknowledgeWithResponse(ctx context.Context, id int, reqEditors ...RequestEditorFn) (*IncidentsAcknowledgeResponse, error)
// IncidentsResolveWithBodyWithResponse request with any body
IncidentsResolveWithBodyWithResponse(ctx context.Context, id int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentsResolveResponse, error)
IncidentsResolveWithResponse(ctx context.Context, id int, body IncidentsResolveJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentsResolveResponse, error)
// JobsListWithResponse request
JobsListWithResponse(ctx context.Context, params *JobsListParams, reqEditors ...RequestEditorFn) (*JobsListResponse, error)
// JobsCreateWithBodyWithResponse request with any body
JobsCreateWithBodyWithResponse(ctx context.Context, params *JobsCreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*JobsCreateResponse, error)
JobsCreateWithResponse(ctx context.Context, params *JobsCreateParams, body JobsCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*JobsCreateResponse, error)
// JobsRemoveWithResponse request
JobsRemoveWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*JobsRemoveResponse, error)
// JobsGetOneWithResponse request
JobsGetOneWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*JobsGetOneResponse, error)
// JobsUpdateWithBodyWithResponse request with any body
JobsUpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*JobsUpdateResponse, error)
JobsUpdateWithResponse(ctx context.Context, id string, body JobsUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*JobsUpdateResponse, error)
// JobsPauseWithResponse request
JobsPauseWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*JobsPauseResponse, error)
// JobsResumeWithResponse request
JobsResumeWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*JobsResumeResponse, error)
// MaintenanceListWithResponse request
MaintenanceListWithResponse(ctx context.Context, params *MaintenanceListParams, reqEditors ...RequestEditorFn) (*MaintenanceListResponse, error)
// MaintenanceCreateWithBodyWithResponse request with any body
MaintenanceCreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*MaintenanceCreateResponse, error)
MaintenanceCreateWithResponse(ctx context.Context, body MaintenanceCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*MaintenanceCreateResponse, error)
// MaintenanceEndWithResponse request
MaintenanceEndWithResponse(ctx context.Context, id int, reqEditors ...RequestEditorFn) (*MaintenanceEndResponse, error)
// ProjectsListWithResponse request
ProjectsListWithResponse(ctx context.Context, params *ProjectsListParams, reqEditors ...RequestEditorFn) (*ProjectsListResponse, error)
// ProjectsCreateWithBodyWithResponse request with any body
ProjectsCreateWithBodyWithResponse(ctx context.Context, params *ProjectsCreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ProjectsCreateResponse, error)
ProjectsCreateWithResponse(ctx context.Context, params *ProjectsCreateParams, body ProjectsCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*ProjectsCreateResponse, error)
// ProjectsRemoveWithResponse request
ProjectsRemoveWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*ProjectsRemoveResponse, error)
// ProjectsGetOneWithResponse request
ProjectsGetOneWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*ProjectsGetOneResponse, error)
// ProjectsUpdateWithBodyWithResponse request with any body
ProjectsUpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ProjectsUpdateResponse, error)
ProjectsUpdateWithResponse(ctx context.Context, id string, body ProjectsUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*ProjectsUpdateResponse, error)
// RegionsListWithResponse request
RegionsListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*RegionsListResponse, error)
// StatusPagesListWithResponse request
StatusPagesListWithResponse(ctx context.Context, params *StatusPagesListParams, reqEditors ...RequestEditorFn) (*StatusPagesListResponse, error)
// AnnouncementsListWithResponse request
AnnouncementsListWithResponse(ctx context.Context, id string, params *AnnouncementsListParams, reqEditors ...RequestEditorFn) (*AnnouncementsListResponse, error)
// AnnouncementsCreateWithBodyWithResponse request with any body
AnnouncementsCreateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AnnouncementsCreateResponse, error)
AnnouncementsCreateWithResponse(ctx context.Context, id string, body AnnouncementsCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*AnnouncementsCreateResponse, error)
// AnnouncementsUpdateWithBodyWithResponse request with any body
AnnouncementsUpdateWithBodyWithResponse(ctx context.Context, id string, announcementId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AnnouncementsUpdateResponse, error)
AnnouncementsUpdateWithResponse(ctx context.Context, id string, announcementId int, body AnnouncementsUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*AnnouncementsUpdateResponse, error)
// AnnouncementsAddUpdateWithBodyWithResponse request with any body
AnnouncementsAddUpdateWithBodyWithResponse(ctx context.Context, id string, announcementId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AnnouncementsAddUpdateResponse, error)
AnnouncementsAddUpdateWithResponse(ctx context.Context, id string, announcementId int, body AnnouncementsAddUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*AnnouncementsAddUpdateResponse, error)
// StatusPagesSummaryWithResponse request
StatusPagesSummaryWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*StatusPagesSummaryResponse, error)
// WhoamiWhoamiWithResponse request
WhoamiWhoamiWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*WhoamiWhoamiResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CreateAnnouncementUpdateV1Dto ¶
type CreateAnnouncementUpdateV1Dto struct {
Message string `json:"message"`
Status AnnouncementStatus `json:"status"`
}
CreateAnnouncementUpdateV1Dto defines model for CreateAnnouncementUpdateV1Dto.
type CreateAnnouncementV1Dto ¶
type CreateAnnouncementV1Dto struct {
// ComponentIds Status page component ids the announcement affects.
ComponentIds *[]int `json:"componentIds,omitempty"`
Impact *AnnouncementImpact `json:"impact,omitempty"`
// Message Initial update body shown on the status page timeline.
Message *string `json:"message,omitempty"`
Status *AnnouncementStatus `json:"status,omitempty"`
Title string `json:"title"`
}
CreateAnnouncementV1Dto defines model for CreateAnnouncementV1Dto.
type CreateCheckV1Dto ¶
type CreateCheckV1Dto struct {
// CheckType Probe type. Only HTTP is supported in v1; any other value is 422 CHECK_TYPE_NOT_SUPPORTED.
CheckType *CheckType `json:"checkType,omitempty"`
Config V1HttpCheckConfigDto `json:"config"`
// DownSeverity Incident severity when the check goes DOWN. Computed default: P1.
DownSeverity *IncidentSeverity `json:"downSeverity,omitempty"`
// GraceSeconds Grace period in seconds. Computed default: 5.
GraceSeconds *int `json:"graceSeconds,omitempty"`
// IntervalSeconds Probe interval in seconds. The plan sets a floor. Computed default: 300.
IntervalSeconds *int `json:"intervalSeconds,omitempty"`
// LateSeverity Incident severity when the check goes LATE. Computed default: P3.
LateSeverity *IncidentSeverity `json:"lateSeverity,omitempty"`
// MuteNotifications Suppress notifications for this check. Setting true is plan-gated. Computed default: false.
MuteNotifications *bool `json:"muteNotifications,omitempty"`
Name string `json:"name"`
ProjectId int `json:"projectId"`
// Slug Unique per workspace; addresses the check as `slug:<slug>`. Released on delete.
Slug nullable.Nullable[string] `json:"slug,omitempty"`
}
CreateCheckV1Dto defines model for CreateCheckV1Dto.
type CreateDeploymentV1Dto ¶
type CreateDeploymentV1Dto struct {
Author *string `json:"author,omitempty"`
// AutoPause Pause associated checks for the window. Defaults to true (see controller).
AutoPause *bool `json:"autoPause,omitempty"`
// CheckIds Specific check IDs to pause. Omitted → all checks in the project.
CheckIds *[]int `json:"checkIds,omitempty"`
Link *string `json:"link,omitempty"`
Name *string `json:"name,omitempty"`
ProjectId int `json:"projectId"`
// TtlMinutes Server-side auto-end, in minutes from now (1–1440). A fail-safe cleanup for
// orphaned windows when the explicit `/end` call never fires.
TtlMinutes *int `json:"ttlMinutes,omitempty"`
Version *string `json:"version,omitempty"`
}
CreateDeploymentV1Dto defines model for CreateDeploymentV1Dto.
type CreateIncidentV1Dto ¶
type CreateIncidentV1Dto struct {
// CheckId At most one of checkId / jobId / dependencyId (enforced in the controller).
CheckId *int `json:"checkId,omitempty"`
DependencyId *int `json:"dependencyId,omitempty"`
Description *string `json:"description,omitempty"`
JobId *int `json:"jobId,omitempty"`
Severity *IncidentSeverity `json:"severity,omitempty"`
Title string `json:"title"`
}
CreateIncidentV1Dto defines model for CreateIncidentV1Dto.
type CreateJobV1Dto ¶
type CreateJobV1Dto struct {
// DownSeverity Severity of DOWN incidents. Default P1.
DownSeverity *IncidentSeverity `json:"downSeverity,omitempty"`
// GraceSeconds Lateness tolerated before the job goes LATE. Default 300.
GraceSeconds *int `json:"graceSeconds,omitempty"`
// IntervalSeconds Expected ping interval in seconds. Default 3600.
IntervalSeconds *int `json:"intervalSeconds,omitempty"`
// LateSeverity Severity of LATE incidents. Default P3.
LateSeverity *IncidentSeverity `json:"lateSeverity,omitempty"`
// MuteNotifications Default false.
MuteNotifications *bool `json:"muteNotifications,omitempty"`
Name string `json:"name"`
ProjectId int `json:"projectId"`
// Slug Stable, human-chosen identifier, unique per workspace. Addressable as `slug:<slug>` in `:id`.
Slug nullable.Nullable[string] `json:"slug,omitempty"`
}
CreateJobV1Dto defines model for CreateJobV1Dto.
type CreateMaintenanceWindowV1Dto ¶
type CreateMaintenanceWindowV1Dto struct {
Description *string `json:"description,omitempty"`
// EndAt The natural TTL — the 60s processor auto-completes the window past endAt.
EndAt time.Time `json:"endAt"`
Name string `json:"name"`
// ProjectIds Projects the window applies to. Omitted → all projects in the workspace.
ProjectIds *[]int `json:"projectIds,omitempty"`
// StartAt Window start. Defaults to now (see controller).
StartAt *time.Time `json:"startAt,omitempty"`
// SuppressAlerts Suppress alerts during the window. Defaults to true.
SuppressAlerts *bool `json:"suppressAlerts,omitempty"`
// SuppressIncidents Suppress incidents during the window. Defaults to true.
SuppressIncidents *bool `json:"suppressIncidents,omitempty"`
}
CreateMaintenanceWindowV1Dto defines model for CreateMaintenanceWindowV1Dto.
type CreateProjectV1Dto ¶
type CreateProjectV1Dto struct {
// Description Free-text description. Stored as null when omitted.
Description nullable.Nullable[string] `json:"description,omitempty"`
Name string `json:"name"`
}
CreateProjectV1Dto defines model for CreateProjectV1Dto.
type DeploymentStatus ¶
type DeploymentStatus string
DeploymentStatus defines model for DeploymentStatus.
const ( DeploymentStatusACTIVE DeploymentStatus = "ACTIVE" DeploymentStatusENDED DeploymentStatus = "ENDED" DeploymentStatusSCHEDULED DeploymentStatus = "SCHEDULED" )
Defines values for DeploymentStatus.
type DeploymentV1Page ¶
type DeploymentV1Page struct {
ItemCount int `json:"itemCount"`
Items []DeploymentV1Response `json:"items"`
Limit int `json:"limit"`
Page int `json:"page"`
PageCount int `json:"pageCount"`
Total int `json:"total"`
}
DeploymentV1Page defines model for DeploymentV1Page.
type DeploymentV1Response ¶
type DeploymentV1Response struct {
Author nullable.Nullable[string] `json:"author"`
AutoPause bool `json:"autoPause"`
// CheckIds Checks scoped to the window. Null means every check in the project.
CheckIds nullable.Nullable[[]int] `json:"checkIds"`
EndedAt nullable.Nullable[time.Time] `json:"endedAt"`
Id int `json:"id"`
Link nullable.Nullable[string] `json:"link"`
Name nullable.Nullable[string] `json:"name"`
ProjectId int `json:"projectId"`
// ScheduledEndAt Server-side auto-end time (set by `ttlMinutes`).
ScheduledEndAt nullable.Nullable[time.Time] `json:"scheduledEndAt"`
StartedAt time.Time `json:"startedAt"`
Status DeploymentStatus `json:"status"`
Version nullable.Nullable[string] `json:"version"`
}
DeploymentV1Response defines model for DeploymentV1Response.
type DeploymentsCreateJSONRequestBody ¶
type DeploymentsCreateJSONRequestBody = CreateDeploymentV1Dto
DeploymentsCreateJSONRequestBody defines body for DeploymentsCreate for application/json ContentType.
type DeploymentsCreateResponse ¶
type DeploymentsCreateResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *DeploymentV1Response
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON404 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseDeploymentsCreateResponse ¶
func ParseDeploymentsCreateResponse(rsp *http.Response) (*DeploymentsCreateResponse, error)
ParseDeploymentsCreateResponse parses an HTTP response from a DeploymentsCreateWithResponse call
func (DeploymentsCreateResponse) Status ¶
func (r DeploymentsCreateResponse) Status() string
Status returns HTTPResponse.Status
func (DeploymentsCreateResponse) StatusCode ¶
func (r DeploymentsCreateResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeploymentsEndResponse ¶
type DeploymentsEndResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *DeploymentV1Response
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON404 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseDeploymentsEndResponse ¶
func ParseDeploymentsEndResponse(rsp *http.Response) (*DeploymentsEndResponse, error)
ParseDeploymentsEndResponse parses an HTTP response from a DeploymentsEndWithResponse call
func (DeploymentsEndResponse) Status ¶
func (r DeploymentsEndResponse) Status() string
Status returns HTTPResponse.Status
func (DeploymentsEndResponse) StatusCode ¶
func (r DeploymentsEndResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeploymentsListParams ¶
type DeploymentsListParams struct {
Page *int `form:"page,omitempty" json:"page,omitempty"`
// Limit Page size; values above 100 are clamped to 100.
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
ProjectId *int `form:"projectId,omitempty" json:"projectId,omitempty"`
Status *DeploymentStatus `form:"status,omitempty" json:"status,omitempty"`
From *time.Time `form:"from,omitempty" json:"from,omitempty"`
To *time.Time `form:"to,omitempty" json:"to,omitempty"`
}
DeploymentsListParams defines parameters for DeploymentsList.
type DeploymentsListResponse ¶
type DeploymentsListResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *DeploymentV1Page
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseDeploymentsListResponse ¶
func ParseDeploymentsListResponse(rsp *http.Response) (*DeploymentsListResponse, error)
ParseDeploymentsListResponse parses an HTTP response from a DeploymentsListWithResponse call
func (DeploymentsListResponse) Status ¶
func (r DeploymentsListResponse) Status() string
Status returns HTTPResponse.Status
func (DeploymentsListResponse) StatusCode ¶
func (r DeploymentsListResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type IncidentReason ¶
type IncidentReason string
IncidentReason defines model for IncidentReason.
const ( IncidentReasonDEPENDENCYDOWN IncidentReason = "DEPENDENCY_DOWN" IncidentReasonMANUAL IncidentReason = "MANUAL" IncidentReasonSERVICEDEGRADED IncidentReason = "SERVICE_DEGRADED" IncidentReasonSERVICEDOWN IncidentReason = "SERVICE_DOWN" )
Defines values for IncidentReason.
type IncidentSeverity ¶
type IncidentSeverity string
IncidentSeverity defines model for IncidentSeverity.
const ( IncidentSeverityP1 IncidentSeverity = "P1" IncidentSeverityP2 IncidentSeverity = "P2" IncidentSeverityP3 IncidentSeverity = "P3" IncidentSeverityP4 IncidentSeverity = "P4" )
Defines values for IncidentSeverity.
type IncidentState ¶
type IncidentState string
IncidentState defines model for IncidentState.
const ( IncidentStateACTIVE IncidentState = "ACTIVE" IncidentStateMONITORING IncidentState = "MONITORING" IncidentStateRESOLVED IncidentState = "RESOLVED" )
Defines values for IncidentState.
type IncidentV1AcknowledgedUser ¶
IncidentV1AcknowledgedUser defines model for IncidentV1AcknowledgedUser.
type IncidentV1CheckRef ¶
IncidentV1CheckRef defines model for IncidentV1CheckRef.
type IncidentV1DetailResponse ¶
type IncidentV1DetailResponse struct {
AcknowledgedAt nullable.Nullable[time.Time] `json:"acknowledgedAt"`
// AcknowledgedBy User id of the acknowledger.
AcknowledgedBy nullable.Nullable[int] `json:"acknowledgedBy"`
AcknowledgedByUser nullable.Nullable[IncidentV1AcknowledgedUser] `json:"acknowledgedByUser"`
Check nullable.Nullable[IncidentV1CheckRef] `json:"check"`
CheckId nullable.Nullable[int] `json:"checkId"`
DependencyId nullable.Nullable[int] `json:"dependencyId"`
DependencyName nullable.Nullable[string] `json:"dependencyName"`
Id int `json:"id"`
MonitorId nullable.Nullable[int] `json:"monitorId"`
MonitorType nullable.Nullable[MonitorType] `json:"monitorType"`
// PublicId Stable public identifier (lower-case ULID).
PublicId string `json:"publicId"`
Reason IncidentReason `json:"reason"`
RecoveredAt nullable.Nullable[time.Time] `json:"recoveredAt"`
ResolvedAt nullable.Nullable[time.Time] `json:"resolvedAt"`
Severity IncidentSeverity `json:"severity"`
StartedAt time.Time `json:"startedAt"`
State IncidentState `json:"state"`
// Summary Sanitized HTML summary.
Summary nullable.Nullable[string] `json:"summary"`
Title string `json:"title"`
}
IncidentV1DetailResponse defines model for IncidentV1DetailResponse.
type IncidentV1Page ¶
type IncidentV1Page struct {
ItemCount int `json:"itemCount"`
Items []IncidentV1Response `json:"items"`
Limit int `json:"limit"`
Page int `json:"page"`
PageCount int `json:"pageCount"`
Total int `json:"total"`
}
IncidentV1Page defines model for IncidentV1Page.
type IncidentV1Response ¶
type IncidentV1Response struct {
AcknowledgedAt nullable.Nullable[time.Time] `json:"acknowledgedAt"`
// AcknowledgedBy User id of the acknowledger.
AcknowledgedBy nullable.Nullable[int] `json:"acknowledgedBy"`
CheckId nullable.Nullable[int] `json:"checkId"`
DependencyId nullable.Nullable[int] `json:"dependencyId"`
DependencyName nullable.Nullable[string] `json:"dependencyName"`
Id int `json:"id"`
MonitorId nullable.Nullable[int] `json:"monitorId"`
MonitorType nullable.Nullable[MonitorType] `json:"monitorType"`
// PublicId Stable public identifier (lower-case ULID).
PublicId string `json:"publicId"`
Reason IncidentReason `json:"reason"`
ResolvedAt nullable.Nullable[time.Time] `json:"resolvedAt"`
Severity IncidentSeverity `json:"severity"`
StartedAt time.Time `json:"startedAt"`
State IncidentState `json:"state"`
Title string `json:"title"`
}
IncidentV1Response defines model for IncidentV1Response.
type IncidentsAcknowledgeResponse ¶
type IncidentsAcknowledgeResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *IncidentV1Response
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON404 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseIncidentsAcknowledgeResponse ¶
func ParseIncidentsAcknowledgeResponse(rsp *http.Response) (*IncidentsAcknowledgeResponse, error)
ParseIncidentsAcknowledgeResponse parses an HTTP response from a IncidentsAcknowledgeWithResponse call
func (IncidentsAcknowledgeResponse) Status ¶
func (r IncidentsAcknowledgeResponse) Status() string
Status returns HTTPResponse.Status
func (IncidentsAcknowledgeResponse) StatusCode ¶
func (r IncidentsAcknowledgeResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type IncidentsCreateJSONRequestBody ¶
type IncidentsCreateJSONRequestBody = CreateIncidentV1Dto
IncidentsCreateJSONRequestBody defines body for IncidentsCreate for application/json ContentType.
type IncidentsCreateResponse ¶
type IncidentsCreateResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *IncidentV1Response
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON404 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseIncidentsCreateResponse ¶
func ParseIncidentsCreateResponse(rsp *http.Response) (*IncidentsCreateResponse, error)
ParseIncidentsCreateResponse parses an HTTP response from a IncidentsCreateWithResponse call
func (IncidentsCreateResponse) Status ¶
func (r IncidentsCreateResponse) Status() string
Status returns HTTPResponse.Status
func (IncidentsCreateResponse) StatusCode ¶
func (r IncidentsCreateResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type IncidentsGetOneResponse ¶
type IncidentsGetOneResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *IncidentV1DetailResponse
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON404 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseIncidentsGetOneResponse ¶
func ParseIncidentsGetOneResponse(rsp *http.Response) (*IncidentsGetOneResponse, error)
ParseIncidentsGetOneResponse parses an HTTP response from a IncidentsGetOneWithResponse call
func (IncidentsGetOneResponse) Status ¶
func (r IncidentsGetOneResponse) Status() string
Status returns HTTPResponse.Status
func (IncidentsGetOneResponse) StatusCode ¶
func (r IncidentsGetOneResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type IncidentsListParams ¶
type IncidentsListParams struct {
State *IncidentState `form:"state,omitempty" json:"state,omitempty"`
From *time.Time `form:"from,omitempty" json:"from,omitempty"`
To *time.Time `form:"to,omitempty" json:"to,omitempty"`
CheckId *int `form:"checkId,omitempty" json:"checkId,omitempty"`
Page *int `form:"page,omitempty" json:"page,omitempty"`
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
}
IncidentsListParams defines parameters for IncidentsList.
type IncidentsListResponse ¶
type IncidentsListResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *IncidentV1Page
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseIncidentsListResponse ¶
func ParseIncidentsListResponse(rsp *http.Response) (*IncidentsListResponse, error)
ParseIncidentsListResponse parses an HTTP response from a IncidentsListWithResponse call
func (IncidentsListResponse) Status ¶
func (r IncidentsListResponse) Status() string
Status returns HTTPResponse.Status
func (IncidentsListResponse) StatusCode ¶
func (r IncidentsListResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type IncidentsResolveJSONRequestBody ¶
type IncidentsResolveJSONRequestBody = ResolveIncidentV1Dto
IncidentsResolveJSONRequestBody defines body for IncidentsResolve for application/json ContentType.
type IncidentsResolveResponse ¶
type IncidentsResolveResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *IncidentV1Response
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON404 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseIncidentsResolveResponse ¶
func ParseIncidentsResolveResponse(rsp *http.Response) (*IncidentsResolveResponse, error)
ParseIncidentsResolveResponse parses an HTTP response from a IncidentsResolveWithResponse call
func (IncidentsResolveResponse) Status ¶
func (r IncidentsResolveResponse) Status() string
Status returns HTTPResponse.Status
func (IncidentsResolveResponse) StatusCode ¶
func (r IncidentsResolveResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type JobV1Page ¶
type JobV1Page struct {
ItemCount int `json:"itemCount"`
Items []JobV1Response `json:"items"`
Limit int `json:"limit"`
Page int `json:"page"`
PageCount int `json:"pageCount"`
Total int `json:"total"`
}
JobV1Page defines model for JobV1Page.
type JobV1Response ¶
type JobV1Response struct {
CreatedAt time.Time `json:"createdAt"`
DownSeverity IncidentSeverity `json:"downSeverity"`
GraceSeconds int `json:"graceSeconds"`
Id int `json:"id"`
// IntervalSeconds Null only for legacy jobs created from an unparseable schedule.
IntervalSeconds nullable.Nullable[int] `json:"intervalSeconds"`
LateSeverity IncidentSeverity `json:"lateSeverity"`
MuteNotifications bool `json:"muteNotifications"`
Name string `json:"name"`
// Paused True when status is PAUSED. Change it with pause / resume.
Paused bool `json:"paused"`
// PingToken Heartbeat credential. Null unless the key is READ_WRITE, projects to MEMBER or higher, and covers mcp:jobs or mcp:signals (OAuth: jobs:write).
PingToken nullable.Nullable[string] `json:"pingToken"`
// PingUrl Null whenever pingToken is null.
PingUrl nullable.Nullable[string] `json:"pingUrl"`
ProjectId nullable.Nullable[int] `json:"projectId"`
Slug nullable.Nullable[string] `json:"slug"`
Status CheckStatus `json:"status"`
UpdatedAt time.Time `json:"updatedAt"`
}
JobV1Response defines model for JobV1Response.
type JobsCreateJSONRequestBody ¶
type JobsCreateJSONRequestBody = CreateJobV1Dto
JobsCreateJSONRequestBody defines body for JobsCreate for application/json ContentType.
type JobsCreateParams ¶
type JobsCreateParams struct {
// IdempotencyKey Optional client-chosen key (1-128 printable ASCII characters, no spaces) that makes this create safe to retry. Scoped to the workspace, the calling credential and this route, and remembered for 24 hours. A retry with the same key and body returns the original status and the current state of the created resource with `Idempotency-Replayed: true`; the same key with a different body is rejected.
IdempotencyKey *string `json:"Idempotency-Key,omitempty"`
}
JobsCreateParams defines parameters for JobsCreate.
type JobsCreateResponse ¶
type JobsCreateResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *JobV1Response
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON404 *V1ErrorResponse
JSON409 *V1ErrorResponse
JSON422 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseJobsCreateResponse ¶
func ParseJobsCreateResponse(rsp *http.Response) (*JobsCreateResponse, error)
ParseJobsCreateResponse parses an HTTP response from a JobsCreateWithResponse call
func (JobsCreateResponse) Status ¶
func (r JobsCreateResponse) Status() string
Status returns HTTPResponse.Status
func (JobsCreateResponse) StatusCode ¶
func (r JobsCreateResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type JobsGetOneResponse ¶
type JobsGetOneResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *JobV1Response
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON404 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseJobsGetOneResponse ¶
func ParseJobsGetOneResponse(rsp *http.Response) (*JobsGetOneResponse, error)
ParseJobsGetOneResponse parses an HTTP response from a JobsGetOneWithResponse call
func (JobsGetOneResponse) Status ¶
func (r JobsGetOneResponse) Status() string
Status returns HTTPResponse.Status
func (JobsGetOneResponse) StatusCode ¶
func (r JobsGetOneResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type JobsListParams ¶
type JobsListParams struct {
Page *int `form:"page,omitempty" json:"page,omitempty"`
// Limit Page size; values above 100 are clamped to 100.
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
ProjectId *int `form:"projectId,omitempty" json:"projectId,omitempty"`
Status *CheckStatus `form:"status,omitempty" json:"status,omitempty"`
Slug *string `form:"slug,omitempty" json:"slug,omitempty"`
}
JobsListParams defines parameters for JobsList.
type JobsListResponse ¶
type JobsListResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *JobV1Page
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseJobsListResponse ¶
func ParseJobsListResponse(rsp *http.Response) (*JobsListResponse, error)
ParseJobsListResponse parses an HTTP response from a JobsListWithResponse call
func (JobsListResponse) Status ¶
func (r JobsListResponse) Status() string
Status returns HTTPResponse.Status
func (JobsListResponse) StatusCode ¶
func (r JobsListResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type JobsPauseResponse ¶
type JobsPauseResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *JobV1Response
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON404 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseJobsPauseResponse ¶
func ParseJobsPauseResponse(rsp *http.Response) (*JobsPauseResponse, error)
ParseJobsPauseResponse parses an HTTP response from a JobsPauseWithResponse call
func (JobsPauseResponse) Status ¶
func (r JobsPauseResponse) Status() string
Status returns HTTPResponse.Status
func (JobsPauseResponse) StatusCode ¶
func (r JobsPauseResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type JobsRemoveResponse ¶
type JobsRemoveResponse struct {
Body []byte
HTTPResponse *http.Response
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON404 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseJobsRemoveResponse ¶
func ParseJobsRemoveResponse(rsp *http.Response) (*JobsRemoveResponse, error)
ParseJobsRemoveResponse parses an HTTP response from a JobsRemoveWithResponse call
func (JobsRemoveResponse) Status ¶
func (r JobsRemoveResponse) Status() string
Status returns HTTPResponse.Status
func (JobsRemoveResponse) StatusCode ¶
func (r JobsRemoveResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type JobsResumeResponse ¶
type JobsResumeResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *JobV1Response
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON404 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseJobsResumeResponse ¶
func ParseJobsResumeResponse(rsp *http.Response) (*JobsResumeResponse, error)
ParseJobsResumeResponse parses an HTTP response from a JobsResumeWithResponse call
func (JobsResumeResponse) Status ¶
func (r JobsResumeResponse) Status() string
Status returns HTTPResponse.Status
func (JobsResumeResponse) StatusCode ¶
func (r JobsResumeResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type JobsUpdateJSONRequestBody ¶
type JobsUpdateJSONRequestBody = UpdateJobV1Dto
JobsUpdateJSONRequestBody defines body for JobsUpdate for application/json ContentType.
type JobsUpdateResponse ¶
type JobsUpdateResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *JobV1Response
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON404 *V1ErrorResponse
JSON409 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseJobsUpdateResponse ¶
func ParseJobsUpdateResponse(rsp *http.Response) (*JobsUpdateResponse, error)
ParseJobsUpdateResponse parses an HTTP response from a JobsUpdateWithResponse call
func (JobsUpdateResponse) Status ¶
func (r JobsUpdateResponse) Status() string
Status returns HTTPResponse.Status
func (JobsUpdateResponse) StatusCode ¶
func (r JobsUpdateResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type MaintenanceCreateJSONRequestBody ¶
type MaintenanceCreateJSONRequestBody = CreateMaintenanceWindowV1Dto
MaintenanceCreateJSONRequestBody defines body for MaintenanceCreate for application/json ContentType.
type MaintenanceCreateResponse ¶
type MaintenanceCreateResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *MaintenanceWindowV1Response
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON404 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseMaintenanceCreateResponse ¶
func ParseMaintenanceCreateResponse(rsp *http.Response) (*MaintenanceCreateResponse, error)
ParseMaintenanceCreateResponse parses an HTTP response from a MaintenanceCreateWithResponse call
func (MaintenanceCreateResponse) Status ¶
func (r MaintenanceCreateResponse) Status() string
Status returns HTTPResponse.Status
func (MaintenanceCreateResponse) StatusCode ¶
func (r MaintenanceCreateResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type MaintenanceEndResponse ¶
type MaintenanceEndResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *MaintenanceWindowV1Response
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON404 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseMaintenanceEndResponse ¶
func ParseMaintenanceEndResponse(rsp *http.Response) (*MaintenanceEndResponse, error)
ParseMaintenanceEndResponse parses an HTTP response from a MaintenanceEndWithResponse call
func (MaintenanceEndResponse) Status ¶
func (r MaintenanceEndResponse) Status() string
Status returns HTTPResponse.Status
func (MaintenanceEndResponse) StatusCode ¶
func (r MaintenanceEndResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type MaintenanceListParams ¶
type MaintenanceListParams struct {
Page *int `form:"page,omitempty" json:"page,omitempty"`
// Limit Page size; values above 100 are clamped to 100.
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
State *MaintenanceWindowState `form:"state,omitempty" json:"state,omitempty"`
ProjectId *int `form:"projectId,omitempty" json:"projectId,omitempty"`
From *time.Time `form:"from,omitempty" json:"from,omitempty"`
To *time.Time `form:"to,omitempty" json:"to,omitempty"`
}
MaintenanceListParams defines parameters for MaintenanceList.
type MaintenanceListResponse ¶
type MaintenanceListResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *MaintenanceWindowV1Page
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseMaintenanceListResponse ¶
func ParseMaintenanceListResponse(rsp *http.Response) (*MaintenanceListResponse, error)
ParseMaintenanceListResponse parses an HTTP response from a MaintenanceListWithResponse call
func (MaintenanceListResponse) Status ¶
func (r MaintenanceListResponse) Status() string
Status returns HTTPResponse.Status
func (MaintenanceListResponse) StatusCode ¶
func (r MaintenanceListResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type MaintenanceWindowState ¶
type MaintenanceWindowState string
MaintenanceWindowState defines model for MaintenanceWindowState.
const ( MaintenanceWindowStateACTIVE MaintenanceWindowState = "ACTIVE" MaintenanceWindowStateCANCELLED MaintenanceWindowState = "CANCELLED" MaintenanceWindowStateCOMPLETED MaintenanceWindowState = "COMPLETED" MaintenanceWindowStateSCHEDULED MaintenanceWindowState = "SCHEDULED" )
Defines values for MaintenanceWindowState.
type MaintenanceWindowV1Page ¶
type MaintenanceWindowV1Page struct {
ItemCount int `json:"itemCount"`
Items []MaintenanceWindowV1Response `json:"items"`
Limit int `json:"limit"`
Page int `json:"page"`
PageCount int `json:"pageCount"`
Total int `json:"total"`
}
MaintenanceWindowV1Page defines model for MaintenanceWindowV1Page.
type MaintenanceWindowV1Response ¶
type MaintenanceWindowV1Response struct {
Description nullable.Nullable[string] `json:"description"`
EndAt time.Time `json:"endAt"`
Id int `json:"id"`
Name string `json:"name"`
// ProjectIds Projects the window applies to. Empty means every project.
ProjectIds []int `json:"projectIds"`
StartAt time.Time `json:"startAt"`
State MaintenanceWindowState `json:"state"`
SuppressAlerts bool `json:"suppressAlerts"`
SuppressIncidents bool `json:"suppressIncidents"`
}
MaintenanceWindowV1Response defines model for MaintenanceWindowV1Response.
type MonitorType ¶
type MonitorType string
MonitorType defines model for MonitorType.
const ( MonitorTypeCHECK MonitorType = "CHECK" MonitorTypeJOB MonitorType = "JOB" )
Defines values for MonitorType.
type Option ¶
type Option func(*config)
Option configures a Client in NewClient.
func WithAPIKey ¶
WithAPIKey sets the API key (ionh_...) or OAuth access token sent as `Authorization: Bearer <key>`. Surrounding whitespace is trimmed and a blank value is treated as absent, so the IONHOUR_API_KEY fallback still applies. A key containing a space, a control character or DEL makes NewClient fail with ErrInvalidAPIKey.
func WithBaseURL ¶
WithBaseURL overrides the API base URL (scheme + host + `/api` prefix, e.g. https://api.ionhour.com/api). An empty value is ignored. Precedence: this option, then IONHOUR_API_BASE_URL, then DefaultBaseURL.
func WithHTTPClient ¶
WithHTTPClient supplies a custom *http.Client (proxies, TLS, pooling). A nil client is ignored. The client is copied, never mutated: the copy's Transport is wrapped with the retry policy. Any Timeout on the supplied client bounds the whole call including retries; WithTimeout bounds each attempt.
func WithMaxAttempts ¶
WithMaxAttempts sets the total number of attempts per request (not the number of extra retries). Values below 1 are clamped to 1 (no retries).
func WithMaxRetryWait ¶
WithMaxRetryWait caps how long the client sleeps on a 429 Retry-After. A 429 whose Retry-After exceeds the cap is returned to the caller at once (as an *APIError with RetryAfter set) instead of blocking. Non-positive values are ignored.
func WithTimeout ¶
WithTimeout sets the per-attempt timeout. A non-positive value disables the SDK-managed deadline and defers to the caller's context.
func WithUserAgent ¶
WithUserAgent overrides the User-Agent header. An empty value is ignored and the default ("ionhour-api-go/<version>") is kept.
type OutboundHttpMethod ¶
type OutboundHttpMethod string
OutboundHttpMethod defines model for OutboundHttpMethod.
const ( OutboundHttpMethodGET OutboundHttpMethod = "GET" OutboundHttpMethodHEAD OutboundHttpMethod = "HEAD" OutboundHttpMethodPATCH OutboundHttpMethod = "PATCH" OutboundHttpMethodPOST OutboundHttpMethod = "POST" OutboundHttpMethodPUT OutboundHttpMethod = "PUT" )
Defines values for OutboundHttpMethod.
type PageFetcher ¶
PageFetcher fetches one page (1-based) of a v1 list endpoint and returns its items and the server's pageCount.
type PrincipalKind ¶
type PrincipalKind string
PrincipalKind defines model for PrincipalKind.
const ( PrincipalKindOauth PrincipalKind = "oauth" PrincipalKindPersonal PrincipalKind = "personal" PrincipalKindService PrincipalKind = "service" )
Defines values for PrincipalKind.
type ProjectV1Page ¶
type ProjectV1Page struct {
ItemCount int `json:"itemCount"`
Items []ProjectV1Response `json:"items"`
Limit int `json:"limit"`
Page int `json:"page"`
PageCount int `json:"pageCount"`
Total int `json:"total"`
}
ProjectV1Page defines model for ProjectV1Page.
type ProjectV1Response ¶
type ProjectV1Response struct {
CreatedAt time.Time `json:"createdAt"`
Description nullable.Nullable[string] `json:"description"`
Id int `json:"id"`
Name string `json:"name"`
UpdatedAt time.Time `json:"updatedAt"`
}
ProjectV1Response defines model for ProjectV1Response.
type ProjectsCreateJSONRequestBody ¶
type ProjectsCreateJSONRequestBody = CreateProjectV1Dto
ProjectsCreateJSONRequestBody defines body for ProjectsCreate for application/json ContentType.
type ProjectsCreateParams ¶
type ProjectsCreateParams struct {
// IdempotencyKey Optional client-chosen key (1-128 printable ASCII characters, no spaces) that makes this create safe to retry. Scoped to the workspace, the calling credential and this route, and remembered for 24 hours. A retry with the same key and body returns the original status and the current state of the created resource with `Idempotency-Replayed: true`; the same key with a different body is rejected.
IdempotencyKey *string `json:"Idempotency-Key,omitempty"`
}
ProjectsCreateParams defines parameters for ProjectsCreate.
type ProjectsCreateResponse ¶
type ProjectsCreateResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *ProjectV1Response
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON409 *V1ErrorResponse
JSON422 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseProjectsCreateResponse ¶
func ParseProjectsCreateResponse(rsp *http.Response) (*ProjectsCreateResponse, error)
ParseProjectsCreateResponse parses an HTTP response from a ProjectsCreateWithResponse call
func (ProjectsCreateResponse) Status ¶
func (r ProjectsCreateResponse) Status() string
Status returns HTTPResponse.Status
func (ProjectsCreateResponse) StatusCode ¶
func (r ProjectsCreateResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ProjectsGetOneResponse ¶
type ProjectsGetOneResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ProjectV1Response
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON404 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseProjectsGetOneResponse ¶
func ParseProjectsGetOneResponse(rsp *http.Response) (*ProjectsGetOneResponse, error)
ParseProjectsGetOneResponse parses an HTTP response from a ProjectsGetOneWithResponse call
func (ProjectsGetOneResponse) Status ¶
func (r ProjectsGetOneResponse) Status() string
Status returns HTTPResponse.Status
func (ProjectsGetOneResponse) StatusCode ¶
func (r ProjectsGetOneResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ProjectsListParams ¶
type ProjectsListParams struct {
Page *int `form:"page,omitempty" json:"page,omitempty"`
// Limit Page size; values above 100 are clamped to 100.
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
// Name Exact project name match.
Name *string `form:"name,omitempty" json:"name,omitempty"`
}
ProjectsListParams defines parameters for ProjectsList.
type ProjectsListResponse ¶
type ProjectsListResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ProjectV1Page
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseProjectsListResponse ¶
func ParseProjectsListResponse(rsp *http.Response) (*ProjectsListResponse, error)
ParseProjectsListResponse parses an HTTP response from a ProjectsListWithResponse call
func (ProjectsListResponse) Status ¶
func (r ProjectsListResponse) Status() string
Status returns HTTPResponse.Status
func (ProjectsListResponse) StatusCode ¶
func (r ProjectsListResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ProjectsRemoveResponse ¶
type ProjectsRemoveResponse struct {
Body []byte
HTTPResponse *http.Response
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON404 *V1ErrorResponse
JSON409 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseProjectsRemoveResponse ¶
func ParseProjectsRemoveResponse(rsp *http.Response) (*ProjectsRemoveResponse, error)
ParseProjectsRemoveResponse parses an HTTP response from a ProjectsRemoveWithResponse call
func (ProjectsRemoveResponse) Status ¶
func (r ProjectsRemoveResponse) Status() string
Status returns HTTPResponse.Status
func (ProjectsRemoveResponse) StatusCode ¶
func (r ProjectsRemoveResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ProjectsUpdateJSONRequestBody ¶
type ProjectsUpdateJSONRequestBody = UpdateProjectV1Dto
ProjectsUpdateJSONRequestBody defines body for ProjectsUpdate for application/json ContentType.
type ProjectsUpdateResponse ¶
type ProjectsUpdateResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ProjectV1Response
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON404 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseProjectsUpdateResponse ¶
func ParseProjectsUpdateResponse(rsp *http.Response) (*ProjectsUpdateResponse, error)
ParseProjectsUpdateResponse parses an HTTP response from a ProjectsUpdateWithResponse call
func (ProjectsUpdateResponse) Status ¶
func (r ProjectsUpdateResponse) Status() string
Status returns HTTPResponse.Status
func (ProjectsUpdateResponse) StatusCode ¶
func (r ProjectsUpdateResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RawClient ¶
type RawClient 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
}
RawClient which conforms to the OpenAPI3 specification for this service.
func NewRawClient ¶
func NewRawClient(server string, opts ...RawClientOption) (*RawClient, error)
Creates a new RawClient, with reasonable defaults
func (*RawClient) AnnouncementsAddUpdate ¶
func (c *RawClient) AnnouncementsAddUpdate(ctx context.Context, id string, announcementId int, body AnnouncementsAddUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*RawClient) AnnouncementsAddUpdateWithBody ¶
func (*RawClient) AnnouncementsCreate ¶
func (c *RawClient) AnnouncementsCreate(ctx context.Context, id string, body AnnouncementsCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*RawClient) AnnouncementsCreateWithBody ¶
func (*RawClient) AnnouncementsList ¶
func (c *RawClient) AnnouncementsList(ctx context.Context, id string, params *AnnouncementsListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*RawClient) AnnouncementsUpdate ¶
func (c *RawClient) AnnouncementsUpdate(ctx context.Context, id string, announcementId int, body AnnouncementsUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*RawClient) AnnouncementsUpdateWithBody ¶
func (*RawClient) ChecksCreate ¶
func (c *RawClient) ChecksCreate(ctx context.Context, params *ChecksCreateParams, body ChecksCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*RawClient) ChecksCreateWithBody ¶
func (*RawClient) ChecksGetOne ¶
func (*RawClient) ChecksList ¶
func (c *RawClient) ChecksList(ctx context.Context, params *ChecksListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*RawClient) ChecksPause ¶
func (*RawClient) ChecksRemove ¶
func (*RawClient) ChecksResume ¶
func (*RawClient) ChecksUpdate ¶
func (c *RawClient) ChecksUpdate(ctx context.Context, id string, body ChecksUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*RawClient) ChecksUpdateWithBody ¶
func (*RawClient) DeploymentsCreate ¶
func (c *RawClient) DeploymentsCreate(ctx context.Context, body DeploymentsCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*RawClient) DeploymentsCreateWithBody ¶
func (*RawClient) DeploymentsEnd ¶
func (*RawClient) DeploymentsList ¶
func (c *RawClient) DeploymentsList(ctx context.Context, params *DeploymentsListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*RawClient) IncidentsAcknowledge ¶
func (*RawClient) IncidentsCreate ¶
func (c *RawClient) IncidentsCreate(ctx context.Context, body IncidentsCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*RawClient) IncidentsCreateWithBody ¶
func (*RawClient) IncidentsGetOne ¶
func (*RawClient) IncidentsList ¶
func (c *RawClient) IncidentsList(ctx context.Context, params *IncidentsListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*RawClient) IncidentsResolve ¶
func (c *RawClient) IncidentsResolve(ctx context.Context, id int, body IncidentsResolveJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*RawClient) IncidentsResolveWithBody ¶
func (*RawClient) JobsCreate ¶
func (c *RawClient) JobsCreate(ctx context.Context, params *JobsCreateParams, body JobsCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*RawClient) JobsCreateWithBody ¶
func (*RawClient) JobsGetOne ¶
func (*RawClient) JobsList ¶
func (c *RawClient) JobsList(ctx context.Context, params *JobsListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*RawClient) JobsRemove ¶
func (*RawClient) JobsResume ¶
func (*RawClient) JobsUpdate ¶
func (c *RawClient) JobsUpdate(ctx context.Context, id string, body JobsUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*RawClient) JobsUpdateWithBody ¶
func (*RawClient) MaintenanceCreate ¶
func (c *RawClient) MaintenanceCreate(ctx context.Context, body MaintenanceCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*RawClient) MaintenanceCreateWithBody ¶
func (*RawClient) MaintenanceEnd ¶
func (*RawClient) MaintenanceList ¶
func (c *RawClient) MaintenanceList(ctx context.Context, params *MaintenanceListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*RawClient) ProjectsCreate ¶
func (c *RawClient) ProjectsCreate(ctx context.Context, params *ProjectsCreateParams, body ProjectsCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*RawClient) ProjectsCreateWithBody ¶
func (*RawClient) ProjectsGetOne ¶
func (*RawClient) ProjectsList ¶
func (c *RawClient) ProjectsList(ctx context.Context, params *ProjectsListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*RawClient) ProjectsRemove ¶
func (*RawClient) ProjectsUpdate ¶
func (c *RawClient) ProjectsUpdate(ctx context.Context, id string, body ProjectsUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*RawClient) ProjectsUpdateWithBody ¶
func (*RawClient) RegionsList ¶
func (*RawClient) StatusPagesList ¶
func (c *RawClient) StatusPagesList(ctx context.Context, params *StatusPagesListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*RawClient) StatusPagesSummary ¶
func (*RawClient) WhoamiWhoami ¶
type RawClientOption ¶
RawClientOption allows setting custom parameters during construction
func WithRawBaseURL ¶
func WithRawBaseURL(baseURL string) RawClientOption
WithRawBaseURL overrides the baseURL.
func WithRawHTTPClient ¶
func WithRawHTTPClient(doer HttpRequestDoer) RawClientOption
WithRawHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRawRequestEditorFn ¶
func WithRawRequestEditorFn(fn RequestEditorFn) RawClientOption
WithRawRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type RegionV1Response ¶
type RegionV1Response struct {
DisplayName string `json:"displayName"`
Enabled bool `json:"enabled"`
Flag string `json:"flag"`
Id string `json:"id"`
}
RegionV1Response defines model for RegionV1Response.
type RegionsListResponse ¶
type RegionsListResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *[]RegionV1Response
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseRegionsListResponse ¶
func ParseRegionsListResponse(rsp *http.Response) (*RegionsListResponse, error)
ParseRegionsListResponse parses an HTTP response from a RegionsListWithResponse call
func (RegionsListResponse) Status ¶
func (r RegionsListResponse) Status() string
Status returns HTTPResponse.Status
func (RegionsListResponse) StatusCode ¶
func (r RegionsListResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
func IdempotencyKeyEditor ¶
func IdempotencyKeyEditor(key string) RequestEditorFn
IdempotencyKeyEditor is the per-call alternative to WithIdempotencyKey: pass it as a trailing RequestEditorFn to ChecksCreate, JobsCreate or ProjectsCreate. On any other operation the call fails with ErrIdempotencyKeyNotSupported before sending.
type ResolveIncidentV1Dto ¶
type ResolveIncidentV1Dto struct {
ResolutionNote *string `json:"resolutionNote,omitempty"`
}
ResolveIncidentV1Dto defines model for ResolveIncidentV1Dto.
type StatusPageV1Page ¶
type StatusPageV1Page struct {
ItemCount int `json:"itemCount"`
Items []StatusPageV1Response `json:"items"`
Limit int `json:"limit"`
Page int `json:"page"`
PageCount int `json:"pageCount"`
Total int `json:"total"`
}
StatusPageV1Page defines model for StatusPageV1Page.
type StatusPageV1Response ¶
type StatusPageV1Response struct {
Id int `json:"id"`
Name string `json:"name"`
Slug string `json:"slug"`
Visibility StatusPageVisibility `json:"visibility"`
}
StatusPageV1Response defines model for StatusPageV1Response.
type StatusPageVisibility ¶
type StatusPageVisibility string
StatusPageVisibility defines model for StatusPageVisibility.
const ( StatusPageVisibilityPASSWORDPROTECTED StatusPageVisibility = "PASSWORD_PROTECTED" StatusPageVisibilityPRIVATE StatusPageVisibility = "PRIVATE" StatusPageVisibilityPUBLIC StatusPageVisibility = "PUBLIC" )
Defines values for StatusPageVisibility.
type StatusPagesListParams ¶
type StatusPagesListParams struct {
Page *int `form:"page,omitempty" json:"page,omitempty"`
// Limit Page size; values above 100 are clamped to 100.
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
}
StatusPagesListParams defines parameters for StatusPagesList.
type StatusPagesListResponse ¶
type StatusPagesListResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *StatusPageV1Page
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseStatusPagesListResponse ¶
func ParseStatusPagesListResponse(rsp *http.Response) (*StatusPagesListResponse, error)
ParseStatusPagesListResponse parses an HTTP response from a StatusPagesListWithResponse call
func (StatusPagesListResponse) Status ¶
func (r StatusPagesListResponse) Status() string
Status returns HTTPResponse.Status
func (StatusPagesListResponse) StatusCode ¶
func (r StatusPagesListResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type StatusPagesSummaryResponse ¶
type StatusPagesSummaryResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *map[string]interface{}
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON404 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseStatusPagesSummaryResponse ¶
func ParseStatusPagesSummaryResponse(rsp *http.Response) (*StatusPagesSummaryResponse, error)
ParseStatusPagesSummaryResponse parses an HTTP response from a StatusPagesSummaryWithResponse call
func (StatusPagesSummaryResponse) Status ¶
func (r StatusPagesSummaryResponse) Status() string
Status returns HTTPResponse.Status
func (StatusPagesSummaryResponse) StatusCode ¶
func (r StatusPagesSummaryResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpdateAnnouncementV1Dto ¶
type UpdateAnnouncementV1Dto struct {
// ComponentIds Status page component ids the announcement affects.
ComponentIds *[]int `json:"componentIds,omitempty"`
Impact *AnnouncementImpact `json:"impact,omitempty"`
Status *AnnouncementStatus `json:"status,omitempty"`
Title *string `json:"title,omitempty"`
}
UpdateAnnouncementV1Dto defines model for UpdateAnnouncementV1Dto.
type UpdateCheckV1Dto ¶
type UpdateCheckV1Dto struct {
// CheckType Accepted only as HTTP (the type cannot change through v1).
CheckType *CheckType `json:"checkType,omitempty"`
Config *V1HttpCheckConfigPatchDto `json:"config,omitempty"`
DownSeverity *IncidentSeverity `json:"downSeverity,omitempty"`
GraceSeconds *int `json:"graceSeconds,omitempty"`
IntervalSeconds *int `json:"intervalSeconds,omitempty"`
LateSeverity *IncidentSeverity `json:"lateSeverity,omitempty"`
MuteNotifications *bool `json:"muteNotifications,omitempty"`
Name *string `json:"name,omitempty"`
// ProjectId Move the check to another project in the same workspace.
ProjectId *int `json:"projectId,omitempty"`
// Slug New slug, or null to clear it.
Slug nullable.Nullable[string] `json:"slug,omitempty"`
}
UpdateCheckV1Dto defines model for UpdateCheckV1Dto.
type UpdateJobV1Dto ¶
type UpdateJobV1Dto struct {
DownSeverity *IncidentSeverity `json:"downSeverity,omitempty"`
GraceSeconds *int `json:"graceSeconds,omitempty"`
IntervalSeconds *int `json:"intervalSeconds,omitempty"`
LateSeverity *IncidentSeverity `json:"lateSeverity,omitempty"`
MuteNotifications *bool `json:"muteNotifications,omitempty"`
Name *string `json:"name,omitempty"`
ProjectId *int `json:"projectId,omitempty"`
// Slug Send null to clear.
Slug nullable.Nullable[string] `json:"slug,omitempty"`
}
UpdateJobV1Dto defines model for UpdateJobV1Dto.
type UpdateProjectV1Dto ¶
type UpdateProjectV1Dto struct {
// Description Send null to clear.
Description nullable.Nullable[string] `json:"description,omitempty"`
Name *string `json:"name,omitempty"`
}
UpdateProjectV1Dto defines model for UpdateProjectV1Dto.
type V1ErrorResponse ¶
type V1ErrorResponse struct {
// Code Stable machine-readable error code.
Code string `json:"code"`
// Detail Structured context passed through for some codes. PLAN_LIMIT_EXCEEDED carries `{ limit, resource }` (`limit` is null for a feature gate) and, for API keys, `plan`.
Detail nullable.Nullable[map[string]interface{}] `json:"detail,omitempty"`
Error string `json:"error"`
// Message Human-readable message (string, or a list for validation failures).
Message V1ErrorResponse_Message `json:"message"`
StatusCode int `json:"statusCode"`
}
V1ErrorResponse defines model for V1ErrorResponse.
type V1ErrorResponseMessage0 ¶
type V1ErrorResponseMessage0 = string
V1ErrorResponseMessage0 defines model for .
type V1ErrorResponseMessage1 ¶
type V1ErrorResponseMessage1 = []string
V1ErrorResponseMessage1 defines model for .
type V1ErrorResponse_Message ¶
type V1ErrorResponse_Message struct {
// contains filtered or unexported fields
}
V1ErrorResponse_Message Human-readable message (string, or a list for validation failures).
func (V1ErrorResponse_Message) AsV1ErrorResponseMessage0 ¶
func (t V1ErrorResponse_Message) AsV1ErrorResponseMessage0() (V1ErrorResponseMessage0, error)
AsV1ErrorResponseMessage0 returns the union data inside the V1ErrorResponse_Message as a V1ErrorResponseMessage0
func (V1ErrorResponse_Message) AsV1ErrorResponseMessage1 ¶
func (t V1ErrorResponse_Message) AsV1ErrorResponseMessage1() (V1ErrorResponseMessage1, error)
AsV1ErrorResponseMessage1 returns the union data inside the V1ErrorResponse_Message as a V1ErrorResponseMessage1
func (*V1ErrorResponse_Message) FromV1ErrorResponseMessage0 ¶
func (t *V1ErrorResponse_Message) FromV1ErrorResponseMessage0(v V1ErrorResponseMessage0) error
FromV1ErrorResponseMessage0 overwrites any union data inside the V1ErrorResponse_Message as the provided V1ErrorResponseMessage0
func (*V1ErrorResponse_Message) FromV1ErrorResponseMessage1 ¶
func (t *V1ErrorResponse_Message) FromV1ErrorResponseMessage1(v V1ErrorResponseMessage1) error
FromV1ErrorResponseMessage1 overwrites any union data inside the V1ErrorResponse_Message as the provided V1ErrorResponseMessage1
func (V1ErrorResponse_Message) MarshalJSON ¶
func (t V1ErrorResponse_Message) MarshalJSON() ([]byte, error)
func (*V1ErrorResponse_Message) MergeV1ErrorResponseMessage0 ¶
func (t *V1ErrorResponse_Message) MergeV1ErrorResponseMessage0(v V1ErrorResponseMessage0) error
MergeV1ErrorResponseMessage0 performs a merge with any union data inside the V1ErrorResponse_Message, using the provided V1ErrorResponseMessage0
func (*V1ErrorResponse_Message) MergeV1ErrorResponseMessage1 ¶
func (t *V1ErrorResponse_Message) MergeV1ErrorResponseMessage1(v V1ErrorResponseMessage1) error
MergeV1ErrorResponseMessage1 performs a merge with any union data inside the V1ErrorResponse_Message, using the provided V1ErrorResponseMessage1
func (*V1ErrorResponse_Message) UnmarshalJSON ¶
func (t *V1ErrorResponse_Message) UnmarshalJSON(b []byte) error
type V1HttpCheckConfigDto ¶
type V1HttpCheckConfigDto struct {
// BlockHttpDowngrade Fail an HTTPS to HTTP downgrade redirect. Computed default: true.
BlockHttpDowngrade nullable.Nullable[bool] `json:"blockHttpDowngrade,omitempty"`
// BodyContains Pass only if the body contains this substring (case-insensitive). null clears. Plan-gated.
BodyContains nullable.Nullable[string] `json:"bodyContains,omitempty"`
// BodyNotContains Fail if the body contains this substring (case-insensitive). null clears. Plan-gated.
BodyNotContains nullable.Nullable[string] `json:"bodyNotContains,omitempty"`
// CustomHeaders Custom request headers (at most 10). Keys are LOWERCASED on write and read back lowercased; two keys that differ only in case are rejected. Reserved names (authorization, cookie, host, proxy-*, x-forwarded-*, hop-by-hop) are rejected with 422. null clears. Plan-gated.
CustomHeaders nullable.Nullable[map[string]string] `json:"customHeaders,omitempty"`
// ExpectedStatusMax Highest passing HTTP status, inclusive. Computed default: 399.
ExpectedStatusMax nullable.Nullable[int] `json:"expectedStatusMax,omitempty"`
// ExpectedStatusMin Lowest passing HTTP status, inclusive. Computed default: 200. Must be <= expectedStatusMax.
ExpectedStatusMin nullable.Nullable[int] `json:"expectedStatusMin,omitempty"`
// FailAfterConsecutive Consecutive failures before an incident opens. Computed default: 3.
FailAfterConsecutive nullable.Nullable[int] `json:"failAfterConsecutive,omitempty"`
// FollowRedirects Follow redirects. Computed default: true.
FollowRedirects nullable.Nullable[bool] `json:"followRedirects,omitempty"`
// LatencyWarnMs Latency alert threshold in ms. null disables. Plan-gated.
LatencyWarnMs nullable.Nullable[int] `json:"latencyWarnMs,omitempty"`
// MaxRedirects Maximum redirects to follow. Computed default: 3.
MaxRedirects nullable.Nullable[int] `json:"maxRedirects,omitempty"`
// Method HTTP method the probe sends. Computed default: GET.
Method nullable.Nullable[OutboundHttpMethod] `json:"method,omitempty"`
// Regions Probe region ids (see GET /v1/regions); each must be served by this environment. Omitted or null stores no list and the check runs from the environment default regions, which GET renders. The count is plan-limited.
Regions nullable.Nullable[[]string] `json:"regions,omitempty"`
// ResolveAfterConsecutiveSuccess Consecutive successes before an incident resolves. Computed default: 2.
ResolveAfterConsecutiveSuccess nullable.Nullable[int] `json:"resolveAfterConsecutiveSuccess,omitempty"`
// SslExpiryWarnDays TLS certificate expiry alert threshold in days. Computed default: 14 (null resets to it). Setting a value is plan-gated.
SslExpiryWarnDays nullable.Nullable[int] `json:"sslExpiryWarnDays,omitempty"`
// TimeoutMs Probe timeout in milliseconds. Computed default: 8000.
TimeoutMs nullable.Nullable[int] `json:"timeoutMs,omitempty"`
// Url Target URL (http or https). Immutable after create: delete and recreate to change it.
Url string `json:"url"`
}
V1HttpCheckConfigDto defines model for V1HttpCheckConfigDto.
type V1HttpCheckConfigPatchDto ¶
type V1HttpCheckConfigPatchDto struct {
// BlockHttpDowngrade Fail an HTTPS to HTTP downgrade redirect. Computed default: true.
BlockHttpDowngrade nullable.Nullable[bool] `json:"blockHttpDowngrade,omitempty"`
// BodyContains Pass only if the body contains this substring (case-insensitive). null clears. Plan-gated.
BodyContains nullable.Nullable[string] `json:"bodyContains,omitempty"`
// BodyNotContains Fail if the body contains this substring (case-insensitive). null clears. Plan-gated.
BodyNotContains nullable.Nullable[string] `json:"bodyNotContains,omitempty"`
// CustomHeaders Custom request headers (at most 10). Keys are LOWERCASED on write and read back lowercased; two keys that differ only in case are rejected. Reserved names (authorization, cookie, host, proxy-*, x-forwarded-*, hop-by-hop) are rejected with 422. null clears. Plan-gated.
CustomHeaders nullable.Nullable[map[string]string] `json:"customHeaders,omitempty"`
// ExpectedStatusMax Highest passing HTTP status, inclusive. Computed default: 399.
ExpectedStatusMax nullable.Nullable[int] `json:"expectedStatusMax,omitempty"`
// ExpectedStatusMin Lowest passing HTTP status, inclusive. Computed default: 200. Must be <= expectedStatusMax.
ExpectedStatusMin nullable.Nullable[int] `json:"expectedStatusMin,omitempty"`
// FailAfterConsecutive Consecutive failures before an incident opens. Computed default: 3.
FailAfterConsecutive nullable.Nullable[int] `json:"failAfterConsecutive,omitempty"`
// FollowRedirects Follow redirects. Computed default: true.
FollowRedirects nullable.Nullable[bool] `json:"followRedirects,omitempty"`
// LatencyWarnMs Latency alert threshold in ms. null disables. Plan-gated.
LatencyWarnMs nullable.Nullable[int] `json:"latencyWarnMs,omitempty"`
// MaxRedirects Maximum redirects to follow. Computed default: 3.
MaxRedirects nullable.Nullable[int] `json:"maxRedirects,omitempty"`
// Method HTTP method the probe sends. Computed default: GET.
Method nullable.Nullable[OutboundHttpMethod] `json:"method,omitempty"`
// Regions Probe region ids (see GET /v1/regions); each must be served by this environment. Omitted or null stores no list and the check runs from the environment default regions, which GET renders. The count is plan-limited.
Regions nullable.Nullable[[]string] `json:"regions,omitempty"`
// ResolveAfterConsecutiveSuccess Consecutive successes before an incident resolves. Computed default: 2.
ResolveAfterConsecutiveSuccess nullable.Nullable[int] `json:"resolveAfterConsecutiveSuccess,omitempty"`
// SslExpiryWarnDays TLS certificate expiry alert threshold in days. Computed default: 14 (null resets to it). Setting a value is plan-gated.
SslExpiryWarnDays nullable.Nullable[int] `json:"sslExpiryWarnDays,omitempty"`
// TimeoutMs Probe timeout in milliseconds. Computed default: 8000.
TimeoutMs nullable.Nullable[int] `json:"timeoutMs,omitempty"`
// Url Immutable. Accepted only when equal to the stored url; anything else is 422 VALIDATION_FAILED.
Url *string `json:"url,omitempty"`
}
V1HttpCheckConfigPatchDto defines model for V1HttpCheckConfigPatchDto.
type V1HttpCheckConfigResponse ¶
type V1HttpCheckConfigResponse struct {
BlockHttpDowngrade nullable.Nullable[bool] `json:"blockHttpDowngrade"`
BodyContains nullable.Nullable[string] `json:"bodyContains"`
BodyNotContains nullable.Nullable[string] `json:"bodyNotContains"`
CustomHeaders nullable.Nullable[map[string]string] `json:"customHeaders"`
ExpectedStatusMax nullable.Nullable[int] `json:"expectedStatusMax"`
ExpectedStatusMin nullable.Nullable[int] `json:"expectedStatusMin"`
FailAfterConsecutive int `json:"failAfterConsecutive"`
FollowRedirects nullable.Nullable[bool] `json:"followRedirects"`
IpFamily IpFamily `json:"ipFamily"`
LatencyWarnMs nullable.Nullable[int] `json:"latencyWarnMs"`
MaxRedirects nullable.Nullable[int] `json:"maxRedirects"`
// MaxResponseBytes Read-only, computed per check type.
MaxResponseBytes int `json:"maxResponseBytes"`
Method nullable.Nullable[OutboundHttpMethod] `json:"method"`
// Regions Stored regions, or the environment defaults when none are stored.
Regions []string `json:"regions"`
ResolveAfterConsecutiveSuccess int `json:"resolveAfterConsecutiveSuccess"`
// SkipTlsVerification Read-only, computed.
SkipTlsVerification bool `json:"skipTlsVerification"`
SslExpiryWarnDays int `json:"sslExpiryWarnDays"`
TimeoutMs int `json:"timeoutMs"`
// Url null only for a non-HTTP check (read-only through v1).
Url nullable.Nullable[string] `json:"url"`
}
V1HttpCheckConfigResponse defines model for V1HttpCheckConfigResponse.
type V1RateLimitResponse ¶
type V1RateLimitResponse struct {
// Code RATE_LIMIT_EXCEEDED_KEY or OAUTH_RATE_LIMITED.
Code string `json:"code"`
Error string `json:"error"`
// Limit Requests per minute allowed in the bucket that tripped.
Limit int `json:"limit"`
// Message Human-readable message (string, or a list for validation failures).
Message V1RateLimitResponse_Message `json:"message"`
Plan *WorkspacePlan `json:"plan,omitempty"`
Scope V1RateLimitScope `json:"scope"`
StatusCode int `json:"statusCode"`
}
V1RateLimitResponse defines model for V1RateLimitResponse.
type V1RateLimitResponseMessage0 ¶
type V1RateLimitResponseMessage0 = string
V1RateLimitResponseMessage0 defines model for .
type V1RateLimitResponseMessage1 ¶
type V1RateLimitResponseMessage1 = []string
V1RateLimitResponseMessage1 defines model for .
type V1RateLimitResponse_Message ¶
type V1RateLimitResponse_Message struct {
// contains filtered or unexported fields
}
V1RateLimitResponse_Message Human-readable message (string, or a list for validation failures).
func (V1RateLimitResponse_Message) AsV1RateLimitResponseMessage0 ¶
func (t V1RateLimitResponse_Message) AsV1RateLimitResponseMessage0() (V1RateLimitResponseMessage0, error)
AsV1RateLimitResponseMessage0 returns the union data inside the V1RateLimitResponse_Message as a V1RateLimitResponseMessage0
func (V1RateLimitResponse_Message) AsV1RateLimitResponseMessage1 ¶
func (t V1RateLimitResponse_Message) AsV1RateLimitResponseMessage1() (V1RateLimitResponseMessage1, error)
AsV1RateLimitResponseMessage1 returns the union data inside the V1RateLimitResponse_Message as a V1RateLimitResponseMessage1
func (*V1RateLimitResponse_Message) FromV1RateLimitResponseMessage0 ¶
func (t *V1RateLimitResponse_Message) FromV1RateLimitResponseMessage0(v V1RateLimitResponseMessage0) error
FromV1RateLimitResponseMessage0 overwrites any union data inside the V1RateLimitResponse_Message as the provided V1RateLimitResponseMessage0
func (*V1RateLimitResponse_Message) FromV1RateLimitResponseMessage1 ¶
func (t *V1RateLimitResponse_Message) FromV1RateLimitResponseMessage1(v V1RateLimitResponseMessage1) error
FromV1RateLimitResponseMessage1 overwrites any union data inside the V1RateLimitResponse_Message as the provided V1RateLimitResponseMessage1
func (V1RateLimitResponse_Message) MarshalJSON ¶
func (t V1RateLimitResponse_Message) MarshalJSON() ([]byte, error)
func (*V1RateLimitResponse_Message) MergeV1RateLimitResponseMessage0 ¶
func (t *V1RateLimitResponse_Message) MergeV1RateLimitResponseMessage0(v V1RateLimitResponseMessage0) error
MergeV1RateLimitResponseMessage0 performs a merge with any union data inside the V1RateLimitResponse_Message, using the provided V1RateLimitResponseMessage0
func (*V1RateLimitResponse_Message) MergeV1RateLimitResponseMessage1 ¶
func (t *V1RateLimitResponse_Message) MergeV1RateLimitResponseMessage1(v V1RateLimitResponseMessage1) error
MergeV1RateLimitResponseMessage1 performs a merge with any union data inside the V1RateLimitResponse_Message, using the provided V1RateLimitResponseMessage1
func (*V1RateLimitResponse_Message) UnmarshalJSON ¶
func (t *V1RateLimitResponse_Message) UnmarshalJSON(b []byte) error
type V1RateLimitScope ¶
type V1RateLimitScope string
V1RateLimitScope defines model for V1RateLimitScope.
const ( V1RateLimitScopeApp V1RateLimitScope = "app" V1RateLimitScopeInstallation V1RateLimitScope = "installation" V1RateLimitScopeIp V1RateLimitScope = "ip" V1RateLimitScopePrincipal V1RateLimitScope = "principal" V1RateLimitScopeWorkspace V1RateLimitScope = "workspace" )
Defines values for V1RateLimitScope.
type WhoamiV1Response ¶
type WhoamiV1Response struct {
// ApiKeyPrefix Display prefix of the API key. Null for OAuth access tokens.
ApiKeyPrefix nullable.Nullable[string] `json:"apiKeyPrefix"`
PermissionLevel ApiKeyPermission `json:"permissionLevel"`
PrincipalKind PrincipalKind `json:"principalKind"`
ProjectedRole nullable.Nullable[WorkspaceRole] `json:"projectedRole"`
WorkspaceId int `json:"workspaceId"`
WorkspaceName string `json:"workspaceName"`
}
WhoamiV1Response defines model for WhoamiV1Response.
type WhoamiWhoamiResponse ¶
type WhoamiWhoamiResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *WhoamiV1Response
JSON400 *V1ErrorResponse
JSON401 *V1ErrorResponse
JSON403 *V1ErrorResponse
JSON429 *V1RateLimitResponse
JSON500 *V1ErrorResponse
}
func ParseWhoamiWhoamiResponse ¶
func ParseWhoamiWhoamiResponse(rsp *http.Response) (*WhoamiWhoamiResponse, error)
ParseWhoamiWhoamiResponse parses an HTTP response from a WhoamiWhoamiWithResponse call
func (WhoamiWhoamiResponse) Status ¶
func (r WhoamiWhoamiResponse) Status() string
Status returns HTTPResponse.Status
func (WhoamiWhoamiResponse) StatusCode ¶
func (r WhoamiWhoamiResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type WorkspacePlan ¶
type WorkspacePlan string
WorkspacePlan defines model for WorkspacePlan.
const ( WorkspacePlanBusiness WorkspacePlan = "business" WorkspacePlanFree WorkspacePlan = "free" WorkspacePlanPro WorkspacePlan = "pro" WorkspacePlanUnsubscribed WorkspacePlan = "unsubscribed" )
Defines values for WorkspacePlan.
type WorkspaceRole ¶
type WorkspaceRole string
WorkspaceRole defines model for WorkspaceRole.
const ( WorkspaceRoleAdmin WorkspaceRole = "admin" WorkspaceRoleMember WorkspaceRole = "member" WorkspaceRoleOwner WorkspaceRole = "owner" WorkspaceRoleViewer WorkspaceRole = "viewer" )
Defines values for WorkspaceRole.