Documentation
¶
Index ¶
- type EventNotification
- type EventNotificationList
- type Handler
- func (h *Handler) CreateEventNotification(ctx context.Context, data []byte) (*EventNotification, error)
- func (h *Handler) DeleteEventNotification(ctx context.Context, id string) error
- func (h *Handler) DeleteResourceNotification(ctx context.Context, id string) error
- func (h *Handler) GetEventNotification(ctx context.Context, id string) (*EventNotification, error)
- func (h *Handler) GetResourceNotification(ctx context.Context, id string) (*ResourceNotification, error)
- func (h *Handler) ListEventNotifications(ctx context.Context, notificationType string) (*EventNotificationList, error)
- func (h *Handler) ListResourceNotifications(ctx context.Context, notificationType, resourceID string) (*ResourceNotificationList, error)
- type ResourceNotification
- type ResourceNotificationList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventNotification ¶
type EventNotification struct {
ID string `json:"id"`
NotificationType string `json:"notificationType"`
Enabled bool `json:"enabled"`
AppID string `json:"appId,omitempty"`
Owner string `json:"owner,omitempty"`
TriggerConfig map[string]any `json:"triggerConfig,omitempty"`
ActionConfig map[string]any `json:"actionConfig,omitempty"`
}
EventNotification represents an event notification.
type EventNotificationList ¶
type EventNotificationList struct {
Results []EventNotification `json:"results"`
Count int `json:"count"`
}
EventNotificationList represents a list of event notifications.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler handles notification resources.
func NewHandler ¶
func NewHandler(c *httpclient.Client) *Handler
NewHandler creates a new notification handler.
func (*Handler) CreateEventNotification ¶
func (h *Handler) CreateEventNotification(ctx context.Context, data []byte) (*EventNotification, error)
CreateEventNotification creates a new event notification.
func (*Handler) DeleteEventNotification ¶
DeleteEventNotification deletes an event notification.
func (*Handler) DeleteResourceNotification ¶
DeleteResourceNotification deletes a resource notification.
func (*Handler) GetEventNotification ¶
GetEventNotification gets a specific event notification by ID.
func (*Handler) GetResourceNotification ¶
func (h *Handler) GetResourceNotification(ctx context.Context, id string) (*ResourceNotification, error)
GetResourceNotification gets a specific resource notification by ID.
func (*Handler) ListEventNotifications ¶
func (h *Handler) ListEventNotifications(ctx context.Context, notificationType string) (*EventNotificationList, error)
ListEventNotifications lists event notifications.
func (*Handler) ListResourceNotifications ¶
func (h *Handler) ListResourceNotifications(ctx context.Context, notificationType, resourceID string) (*ResourceNotificationList, error)
ListResourceNotifications lists resource notifications.
type ResourceNotification ¶
type ResourceNotification struct {
ID string `json:"id"`
NotificationType string `json:"notificationType"`
ResourceID string `json:"resourceId"`
AppID string `json:"appId,omitempty"`
}
ResourceNotification represents a resource notification.
type ResourceNotificationList ¶
type ResourceNotificationList struct {
Results []ResourceNotification `json:"results"`
Count int `json:"count"`
}
ResourceNotificationList represents a list of resource notifications.