syschecks

package module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: MIT Imports: 11 Imported by: 0

README

syschecks-go

Go Reference

Official Go client for the Syschecks API — monitoring, incidents, on-call, status pages, playbooks and more. Fully typed, generated from the OpenAPI spec.

go get github.com/systeampl/syschecks-go

Usage

package main

import (
	"context"
	"fmt"
	"log"

	syschecks "github.com/systeampl/syschecks-go"
	"github.com/systeampl/syschecks-go/models"
)

func main() {
	sc, err := syschecks.New("https://api.syschecks.com", "sk_...")
	if err != nil {
		log.Fatal(err)
	}

	ctx := context.Background()

	check, err := sc.Checks.GetCheckDetails(ctx, 42)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(check.Name, check.Status)

	created, err := sc.Checks.CreateNewCheck(ctx, models.CheckCreate{Name: "api-prod"})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println("created check", created.Id)
}

Every endpoint is a method on its resource namespace (sc.<Resource>.<Operation>), mirroring Stripe / Anthropic-style SDKs. Path parameters are positional; query filters and request bodies are typed values from the models package.

Endpoints with a typed response return that type (*models.CheckResponse); endpoints whose response is not modelled return the raw JSON as json.RawMessage.

Errors

An unexpected (non-2xx) HTTP status is returned as *syschecks.Error:

check, err := sc.Checks.GetCheckDetails(ctx, 999999)
var apiErr *syschecks.Error
if errors.As(err, &apiErr) {
	fmt.Println(apiErr.StatusCode) // 404
}

Options

sc, err := syschecks.New(baseURL, token,
	syschecks.WithHTTPClient(&http.Client{Timeout: 30 * time.Second}),
	syschecks.WithRequestEditor(func(ctx context.Context, req *http.Request) error {
		req.Header.Set("X-Request-ID", newID())
		return nil
	}),
)

Architecture

This SDK is generated from the curated OpenAPI spec (the source of truth):

  • models/ — typed HTTP core + models, produced by oapi-codegen.
  • resources_gen.go / client_gen.go — the fluent facade, generated by internal/cmd/genfacade, each method delegating to the core.
  • client.go, errors.go — the hand-written entry point (auth, options, error type).

Regenerate after a spec change:

./scripts/generate.sh            # uses ../syschecks-openapi/syschecks-openapi.json
./scripts/generate.sh path/to/spec.json

Streaming events

The /api/events server-sent event stream is exposed as an iterator:

stream, err := sc.Events.EventStream(ctx)
if err != nil {
	log.Fatal(err)
}
defer stream.Close()

for stream.Next() {
	fmt.Println(string(stream.Event())) // raw JSON of each event
}
if err := stream.Err(); err != nil {
	log.Fatal(err)
}

Stability

0.x releases are alpha: the surface may change before 1.0. The facade covers the full client API surface, including the multipart war-room attachment upload (sc.WarRooms.UploadAttachment).

Development

go test ./...

Documentation

Overview

Package syschecks is the official Go client for the Syschecks API — monitoring, incidents, on-call, status pages, playbooks and more.

Create a client with a personal access token and call endpoints through their resource namespace:

sc, err := syschecks.New("https://api.syschecks.com", "sk_...")
if err != nil {
	log.Fatal(err)
}
check, err := sc.Checks.GetCheckDetails(ctx, 42)

Path parameters are positional; query filters and request bodies are passed as typed values from the models package. An unexpected HTTP status is returned as *Error.

The typed core in the models package is generated from the curated OpenAPI spec; the resource facade in this package is generated on top of it. See scripts/generate.sh.

Index

Constants

View Source
const Version = "0.3.3"

Version is the SDK release, sent as part of the User-Agent header.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionItems

type ActionItems struct {
	// contains filtered or unexported fields
}

ActionItems groups the ActionItems endpoints.

func (*ActionItems) GetActionItemsSummary

func (r *ActionItems) GetActionItemsSummary(ctx context.Context, orgId int) (json.RawMessage, error)

func (*ActionItems) ListActionItems

func (r *ActionItems) ListActionItems(ctx context.Context, orgId int, params *models.ListActionItemsParams) (json.RawMessage, error)

func (*ActionItems) UpdateActionItem

func (r *ActionItems) UpdateActionItem(ctx context.Context, orgId int, itemId int, body models.UpdateActionItemJSONRequestBody) (json.RawMessage, error)

type ChangeEvents

type ChangeEvents struct {
	// contains filtered or unexported fields
}

ChangeEvents groups the ChangeEvents endpoints.

func (*ChangeEvents) CorrelateChangeEvents

func (r *ChangeEvents) CorrelateChangeEvents(ctx context.Context, orgId int, incidentId int) (json.RawMessage, error)

func (*ChangeEvents) CreateChangeEvent

func (*ChangeEvents) DeleteChangeEvent

func (r *ChangeEvents) DeleteChangeEvent(ctx context.Context, orgId int, eventId int) (json.RawMessage, error)

func (*ChangeEvents) ListChangeEvents

func (r *ChangeEvents) ListChangeEvents(ctx context.Context, orgId int, params *models.ListChangeEventsParams) (json.RawMessage, error)

type Checks

type Checks struct {
	// contains filtered or unexported fields
}

Checks groups the Checks endpoints.

func (*Checks) AddCheckDependency

func (r *Checks) AddCheckDependency(ctx context.Context, checkId int, body models.AddCheckDependencyJSONRequestBody) (json.RawMessage, error)

func (*Checks) AddCheckProviderDependency

func (r *Checks) AddCheckProviderDependency(ctx context.Context, checkId int, body models.AddCheckProviderDependencyJSONRequestBody) (json.RawMessage, error)

func (*Checks) ApproveDnsSnapshot

func (r *Checks) ApproveDnsSnapshot(ctx context.Context, checkId int) (json.RawMessage, error)

func (*Checks) CloneCheck

func (r *Checks) CloneCheck(ctx context.Context, checkId int) (*models.CheckResponse, error)

func (*Checks) CreateCheckSlo

func (r *Checks) CreateCheckSlo(ctx context.Context, checkId int, body models.CreateCheckSloJSONRequestBody) (*models.SLOResponse, error)

func (*Checks) CreateNewCheck

func (*Checks) DeleteCheckProviderDependency

func (r *Checks) DeleteCheckProviderDependency(ctx context.Context, checkId int, linkId int) (json.RawMessage, error)

func (*Checks) DeleteCheckSlo

func (r *Checks) DeleteCheckSlo(ctx context.Context, checkId int, sloId int) (json.RawMessage, error)

func (*Checks) ExportCheckIncidentsCsv

func (r *Checks) ExportCheckIncidentsCsv(ctx context.Context, checkId int, params *models.ExportCheckIncidentsCsvParams) (json.RawMessage, error)

func (*Checks) ExportCheckLogsCsv

func (r *Checks) ExportCheckLogsCsv(ctx context.Context, checkId int, params *models.ExportCheckLogsCsvParams) (json.RawMessage, error)

func (*Checks) GetCheckChannels

func (r *Checks) GetCheckChannels(ctx context.Context, checkId int) (*[]models.NotificationChannelBrief, error)

func (*Checks) GetCheckDependencies

func (r *Checks) GetCheckDependencies(ctx context.Context, checkId int) (json.RawMessage, error)

func (*Checks) GetCheckDetails

func (r *Checks) GetCheckDetails(ctx context.Context, checkId int) (*models.CheckResponse, error)

func (*Checks) GetCheckIncidentDetail

func (r *Checks) GetCheckIncidentDetail(ctx context.Context, checkId int, logId int) (json.RawMessage, error)

func (*Checks) GetCheckIncidents

func (r *Checks) GetCheckIncidents(ctx context.Context, checkId int, params *models.GetCheckIncidentsParams) (json.RawMessage, error)

func (*Checks) GetCheckLogs

func (r *Checks) GetCheckLogs(ctx context.Context, checkId int, params *models.GetCheckLogsParams) (*models.CheckLogPaginatedResponse, error)

func (*Checks) GetCheckPagespeedHistory

func (r *Checks) GetCheckPagespeedHistory(ctx context.Context, checkId int, params *models.GetCheckPagespeedHistoryParams) (json.RawMessage, error)

func (*Checks) GetCheckPreferences

func (r *Checks) GetCheckPreferences(ctx context.Context, checkId int) (json.RawMessage, error)

func (*Checks) GetCheckProviderDependencies

func (r *Checks) GetCheckProviderDependencies(ctx context.Context, checkId int) (json.RawMessage, error)

func (*Checks) GetCheckSla

func (r *Checks) GetCheckSla(ctx context.Context, checkId int) (json.RawMessage, error)

func (*Checks) GetCheckSlo

func (r *Checks) GetCheckSlo(ctx context.Context, checkId int) (*models.SLOStatusResponse, error)

func (*Checks) GetCheckStats

func (r *Checks) GetCheckStats(ctx context.Context, checkId int, params *models.GetCheckStatsParams) (json.RawMessage, error)

func (*Checks) GetCheckTimeseries

func (r *Checks) GetCheckTimeseries(ctx context.Context, checkId int, params *models.GetCheckTimeseriesParams) (json.RawMessage, error)

func (*Checks) GetCheckTimeseriesRange

func (r *Checks) GetCheckTimeseriesRange(ctx context.Context, checkId int, params *models.GetCheckTimeseriesRangeParams) (json.RawMessage, error)

func (*Checks) GetDnsMultiRecord

func (r *Checks) GetDnsMultiRecord(ctx context.Context, checkId int) (json.RawMessage, error)

func (*Checks) GetDnsSnapshot

func (r *Checks) GetDnsSnapshot(ctx context.Context, checkId int) (json.RawMessage, error)

func (*Checks) GetGeoHistogram

func (r *Checks) GetGeoHistogram(ctx context.Context, checkId int, params *models.GetGeoHistogramParams) (json.RawMessage, error)

func (*Checks) GetOidcRealmStatuses

func (r *Checks) GetOidcRealmStatuses(ctx context.Context, checkId int) (json.RawMessage, error)

func (*Checks) GetSloSummary

func (r *Checks) GetSloSummary(ctx context.Context) (*models.SLOSummaryResponse, error)

func (*Checks) ListChecks

func (r *Checks) ListChecks(ctx context.Context, params *models.ListChecksParams) (*[]models.CheckResponse, error)

func (*Checks) RefreshCheckSlo

func (r *Checks) RefreshCheckSlo(ctx context.Context, checkId int, sloId int) (*models.SLOStatusResponse, error)

func (*Checks) RemoveCheck

func (r *Checks) RemoveCheck(ctx context.Context, checkId int) (json.RawMessage, error)

func (*Checks) RemoveCheckDependency

func (r *Checks) RemoveCheckDependency(ctx context.Context, checkId int, depId int) (json.RawMessage, error)

func (*Checks) ResolveCheckIncident

func (r *Checks) ResolveCheckIncident(ctx context.Context, checkId int, logId int) (json.RawMessage, error)

func (*Checks) RotateCheckUuid

func (r *Checks) RotateCheckUuid(ctx context.Context, checkId int) (json.RawMessage, error)

func (*Checks) RunCheckNow

func (r *Checks) RunCheckNow(ctx context.Context, checkId int) (json.RawMessage, error)

func (*Checks) SendTestAlert

func (r *Checks) SendTestAlert(ctx context.Context, checkId int, body models.SendTestAlertJSONRequestBody) (json.RawMessage, error)

func (*Checks) SetCheckChannels

func (*Checks) UpdateCheck

func (r *Checks) UpdateCheck(ctx context.Context, checkId int, body models.UpdateCheckJSONRequestBody) (*models.CheckResponse, error)

func (*Checks) UpdateCheckPreferences

func (r *Checks) UpdateCheckPreferences(ctx context.Context, checkId int, body models.UpdateCheckPreferencesJSONRequestBody) (json.RawMessage, error)

func (*Checks) UpdateCheckProviderDependency

func (r *Checks) UpdateCheckProviderDependency(ctx context.Context, checkId int, linkId int, body models.UpdateCheckProviderDependencyJSONRequestBody) (json.RawMessage, error)

func (*Checks) UpdateCheckSlo

func (r *Checks) UpdateCheckSlo(ctx context.Context, checkId int, sloId int, body models.UpdateCheckSloJSONRequestBody) (*models.SLOResponse, error)

func (*Checks) UpdateDnsHijackAlerts

func (r *Checks) UpdateDnsHijackAlerts(ctx context.Context, checkId int, body models.UpdateDnsHijackAlertsJSONRequestBody) (json.RawMessage, error)

func (*Checks) UpdateDnsMultiRecord

func (r *Checks) UpdateDnsMultiRecord(ctx context.Context, checkId int, body models.UpdateDnsMultiRecordJSONRequestBody) (json.RawMessage, error)

func (*Checks) UpdateDomainAlerts

func (r *Checks) UpdateDomainAlerts(ctx context.Context, checkId int, params *models.UpdateDomainAlertsParams) (json.RawMessage, error)

func (*Checks) UpdateSslAlerts

func (r *Checks) UpdateSslAlerts(ctx context.Context, checkId int, params *models.UpdateSslAlertsParams) (json.RawMessage, error)

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is the entry point to the Syschecks API. Every endpoint hangs off a resource namespace, e.g. c.Checks.ListChecks(ctx, nil).

func New

func New(baseURL, token string, opts ...Option) (*Client, error)

New returns a Client authenticated with a personal access token. baseURL is the API root, e.g. "https://api.syschecks.com".

type CloudStatus

type CloudStatus struct {
	// contains filtered or unexported fields
}

CloudStatus groups the CloudStatus endpoints.

func (*CloudStatus) CreateCustomStatusPage

func (r *CloudStatus) CreateCustomStatusPage(ctx context.Context, orgId int, body models.CreateCustomStatusPageJSONRequestBody) (json.RawMessage, error)

func (*CloudStatus) DeleteCloudSubscription

func (r *CloudStatus) DeleteCloudSubscription(ctx context.Context, orgId int, provider string) (json.RawMessage, error)

func (*CloudStatus) DeleteCustomStatusPage

func (r *CloudStatus) DeleteCustomStatusPage(ctx context.Context, orgId int, pageId int) (json.RawMessage, error)

func (*CloudStatus) GetCheckCloudContext

func (r *CloudStatus) GetCheckCloudContext(ctx context.Context, checkId int) (json.RawMessage, error)

func (*CloudStatus) GetCloudCorrelation

func (r *CloudStatus) GetCloudCorrelation(ctx context.Context, orgId int) (json.RawMessage, error)

func (*CloudStatus) GetCloudStatusDetail

func (r *CloudStatus) GetCloudStatusDetail(ctx context.Context, provider string) (json.RawMessage, error)

func (*CloudStatus) GetEarlyWarnings

func (r *CloudStatus) GetEarlyWarnings(ctx context.Context) (*models.EarlyWarningsResponse, error)

func (*CloudStatus) ListCloudStatuses

func (r *CloudStatus) ListCloudStatuses(ctx context.Context) (*[]models.CloudProviderStatusItem, error)

func (*CloudStatus) ListCloudSubscriptions

func (r *CloudStatus) ListCloudSubscriptions(ctx context.Context, orgId int) (json.RawMessage, error)

func (*CloudStatus) ListCustomStatusPages

func (r *CloudStatus) ListCustomStatusPages(ctx context.Context, orgId int) (json.RawMessage, error)

func (*CloudStatus) TestCustomStatusPage

func (r *CloudStatus) TestCustomStatusPage(ctx context.Context, orgId int, pageId int) (json.RawMessage, error)

func (*CloudStatus) UpdateCustomStatusPage

func (r *CloudStatus) UpdateCustomStatusPage(ctx context.Context, orgId int, pageId int, body models.UpdateCustomStatusPageJSONRequestBody) (json.RawMessage, error)

func (*CloudStatus) UpsertCloudSubscription

func (r *CloudStatus) UpsertCloudSubscription(ctx context.Context, orgId int, body models.UpsertCloudSubscriptionJSONRequestBody) (json.RawMessage, error)

type ContactMethods

type ContactMethods struct {
	// contains filtered or unexported fields
}

ContactMethods groups the ContactMethods endpoints.

func (*ContactMethods) DeleteContactMethod

func (r *ContactMethods) DeleteContactMethod(ctx context.Context, methodId int) (json.RawMessage, error)

func (*ContactMethods) ListContactMethods

func (r *ContactMethods) ListContactMethods(ctx context.Context) (*[]models.ContactMethodResponse, error)

func (*ContactMethods) ListNotificationRules

func (r *ContactMethods) ListNotificationRules(ctx context.Context) (*[]models.NotificationRuleItem, error)

func (*ContactMethods) ResendVerification

func (r *ContactMethods) ResendVerification(ctx context.Context, methodId int) (*models.ContactMethodVerifyResponse, error)

func (*ContactMethods) TestContactMethod

func (r *ContactMethods) TestContactMethod(ctx context.Context, methodId int) (*models.ContactMethodVerifyResponse, error)

func (*ContactMethods) UpdateContactMethod

func (*ContactMethods) VerifyContactMethod

type Error

type Error struct {
	StatusCode int
	Body       []byte
}

Error is returned when the API responds with an unexpected (non-2xx) status. Body holds the raw response payload, which for validation failures is the JSON-encoded detail returned by the API.

func (*Error) Error

func (e *Error) Error() string

type EventStream

type EventStream struct {
	// contains filtered or unexported fields
}

EventStream is a live reader over the /api/events server-sent event stream. Iterate with Next, read the current payload with Event, and always Close it.

stream, err := sc.Events.EventStream(ctx)
if err != nil {
	return err
}
defer stream.Close()
for stream.Next() {
	fmt.Println(string(stream.Event()))
}
return stream.Err()

func (*EventStream) Close

func (s *EventStream) Close() error

Close releases the underlying connection.

func (*EventStream) Err

func (s *EventStream) Err() error

Err returns the first error encountered while reading the stream, if any.

func (*EventStream) Event

func (s *EventStream) Event() json.RawMessage

Event returns the payload of the current event: the raw bytes of the joined data frame, which is JSON when the server sends JSON.

func (*EventStream) Next

func (s *EventStream) Next() bool

Next advances to the next event, returning false when the stream ends or on error (check Err). The payload is then available from Event.

type Events

type Events struct {
	// contains filtered or unexported fields
}

Events groups the Events endpoints.

func (*Events) EventStream

func (r *Events) EventStream(ctx context.Context) (*EventStream, error)

EventStream opens the SSE stream. The connection stays open until Close is called or ctx is cancelled. The stream is not modelled in the OpenAPI spec, so this is hand-written rather than generated.

type IncidentAnalytics

type IncidentAnalytics struct {
	// contains filtered or unexported fields
}

IncidentAnalytics groups the IncidentAnalytics endpoints.

func (*IncidentAnalytics) CategorizeIncident

func (r *IncidentAnalytics) CategorizeIncident(ctx context.Context, orgId int, incidentId int, body models.CategorizeIncidentJSONRequestBody) (json.RawMessage, error)

func (*IncidentAnalytics) GetIncidentAnalytics

func (r *IncidentAnalytics) GetIncidentAnalytics(ctx context.Context, orgId int, params *models.GetIncidentAnalyticsParams) (json.RawMessage, error)

func (*IncidentAnalytics) GetIncidentTags

func (r *IncidentAnalytics) GetIncidentTags(ctx context.Context, orgId int) (json.RawMessage, error)

type Incidents

type Incidents struct {
	// contains filtered or unexported fields
}

Incidents groups the Incidents endpoints.

func (*Incidents) AcknowledgeIncident

func (r *Incidents) AcknowledgeIncident(ctx context.Context, checkId int, logId int, body models.AcknowledgeIncidentJSONRequestBody) (json.RawMessage, error)

func (*Incidents) AcknowledgeIncidentByToken

func (r *Incidents) AcknowledgeIncidentByToken(ctx context.Context, token string) (json.RawMessage, error)

func (*Incidents) AcknowledgeIncidentPage

func (r *Incidents) AcknowledgeIncidentPage(ctx context.Context, token string) (json.RawMessage, error)

func (*Incidents) AddIncidentNote

func (r *Incidents) AddIncidentNote(ctx context.Context, orgId int, incidentType string, refId int, body models.AddIncidentNoteJSONRequestBody) (json.RawMessage, error)

func (*Incidents) AssignIncidentRole

func (r *Incidents) AssignIncidentRole(ctx context.Context, orgId int, incidentType string, refId int, body models.AssignIncidentRoleJSONRequestBody) (json.RawMessage, error)

func (*Incidents) GetIncidentAcknowledgments

func (r *Incidents) GetIncidentAcknowledgments(ctx context.Context, checkId int, logId int) (json.RawMessage, error)

func (*Incidents) GetIncidentNotificationDeliveries

func (r *Incidents) GetIncidentNotificationDeliveries(ctx context.Context, orgId int, incidentType string, refId int) (json.RawMessage, error)

func (*Incidents) GetIncidentTimeline

func (r *Incidents) GetIncidentTimeline(ctx context.Context, orgId int, incidentType string, refId int) (json.RawMessage, error)

func (*Incidents) ListIncidentNotes

func (r *Incidents) ListIncidentNotes(ctx context.Context, orgId int, incidentType string, refId int) (json.RawMessage, error)

func (*Incidents) ListIncidentRoles

func (r *Incidents) ListIncidentRoles(ctx context.Context, orgId int, incidentType string, refId int) (json.RawMessage, error)

func (*Incidents) ListIncidents

func (r *Incidents) ListIncidents(ctx context.Context, params *models.ListIncidentsParams) (json.RawMessage, error)

func (*Incidents) StarTimelineEvent

func (r *Incidents) StarTimelineEvent(ctx context.Context, orgId int, incidentType string, refId int, activityId int) (json.RawMessage, error)

func (*Incidents) UnassignIncidentRole

func (r *Incidents) UnassignIncidentRole(ctx context.Context, orgId int, incidentType string, refId int, assignmentId int) (json.RawMessage, error)

func (*Incidents) UnstarTimelineEvent

func (r *Incidents) UnstarTimelineEvent(ctx context.Context, orgId int, incidentType string, refId int, activityId int) (json.RawMessage, error)

type IntegrationKeys added in v0.2.0

type IntegrationKeys struct {
	// contains filtered or unexported fields
}

IntegrationKeys groups the IntegrationKeys endpoints.

func (*IntegrationKeys) CreateIntegrationKey added in v0.2.0

func (r *IntegrationKeys) CreateIntegrationKey(ctx context.Context, orgId int, body models.CreateIntegrationKeyJSONRequestBody) (json.RawMessage, error)

func (*IntegrationKeys) ListIntegrationKeys added in v0.2.0

func (r *IntegrationKeys) ListIntegrationKeys(ctx context.Context, orgId int) (json.RawMessage, error)

func (*IntegrationKeys) RevokeIntegrationKey added in v0.2.0

func (r *IntegrationKeys) RevokeIntegrationKey(ctx context.Context, orgId int, keyId int) (json.RawMessage, error)

type Lifecycle

type Lifecycle struct {
	// contains filtered or unexported fields
}

Lifecycle groups the Lifecycle endpoints.

func (*Lifecycle) DeleteLifecycleWatch

func (r *Lifecycle) DeleteLifecycleWatch(ctx context.Context, orgId int, watchId int) (json.RawMessage, error)

func (*Lifecycle) GetLifecycleCatalogue

func (r *Lifecycle) GetLifecycleCatalogue(ctx context.Context) (*[]models.LifecycleCatalogueItem, error)

func (*Lifecycle) GetLifecycleWatch

func (r *Lifecycle) GetLifecycleWatch(ctx context.Context, orgId int, watchId int) (*models.LifecycleWatchResponse, error)

func (*Lifecycle) ListLifecycleEvents

func (r *Lifecycle) ListLifecycleEvents(ctx context.Context) (*[]models.LifecycleEventItem, error)

func (*Lifecycle) ListLifecycleWatches

func (r *Lifecycle) ListLifecycleWatches(ctx context.Context, orgId int) (*[]models.LifecycleWatchResponse, error)

func (*Lifecycle) UpsertLifecycleWatch

func (r *Lifecycle) UpsertLifecycleWatch(ctx context.Context, orgId int, body models.UpsertLifecycleWatchJSONRequestBody) (json.RawMessage, error)

type Maintenance

type Maintenance struct {
	// contains filtered or unexported fields
}

Maintenance groups the Maintenance endpoints.

func (*Maintenance) CheckMaintenanceStatus

func (r *Maintenance) CheckMaintenanceStatus(ctx context.Context, checkId int) (json.RawMessage, error)

func (*Maintenance) DeleteMaintenanceWindow

func (r *Maintenance) DeleteMaintenanceWindow(ctx context.Context, windowId int) (json.RawMessage, error)

func (*Maintenance) GetMaintenanceWindow

func (r *Maintenance) GetMaintenanceWindow(ctx context.Context, windowId int) (*models.MaintenanceWindowResponse, error)

func (*Maintenance) ListActiveMaintenanceWindows

func (r *Maintenance) ListActiveMaintenanceWindows(ctx context.Context) (*[]models.MaintenanceWindowResponse, error)

func (*Maintenance) ListMaintenanceWindows

func (*Maintenance) UpdateMaintenanceWindow

type Metrics

type Metrics struct {
	// contains filtered or unexported fields
}

Metrics groups the Metrics endpoints.

func (*Metrics) CreateMetricsKey

func (*Metrics) DeactivateMetricsKey

func (r *Metrics) DeactivateMetricsKey(ctx context.Context, projectId int, keyId int) (json.RawMessage, error)

func (*Metrics) GetMetricsByKey

func (r *Metrics) GetMetricsByKey(ctx context.Context, metricsKey string, params *models.GetMetricsByKeyParams) (json.RawMessage, error)

func (*Metrics) ListMetricsKeys

func (r *Metrics) ListMetricsKeys(ctx context.Context, projectId int) (*[]models.MetricsKeyResponse, error)

func (*Metrics) RotateMetricsKey

func (r *Metrics) RotateMetricsKey(ctx context.Context, projectId int, keyId int) (*models.MetricsKeyCreatedResponse, error)

type NotificationChannels

type NotificationChannels struct {
	// contains filtered or unexported fields
}

NotificationChannels groups the NotificationChannels endpoints.

func (*NotificationChannels) DeleteChannel

func (r *NotificationChannels) DeleteChannel(ctx context.Context, channelId int) (json.RawMessage, error)

func (*NotificationChannels) GetChannel

func (*NotificationChannels) ListChannels

func (*NotificationChannels) RotateWebhookSecret

func (r *NotificationChannels) RotateWebhookSecret(ctx context.Context, channelId int) (json.RawMessage, error)

func (*NotificationChannels) TestChannel

func (r *NotificationChannels) TestChannel(ctx context.Context, channelId int) (*models.ChannelTestResponse, error)

func (*NotificationChannels) TestSmtpConnection

func (*NotificationChannels) UpdateChannel

type Oncall

type Oncall struct {
	// contains filtered or unexported fields
}

Oncall groups the Oncall endpoints.

func (*Oncall) AcceptCoverRequest

func (r *Oncall) AcceptCoverRequest(ctx context.Context, orgId int, crId int) (json.RawMessage, error)

func (*Oncall) CreateCoverRequest

func (r *Oncall) CreateCoverRequest(ctx context.Context, orgId int, scheduleId int, body models.CreateCoverRequestJSONRequestBody) (json.RawMessage, error)

func (*Oncall) CreateLayer

func (r *Oncall) CreateLayer(ctx context.Context, orgId int, scheduleId int, body models.CreateLayerJSONRequestBody) (json.RawMessage, error)

func (*Oncall) CreateOverride

func (r *Oncall) CreateOverride(ctx context.Context, orgId int, scheduleId int, body models.CreateOverrideJSONRequestBody) (json.RawMessage, error)

func (*Oncall) CreatePolicy

func (*Oncall) CreateSchedule

func (*Oncall) DeclineCoverRequest

func (r *Oncall) DeclineCoverRequest(ctx context.Context, orgId int, crId int) (json.RawMessage, error)

func (*Oncall) DeleteLayer

func (r *Oncall) DeleteLayer(ctx context.Context, orgId int, scheduleId int, layerId int) (json.RawMessage, error)

func (*Oncall) DeleteOverride

func (r *Oncall) DeleteOverride(ctx context.Context, orgId int, overrideId int) (json.RawMessage, error)

func (*Oncall) DeletePolicy

func (r *Oncall) DeletePolicy(ctx context.Context, orgId int, policyId int) (json.RawMessage, error)

func (*Oncall) DeleteSchedule

func (r *Oncall) DeleteSchedule(ctx context.Context, orgId int, scheduleId int) (json.RawMessage, error)

func (*Oncall) GetCurrentOncall

func (r *Oncall) GetCurrentOncall(ctx context.Context, orgId int, scheduleId int) (json.RawMessage, error)

func (*Oncall) GetOncallHandoff

func (r *Oncall) GetOncallHandoff(ctx context.Context, orgId int) (json.RawMessage, error)

func (*Oncall) GetOncallHealth

func (r *Oncall) GetOncallHealth(ctx context.Context, orgId int, params *models.GetOncallHealthParams) (json.RawMessage, error)

func (*Oncall) GetPolicy

func (r *Oncall) GetPolicy(ctx context.Context, orgId int, policyId int) (*models.EscalationPolicyResponse, error)

func (*Oncall) GetSchedule

func (r *Oncall) GetSchedule(ctx context.Context, orgId int, scheduleId int) (*models.OncallScheduleResponse, error)

func (*Oncall) GetScheduleContacts

func (r *Oncall) GetScheduleContacts(ctx context.Context, orgId int, scheduleId int) (json.RawMessage, error)

func (*Oncall) GetScheduleQuality

func (r *Oncall) GetScheduleQuality(ctx context.Context, orgId int, scheduleId int) (json.RawMessage, error)

func (*Oncall) GetScheduleTimeline

func (r *Oncall) GetScheduleTimeline(ctx context.Context, orgId int, scheduleId int, params *models.GetScheduleTimelineParams) (json.RawMessage, error)

func (*Oncall) ListCoverRequests

func (r *Oncall) ListCoverRequests(ctx context.Context, orgId int, scheduleId int) (json.RawMessage, error)

func (*Oncall) ListPolicies

func (r *Oncall) ListPolicies(ctx context.Context, orgId int, params *models.ListPoliciesParams) (*[]models.EscalationPolicyResponse, error)

func (*Oncall) ListSchedules

func (r *Oncall) ListSchedules(ctx context.Context, orgId int, params *models.ListSchedulesParams) (*[]models.OncallScheduleResponse, error)

func (*Oncall) MarkUnavailable

func (r *Oncall) MarkUnavailable(ctx context.Context, orgId int, scheduleId int) (json.RawMessage, error)

func (*Oncall) UpdateLayer

func (r *Oncall) UpdateLayer(ctx context.Context, orgId int, scheduleId int, layerId int, body models.UpdateLayerJSONRequestBody) (json.RawMessage, error)

func (*Oncall) UpdatePolicy

func (r *Oncall) UpdatePolicy(ctx context.Context, orgId int, policyId int, body models.UpdatePolicyJSONRequestBody) (*models.EscalationPolicyResponse, error)

func (*Oncall) UpdateSchedule

func (r *Oncall) UpdateSchedule(ctx context.Context, orgId int, scheduleId int, body models.UpdateScheduleJSONRequestBody) (*models.OncallScheduleResponse, error)

type Option

type Option func(*config)

Option configures a Client.

func WithHTTPClient

func WithHTTPClient(h *http.Client) Option

WithHTTPClient sets the underlying HTTP client used for every request.

func WithRequestEditor

func WithRequestEditor(fn func(ctx context.Context, req *http.Request) error) Option

WithRequestEditor registers a hook invoked on every outgoing request, after the built-in authentication header is applied. Useful for tracing or custom headers.

type Organizations

type Organizations struct {
	// contains filtered or unexported fields
}

Organizations groups the Organizations endpoints.

func (*Organizations) AcceptInvitation

func (r *Organizations) AcceptInvitation(ctx context.Context, orgId int, body models.AcceptInvitationJSONRequestBody) (json.RawMessage, error)

func (*Organizations) AcceptInvitationByToken

func (r *Organizations) AcceptInvitationByToken(ctx context.Context, params *models.AcceptInvitationByTokenParams) (json.RawMessage, error)

func (*Organizations) AddProjectMember

func (r *Organizations) AddProjectMember(ctx context.Context, orgId int, projectId int, body models.AddProjectMemberJSONRequestBody) (*models.ProjectMembershipResponse, error)

func (*Organizations) BulkAddProjectMembers

func (r *Organizations) BulkAddProjectMembers(ctx context.Context, orgId int, projectId int, body models.BulkAddProjectMembersJSONRequestBody) (*[]models.ProjectMembershipResponse, error)

func (*Organizations) BulkRemoveProjectMembers

func (r *Organizations) BulkRemoveProjectMembers(ctx context.Context, orgId int, projectId int, body models.BulkRemoveProjectMembersJSONRequestBody) (json.RawMessage, error)

func (*Organizations) CreateOrgAgentRegistrationToken

func (r *Organizations) CreateOrgAgentRegistrationToken(ctx context.Context, orgId int) (*models.AgentRegistrationTokenResponse, error)

func (*Organizations) CreateOrganizationProject

func (r *Organizations) CreateOrganizationProject(ctx context.Context, orgId int, body models.CreateOrganizationProjectJSONRequestBody) (*models.ProjectResponse, error)

func (*Organizations) DeleteOrgAgent

func (r *Organizations) DeleteOrgAgent(ctx context.Context, orgId int, agentId int) (json.RawMessage, error)

func (*Organizations) DeleteOrganization

func (r *Organizations) DeleteOrganization(ctx context.Context, orgId int, params *models.DeleteOrganizationParams) (json.RawMessage, error)

func (*Organizations) DeleteOrganizationProject

func (r *Organizations) DeleteOrganizationProject(ctx context.Context, orgId int, projectId int) (json.RawMessage, error)

func (*Organizations) DeleteOrganizationToken

func (r *Organizations) DeleteOrganizationToken(ctx context.Context, orgId int, tokenId int) (json.RawMessage, error)

func (*Organizations) ExportOrganizationAuditLogs

func (r *Organizations) ExportOrganizationAuditLogs(ctx context.Context, orgId int, params *models.ExportOrganizationAuditLogsParams) (json.RawMessage, error)

func (*Organizations) ExportOrganizationConfig

func (r *Organizations) ExportOrganizationConfig(ctx context.Context, orgId int) (json.RawMessage, error)

func (*Organizations) GetDependencyAlerts

func (r *Organizations) GetDependencyAlerts(ctx context.Context, orgId int) (json.RawMessage, error)

func (*Organizations) GetOrganization

func (r *Organizations) GetOrganization(ctx context.Context, orgId int) (*models.OrganizationWithPlanResponse, error)

func (*Organizations) GetOrganizationAuditLogs

func (r *Organizations) GetOrganizationAuditLogs(ctx context.Context, orgId int, params *models.GetOrganizationAuditLogsParams) (*models.AuditLogListResponse, error)

func (*Organizations) GetOrganizationAuditStats

func (r *Organizations) GetOrganizationAuditStats(ctx context.Context, orgId int, params *models.GetOrganizationAuditStatsParams) (json.RawMessage, error)

func (*Organizations) GetOrganizationBySlug

func (r *Organizations) GetOrganizationBySlug(ctx context.Context, slug string) (*models.OrganizationWithPlanResponse, error)

func (*Organizations) GetOrganizationPlan

func (r *Organizations) GetOrganizationPlan(ctx context.Context, orgId int) (*models.PlanResponse, error)

func (*Organizations) GetOrganizationProject

func (r *Organizations) GetOrganizationProject(ctx context.Context, orgId int, projectId int) (*models.ProjectResponse, error)

func (*Organizations) GetOrganizationSettings

func (r *Organizations) GetOrganizationSettings(ctx context.Context, orgId int) (*models.OrganizationSettingsResponse, error)

func (*Organizations) GetOrganizationSettingsLimits

func (r *Organizations) GetOrganizationSettingsLimits(ctx context.Context, orgId int) (*models.OrganizationSettingsLimitsResponse, error)

func (*Organizations) GetOrganizationUsage

func (r *Organizations) GetOrganizationUsage(ctx context.Context, orgId int) (*models.OrganizationUsageResponse, error)

func (*Organizations) ImportOrganizationConfig

func (r *Organizations) ImportOrganizationConfig(ctx context.Context, orgId int, body models.ImportOrganizationConfigJSONRequestBody) (json.RawMessage, error)

func (*Organizations) InviteMember

func (*Organizations) ListAvailablePlans

func (r *Organizations) ListAvailablePlans(ctx context.Context) (*[]models.PlanResponse, error)

func (*Organizations) ListMembers

func (*Organizations) ListOrgAgents

func (r *Organizations) ListOrgAgents(ctx context.Context, orgId int) (json.RawMessage, error)

func (*Organizations) ListOrganizationProjects

func (r *Organizations) ListOrganizationProjects(ctx context.Context, orgId int, params *models.ListOrganizationProjectsParams) (*[]models.ProjectResponse, error)

func (*Organizations) ListOrganizationTokens

func (r *Organizations) ListOrganizationTokens(ctx context.Context, orgId int) (*[]models.PersonalAccessTokenResponse, error)

func (*Organizations) ListOrganizations

func (r *Organizations) ListOrganizations(ctx context.Context) (*[]models.OrganizationWithPlanResponse, error)

func (*Organizations) ListProjectMembers

func (r *Organizations) ListProjectMembers(ctx context.Context, orgId int, projectId int) (*[]models.ProjectMembershipResponse, error)

func (*Organizations) RemoveMember

func (r *Organizations) RemoveMember(ctx context.Context, orgId int, userId int) (json.RawMessage, error)

func (*Organizations) RemoveProjectMember

func (r *Organizations) RemoveProjectMember(ctx context.Context, orgId int, projectId int, userId int) (json.RawMessage, error)

func (*Organizations) UpdateMemberRole

func (r *Organizations) UpdateMemberRole(ctx context.Context, orgId int, userId int, body models.UpdateMemberRoleJSONRequestBody) (*models.MembershipResponse, error)

func (*Organizations) UpdateOrganizationProject

func (r *Organizations) UpdateOrganizationProject(ctx context.Context, orgId int, projectId int, body models.UpdateOrganizationProjectJSONRequestBody) (*models.ProjectResponse, error)

func (*Organizations) UpdateProjectMember

func (r *Organizations) UpdateProjectMember(ctx context.Context, orgId int, projectId int, userId int, body models.UpdateProjectMemberJSONRequestBody) (*models.ProjectMembershipResponse, error)

type Playbooks

type Playbooks struct {
	// contains filtered or unexported fields
}

Playbooks groups the Playbooks endpoints.

func (*Playbooks) CancelExecution

func (r *Playbooks) CancelExecution(ctx context.Context, orgId int, executionId int) (json.RawMessage, error)

func (*Playbooks) CompleteManualStep

func (r *Playbooks) CompleteManualStep(ctx context.Context, orgId int, executionId int, stepOrder int) (json.RawMessage, error)

func (*Playbooks) CreatePlaybook

func (*Playbooks) DeletePlaybook

func (r *Playbooks) DeletePlaybook(ctx context.Context, orgId int, playbookId int) (json.RawMessage, error)

func (*Playbooks) DuplicatePlaybook

func (r *Playbooks) DuplicatePlaybook(ctx context.Context, orgId int, playbookId int) (*models.PlaybookResponse, error)

func (*Playbooks) ExecutePlaybook

func (r *Playbooks) ExecutePlaybook(ctx context.Context, orgId int, playbookId int, body models.ExecutePlaybookJSONRequestBody) (json.RawMessage, error)

func (*Playbooks) GetExecution

func (r *Playbooks) GetExecution(ctx context.Context, orgId int, executionId int) (json.RawMessage, error)

func (*Playbooks) GetPlaybook

func (r *Playbooks) GetPlaybook(ctx context.Context, orgId int, playbookId int) (*models.PlaybookResponse, error)

func (*Playbooks) ListExecutions

func (r *Playbooks) ListExecutions(ctx context.Context, orgId int, params *models.ListExecutionsParams) (json.RawMessage, error)

func (*Playbooks) ListPlaybooks

func (r *Playbooks) ListPlaybooks(ctx context.Context, orgId int, params *models.ListPlaybooksParams) (*[]models.PlaybookResponse, error)

func (*Playbooks) UpdatePlaybook

func (r *Playbooks) UpdatePlaybook(ctx context.Context, orgId int, playbookId int, body models.UpdatePlaybookJSONRequestBody) (*models.PlaybookResponse, error)

type Postmortems

type Postmortems struct {
	// contains filtered or unexported fields
}

Postmortems groups the Postmortems endpoints.

func (*Postmortems) CreatePostmortem

func (r *Postmortems) CreatePostmortem(ctx context.Context, orgId int, body models.CreatePostmortemJSONRequestBody) (json.RawMessage, error)

func (*Postmortems) DeletePostmortem

func (r *Postmortems) DeletePostmortem(ctx context.Context, orgId int, pmId int) (json.RawMessage, error)

func (*Postmortems) ExportPostmortem

func (r *Postmortems) ExportPostmortem(ctx context.Context, orgId int, pmId int, params *models.ExportPostmortemParams) (json.RawMessage, error)

func (*Postmortems) GetPostmortem

func (r *Postmortems) GetPostmortem(ctx context.Context, orgId int, pmId int) (json.RawMessage, error)

func (*Postmortems) GetPublicPostmortem

func (r *Postmortems) GetPublicPostmortem(ctx context.Context, shareToken string) (json.RawMessage, error)

func (*Postmortems) ListPostmortems

func (r *Postmortems) ListPostmortems(ctx context.Context, orgId int, params *models.ListPostmortemsParams) (json.RawMessage, error)

func (*Postmortems) ToggleShare

func (r *Postmortems) ToggleShare(ctx context.Context, orgId int, pmId int, body models.ToggleShareJSONRequestBody) (json.RawMessage, error)

func (*Postmortems) UpdatePostmortem

func (r *Postmortems) UpdatePostmortem(ctx context.Context, orgId int, pmId int, body models.UpdatePostmortemJSONRequestBody) (json.RawMessage, error)

type Profile

type Profile struct {
	// contains filtered or unexported fields
}

Profile groups the Profile endpoints.

func (*Profile) GetProfile

func (r *Profile) GetProfile(ctx context.Context) (*models.UserResponse, error)

func (*Profile) UpdatePassword

func (*Profile) UpdateProfile

type Reports

type Reports struct {
	// contains filtered or unexported fields
}

Reports groups the Reports endpoints.

func (*Reports) DeleteReport

func (r *Reports) DeleteReport(ctx context.Context, reportUuid string) (json.RawMessage, error)

func (*Reports) DeleteScheduledReport

func (r *Reports) DeleteScheduledReport(ctx context.Context, reportId int) (json.RawMessage, error)

func (*Reports) DownloadReport

func (r *Reports) DownloadReport(ctx context.Context, reportUuid string) (json.RawMessage, error)

func (*Reports) GenerateReport

func (*Reports) GetReportStatus

func (r *Reports) GetReportStatus(ctx context.Context, reportUuid string) (*models.ReportStatusResponse, error)

func (*Reports) ListReports

func (r *Reports) ListReports(ctx context.Context) (*[]models.ReportResponse, error)

func (*Reports) ListScheduledReports

func (r *Reports) ListScheduledReports(ctx context.Context, params *models.ListScheduledReportsParams) (*[]models.ScheduledReportResponse, error)

func (*Reports) SendScheduledReportNowEndpoint

func (r *Reports) SendScheduledReportNowEndpoint(ctx context.Context, reportId int) (json.RawMessage, error)

func (*Reports) UpdateScheduledReport

func (r *Reports) UpdateScheduledReport(ctx context.Context, reportId int, body models.UpdateScheduledReportJSONRequestBody) (*models.ScheduledReportResponse, error)

type Services

type Services struct {
	// contains filtered or unexported fields
}

Services groups the Services endpoints.

func (*Services) AddDependency

func (r *Services) AddDependency(ctx context.Context, orgId int, serviceId int, body models.AddDependencyJSONRequestBody) (json.RawMessage, error)

func (*Services) CreateService

func (*Services) DeleteService

func (r *Services) DeleteService(ctx context.Context, orgId int, serviceId int) (json.RawMessage, error)

func (*Services) GetService

func (r *Services) GetService(ctx context.Context, orgId int, serviceId int) (*models.ServiceDetailResponse, error)

func (*Services) ListServices

func (r *Services) ListServices(ctx context.Context, orgId int) (*[]models.ServiceListItemResponse, error)

func (*Services) RemoveDependency

func (r *Services) RemoveDependency(ctx context.Context, orgId int, serviceId int, depId int) (json.RawMessage, error)

func (*Services) UpdateService

func (r *Services) UpdateService(ctx context.Context, orgId int, serviceId int, body models.UpdateServiceJSONRequestBody) (*models.ServiceResponse, error)

type StatusPages

type StatusPages struct {
	// contains filtered or unexported fields
}

StatusPages groups the StatusPages endpoints.

func (*StatusPages) ConfirmSubscription

func (r *StatusPages) ConfirmSubscription(ctx context.Context, slug string, token string) (json.RawMessage, error)

func (*StatusPages) CreateStatusPage

func (*StatusPages) DeleteStatusPage

func (r *StatusPages) DeleteStatusPage(ctx context.Context, pageId int) (json.RawMessage, error)

func (*StatusPages) DownloadPublicReport

func (r *StatusPages) DownloadPublicReport(ctx context.Context, slug string, params *models.DownloadPublicReportParams) (json.RawMessage, error)

func (*StatusPages) GetDomainStatus

func (r *StatusPages) GetDomainStatus(ctx context.Context, pageId int) (json.RawMessage, error)

func (*StatusPages) GetPrivateStatusPage

func (r *StatusPages) GetPrivateStatusPage(ctx context.Context, slug string) (json.RawMessage, error)

func (*StatusPages) GetPublicDailyStatus

func (r *StatusPages) GetPublicDailyStatus(ctx context.Context, slug string, params *models.GetPublicDailyStatusParams) (json.RawMessage, error)

func (*StatusPages) GetPublicIncidents

func (r *StatusPages) GetPublicIncidents(ctx context.Context, slug string, params *models.GetPublicIncidentsParams) (json.RawMessage, error)

func (*StatusPages) GetPublicStatusPage

func (r *StatusPages) GetPublicStatusPage(ctx context.Context, slug string) (json.RawMessage, error)

func (*StatusPages) GetPublicUptime

func (r *StatusPages) GetPublicUptime(ctx context.Context, slug string) (json.RawMessage, error)

func (*StatusPages) GetStatusPage

func (r *StatusPages) GetStatusPage(ctx context.Context, pageId int) (*models.StatusPageResponse, error)

func (*StatusPages) GetStatusPageAtomFeed

func (r *StatusPages) GetStatusPageAtomFeed(ctx context.Context, slug string) (json.RawMessage, error)

func (*StatusPages) GetStatusPageByDomain

func (r *StatusPages) GetStatusPageByDomain(ctx context.Context, domain string) (json.RawMessage, error)

func (*StatusPages) ListStatusPages

func (r *StatusPages) ListStatusPages(ctx context.Context, params *models.ListStatusPagesParams) (*[]models.StatusPageResponse, error)

func (*StatusPages) SubscribeToStatusPage

func (r *StatusPages) SubscribeToStatusPage(ctx context.Context, slug string, body models.SubscribeToStatusPageJSONRequestBody) (json.RawMessage, error)

func (*StatusPages) Unsubscribe

func (r *StatusPages) Unsubscribe(ctx context.Context, slug string, token string) (json.RawMessage, error)

func (*StatusPages) UpdateStatusPage

func (*StatusPages) VerifyCustomDomain

func (r *StatusPages) VerifyCustomDomain(ctx context.Context, pageId int) (json.RawMessage, error)

type Teams

type Teams struct {
	// contains filtered or unexported fields
}

Teams groups the Teams endpoints.

func (*Teams) AddTeamMember

func (r *Teams) AddTeamMember(ctx context.Context, orgId int, teamId int, body models.AddTeamMemberJSONRequestBody) (*models.TeamMemberResponse, error)

func (*Teams) AssignTeamResources

func (r *Teams) AssignTeamResources(ctx context.Context, orgId int, teamId int, body models.AssignTeamResourcesJSONRequestBody) (json.RawMessage, error)

func (*Teams) CreateTeam

func (r *Teams) CreateTeam(ctx context.Context, orgId int, body models.CreateTeamJSONRequestBody) (*models.TeamResponse, error)

func (*Teams) DeleteTeam

func (r *Teams) DeleteTeam(ctx context.Context, orgId int, teamId int) (json.RawMessage, error)

func (*Teams) GetTeam

func (r *Teams) GetTeam(ctx context.Context, orgId int, teamId int) (*models.TeamDetailResponse, error)

func (*Teams) GetTeamResources

func (r *Teams) GetTeamResources(ctx context.Context, orgId int, teamId int) (json.RawMessage, error)

func (*Teams) ListTeams

func (r *Teams) ListTeams(ctx context.Context, orgId int) (*[]models.TeamWithCountsResponse, error)

func (*Teams) RemoveTeamMember

func (r *Teams) RemoveTeamMember(ctx context.Context, orgId int, teamId int, userId int) (json.RawMessage, error)

func (*Teams) UpdateTeam

func (r *Teams) UpdateTeam(ctx context.Context, orgId int, teamId int, body models.UpdateTeamJSONRequestBody) (*models.TeamResponse, error)

func (*Teams) UpdateTeamMemberRole

func (r *Teams) UpdateTeamMemberRole(ctx context.Context, orgId int, teamId int, userId int, body models.UpdateTeamMemberRoleJSONRequestBody) (*models.TeamMemberResponse, error)

type WarRooms

type WarRooms struct {
	// contains filtered or unexported fields
}

WarRooms groups the WarRooms endpoints.

func (*WarRooms) AddWarRoomMember

func (r *WarRooms) AddWarRoomMember(ctx context.Context, orgId int, roomId int, body models.AddWarRoomMemberJSONRequestBody) (json.RawMessage, error)

func (*WarRooms) CloseWarRoom

func (r *WarRooms) CloseWarRoom(ctx context.Context, orgId int, roomId int) (json.RawMessage, error)

func (*WarRooms) CreateWarRoom

func (r *WarRooms) CreateWarRoom(ctx context.Context, orgId int, body models.CreateWarRoomJSONRequestBody) (json.RawMessage, error)

func (*WarRooms) DeleteWarRoom

func (r *WarRooms) DeleteWarRoom(ctx context.Context, orgId int, roomId int) (json.RawMessage, error)

func (*WarRooms) DownloadAttachment

func (r *WarRooms) DownloadAttachment(ctx context.Context, orgId int, roomId int, attachmentId int) (json.RawMessage, error)

func (*WarRooms) GetPresence

func (r *WarRooms) GetPresence(ctx context.Context, orgId int, roomId int) (json.RawMessage, error)

func (*WarRooms) GetWarRoom

func (r *WarRooms) GetWarRoom(ctx context.Context, orgId int, roomId int) (json.RawMessage, error)

func (*WarRooms) LeavePresence

func (r *WarRooms) LeavePresence(ctx context.Context, orgId int, roomId int) (json.RawMessage, error)

func (*WarRooms) ListMessages

func (r *WarRooms) ListMessages(ctx context.Context, orgId int, roomId int, params *models.ListMessagesParams) (json.RawMessage, error)

func (*WarRooms) ListWarRoomMembers

func (r *WarRooms) ListWarRoomMembers(ctx context.Context, orgId int, roomId int) (json.RawMessage, error)

func (*WarRooms) ListWarRooms

func (r *WarRooms) ListWarRooms(ctx context.Context, orgId int, params *models.ListWarRoomsParams) (json.RawMessage, error)

func (*WarRooms) PingPresence

func (r *WarRooms) PingPresence(ctx context.Context, orgId int, roomId int) (json.RawMessage, error)

func (*WarRooms) PostMessage

func (r *WarRooms) PostMessage(ctx context.Context, orgId int, roomId int, body models.PostMessageJSONRequestBody) (json.RawMessage, error)

func (*WarRooms) RemoveWarRoomMember

func (r *WarRooms) RemoveWarRoomMember(ctx context.Context, orgId int, roomId int, memberId int) (json.RawMessage, error)

func (*WarRooms) TestWarroomBot

func (r *WarRooms) TestWarroomBot(ctx context.Context, orgId int) (json.RawMessage, error)
func (r *WarRooms) UnfurlLink(ctx context.Context, orgId int, roomId int, params *models.UnfurlLinkParams) (json.RawMessage, error)

func (*WarRooms) UpdateWarRoom

func (r *WarRooms) UpdateWarRoom(ctx context.Context, orgId int, roomId int, body models.UpdateWarRoomJSONRequestBody) (json.RawMessage, error)

func (*WarRooms) UploadAttachment added in v0.1.1

func (r *WarRooms) UploadAttachment(ctx context.Context, orgID, roomID int, filename string, content io.Reader) (json.RawMessage, error)

UploadAttachment uploads a file to a war room. It is hand-written rather than generated because the endpoint takes multipart/form-data, which the generated facade does not model. The response is returned as raw JSON.

Directories

Path Synopsis
internal
cmd/genfacade command
Command genfacade renders the fluent resource facade over the oapi-codegen core.
Command genfacade renders the fluent resource facade over the oapi-codegen core.
Package models provides primitives to interact with the openapi HTTP API.
Package models provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

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