Versions in this module Expand all Collapse all v0 v0.1.0 Sep 7, 2026 Changes in this version + const DefaultBaseURL + const Version + var ErrMissingToken = errors.New("itoc360: source token is required") + type APIError struct + Message string + StatusCode int + func (e *APIError) Error() string + func (e *APIError) Retryable() bool + func (e *APIError) SubscriptionInactive() bool + func (e *APIError) Unauthorized() bool + type Alert struct + Annotations map[string]string + Description string + EndsAt time.Time + Fingerprint string + GeneratorURL string + Labels map[string]string + Receiver string + Severity Severity + StartsAt time.Time + Status Status + Summary string + func (a Alert) Validate() error + type Client struct + func NewClient(token string, opts ...Option) (*Client, error) + func (c *Client) SendAlert(ctx context.Context, alert Alert) (*EventResponse, error) + func (c *Client) SendRaw(ctx context.Context, payload any) (*EventResponse, error) + type EventResponse struct + CreatedAt time.Time + Fingerprint string + ID string + Payload json.RawMessage + ProviderID int64 + SourceID string + TenantID string + Type string + type Option func(*Client) + func WithBaseURL(baseURL string) Option + func WithHTTPClient(hc *http.Client) Option + func WithUserAgent(userAgent string) Option + type Severity string + const SeverityCritical + const SeverityError + const SeverityInfo + const SeverityWarning + type Status string + const StatusFiring + const StatusResolved + type ValidationError struct + Field string + Message string + func (e *ValidationError) Error() string