zenduty

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertType

type AlertType string
const (
	AlertTypeCritical AlertType = "critical"
	AlertTypeResolved AlertType = "resolved"
)

type Client

type Client interface {
	SendEvent(ctx context.Context, req *EventRequest) (*EventResponse, error)
}

Client sends events to the Zenduty Events API.

func NewClient

func NewClient(integrationURL string) Client

type EventRequest

type EventRequest struct {
	AlertType AlertType         `json:"alert_type"`
	Message   string            `json:"message"`
	Summary   string            `json:"summary"`
	EntityID  string            `json:"entity_id"`
	Payload   map[string]string `json:"payload,omitempty"`
	URLs      []EventURL        `json:"urls,omitempty"`
}

type EventResponse

type EventResponse struct {
	Message string `json:"message"`
	TraceID string `json:"trace_id"`
}

type EventURL

type EventURL struct {
	LinkURL  string `json:"link_url"`
	LinkText string `json:"link_text"`
}

Jump to

Keyboard shortcuts

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