Versions in this module Expand all Collapse all v1 v1.0.0 Jul 7, 2026 Changes in this version + const DefaultBaseURL + const DefaultMaxRetries + const DefaultTimeout + const Version + var DeliveryUrgencies = []string + var ErrAPI = errors.New("trigv: api error") + var ErrAuthentication = errors.New("trigv: authentication error") + var ErrAuthorization = errors.New("trigv: authorization error") + var ErrNetwork = errors.New("trigv: network error") + var ErrNotFound = errors.New("trigv: not found") + var ErrRateLimit = errors.New("trigv: rate limit") + var ErrTimeout = errors.New("trigv: timeout") + var ErrValidation = errors.New("trigv: validation error") + var FieldMaxLengths = map[string]int + var Levels = []string + var ProhibitedFields = []string + func IsMonthlyLimitMessage(message string) bool + type APIError struct + Body any + Message string + StatusCode int + func (e *APIError) Error() string + func (e *APIError) Is(target error) bool + type AuthenticationError struct + Message string + StatusCode int + func (e *AuthenticationError) Error() string + func (e *AuthenticationError) Is(target error) bool + type AuthorizationError struct + Message string + StatusCode int + func (e *AuthorizationError) Error() string + func (e *AuthorizationError) Is(target error) bool + type Client struct + func NewClient(cfg ClientConfig) (*Client, error) + func (c *Client) SendEvent(ctx context.Context, req SendEventRequest) (*SendEventResult, error) + func (c *Client) UserAgent() string + func (c *Client) VerifyConnection(ctx context.Context) (*ConnectionResult, error) + type ClientConfig struct + APIKey string + BaseURL string + HTTPClient HTTPDoer + MaxRetries *int + Timeout int + type ConnectionAPIKey struct + Name string + Prefix string + PublicID string + type ConnectionResult struct + APIKey ConnectionAPIKey + Workspace ConnectionWorkspace + type ConnectionWorkspace struct + Name string + PublicID string + type DeliveryUrgency string + const UrgencyStandard + const UrgencyTimeSensitive + type Event struct + EventType *string + EventUUID string + Level string + PublicID string + ReceivedAt string + Status string + TargetDeviceCount int + type HTTPDoer interface + Do func(req *http.Request) (*http.Response, error) + type NetworkError struct + Cause error + Message string + func (e *NetworkError) Error() string + func (e *NetworkError) Is(target error) bool + func (e *NetworkError) Unwrap() error + type NotFoundError struct + Message string + StatusCode int + func (e *NotFoundError) Error() string + func (e *NotFoundError) Is(target error) bool + type NotificationLevel string + const LevelError + const LevelInfo + const LevelSuccess + const LevelWarning + type RateLimitError struct + Message string + Retryable bool + StatusCode int + func (e *RateLimitError) Error() string + func (e *RateLimitError) Is(target error) bool + type SendEventRequest struct + Channel string + DeliveryUrgency DeliveryUrgency + Description string + EventType string + IdempotencyKey string + ImageURL string + Level NotificationLevel + Title string + URL string + type SendEventResult struct + Duplicate bool + Event Event + type TimeoutError struct + Message string + func (e *TimeoutError) Error() string + func (e *TimeoutError) Is(target error) bool + type ValidationError struct + Errors ValidationErrors + Message string + func (e *ValidationError) Error() string + func (e *ValidationError) Is(target error) bool + type ValidationErrors map[string][]string