Documentation
¶
Index ¶
- Constants
- func NewDeliveryServiceHandler(svc DeliveryServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- func NewEventServiceHandler(svc EventServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- func NewHealthServiceHandler(svc HealthServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- func NewSubscriptionServiceHandler(svc SubscriptionServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- func NewWebhookServiceHandler(svc WebhookServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- type DeliveryServiceClient
- type DeliveryServiceHandler
- type EventServiceClient
- type EventServiceHandler
- type HealthServiceClient
- type HealthServiceHandler
- type SubscriptionServiceClient
- type SubscriptionServiceHandler
- type UnimplementedDeliveryServiceHandler
- func (UnimplementedDeliveryServiceHandler) CancelRetry(context.Context, *connect.Request[proto.CancelRetryRequest]) (*connect.Response[proto.CancelRetryResponse], error)
- func (UnimplementedDeliveryServiceHandler) GetDeliveryAttempts(context.Context, *connect.Request[proto.GetDeliveryAttemptsRequest]) (*connect.Response[proto.GetDeliveryAttemptsResponse], error)
- func (UnimplementedDeliveryServiceHandler) GetDeliveryStatus(context.Context, *connect.Request[proto.GetDeliveryStatusRequest]) (*connect.Response[proto.GetDeliveryStatusResponse], error)
- func (UnimplementedDeliveryServiceHandler) GetRetryStatus(context.Context, *connect.Request[proto.GetRetryStatusRequest]) (*connect.Response[proto.GetRetryStatusResponse], error)
- func (UnimplementedDeliveryServiceHandler) ListDeliveries(context.Context, *connect.Request[proto.ListDeliveriesRequest]) (*connect.Response[proto.ListDeliveriesResponse], error)
- func (UnimplementedDeliveryServiceHandler) RetryDeliveries(context.Context, *connect.Request[proto.RetryDeliveriesRequest]) (*connect.Response[proto.RetryDeliveriesResponse], error)
- func (UnimplementedDeliveryServiceHandler) RetryDelivery(context.Context, *connect.Request[proto.RetryDeliveryRequest]) (*connect.Response[proto.RetryDeliveryResponse], error)
- type UnimplementedEventServiceHandler
- func (UnimplementedEventServiceHandler) CancelRepush(context.Context, *connect.Request[proto.CancelRepushRequest]) (*connect.Response[proto.CancelRepushResponse], error)
- func (UnimplementedEventServiceHandler) DeleteEvent(context.Context, *connect.Request[proto.DeleteEventRequest]) (*connect.Response[proto.DeleteEventResponse], error)
- func (UnimplementedEventServiceHandler) GetEvent(context.Context, *connect.Request[proto.GetEventRequest]) (*connect.Response[proto.GetEventResponse], error)
- func (UnimplementedEventServiceHandler) GetEventRecord(context.Context, *connect.Request[proto.GetEventRecordRequest]) (*connect.Response[proto.GetEventRecordResponse], error)
- func (UnimplementedEventServiceHandler) GetRepushStatus(context.Context, *connect.Request[proto.GetRepushStatusRequest]) (*connect.Response[proto.GetRepushStatusResponse], error)
- func (UnimplementedEventServiceHandler) ListEventReports(context.Context, *connect.Request[proto.ListEventReportsRequest]) (*connect.Response[proto.ListEventReportsResponse], error)
- func (UnimplementedEventServiceHandler) ListEvents(context.Context, *connect.Request[proto.ListEventsRequest]) (*connect.Response[proto.ListEventsResponse], error)
- func (UnimplementedEventServiceHandler) PushEvent(context.Context, *connect.Request[proto.PushEventRequest]) (*connect.Response[proto.PushEventResponse], error)
- func (UnimplementedEventServiceHandler) RePushEvent(context.Context, *connect.Request[proto.RePushEventRequest]) (*connect.Response[proto.RePushEventResponse], error)
- func (UnimplementedEventServiceHandler) RePushEvents(context.Context, *connect.Request[proto.RePushEventsRequest]) (*connect.Response[proto.RePushEventsResponse], error)
- func (UnimplementedEventServiceHandler) RegisterEvent(context.Context, *connect.Request[proto.RegisterEventRequest]) (*connect.Response[proto.RegisterEventResponse], error)
- func (UnimplementedEventServiceHandler) UpdateEvent(context.Context, *connect.Request[proto.UpdateEventRequest]) (*connect.Response[proto.UpdateEventResponse], error)
- type UnimplementedHealthServiceHandler
- func (UnimplementedHealthServiceHandler) GetHealthSummary(context.Context, *connect.Request[proto.GetHealthSummaryRequest]) (*connect.Response[proto.GetHealthSummaryResponse], error)
- func (UnimplementedHealthServiceHandler) GetWebhookHealth(context.Context, *connect.Request[proto.GetWebhookHealthRequest]) (*connect.Response[proto.GetWebhookHealthResponse], error)
- func (UnimplementedHealthServiceHandler) ListWebhooksByHealth(context.Context, *connect.Request[proto.ListWebhooksByHealthRequest]) (*connect.Response[proto.ListWebhooksByHealthResponse], error)
- type UnimplementedSubscriptionServiceHandler
- func (UnimplementedSubscriptionServiceHandler) CreateSubscription(context.Context, *connect.Request[proto.CreateSubscriptionRequest]) (*connect.Response[proto.CreateSubscriptionResponse], error)
- func (UnimplementedSubscriptionServiceHandler) DeleteSubscription(context.Context, *connect.Request[proto.DeleteSubscriptionRequest]) (*connect.Response[proto.DeleteSubscriptionResponse], error)
- func (UnimplementedSubscriptionServiceHandler) GetSubscription(context.Context, *connect.Request[proto.GetSubscriptionRequest]) (*connect.Response[proto.GetSubscriptionResponse], error)
- func (UnimplementedSubscriptionServiceHandler) ListSubscriptions(context.Context, *connect.Request[proto.ListSubscriptionsRequest]) (*connect.Response[proto.ListSubscriptionsResponse], error)
- func (UnimplementedSubscriptionServiceHandler) TestSubscriptionTemplate(context.Context, *connect.Request[proto.TestSubscriptionTemplateRequest]) (*connect.Response[proto.TestSubscriptionTemplateResponse], error)
- func (UnimplementedSubscriptionServiceHandler) UpdateSubscription(context.Context, *connect.Request[proto.UpdateSubscriptionRequest]) (*connect.Response[proto.UpdateSubscriptionResponse], error)
- type UnimplementedWebhookServiceHandler
- func (UnimplementedWebhookServiceHandler) GetNamespaceStats(context.Context, *connect.Request[proto.GetNamespaceStatsRequest]) (*connect.Response[proto.GetNamespaceStatsResponse], error)
- func (UnimplementedWebhookServiceHandler) GetTemplateFunctions(context.Context, *connect.Request[proto.GetTemplateFunctionsRequest]) (*connect.Response[proto.GetTemplateFunctionsResponse], error)
- func (UnimplementedWebhookServiceHandler) ListWebhooks(context.Context, *connect.Request[proto.ListWebhooksRequest]) (*connect.Response[proto.ListWebhooksResponse], error)
- func (UnimplementedWebhookServiceHandler) PauseWebhook(context.Context, *connect.Request[proto.PauseWebhookRequest]) (*connect.Response[proto.PauseWebhookResponse], error)
- func (UnimplementedWebhookServiceHandler) RegisterWebhook(context.Context, *connect.Request[proto.RegisterWebhookRequest]) (*connect.Response[proto.RegisterWebhookResponse], error)
- func (UnimplementedWebhookServiceHandler) ResumeWebhook(context.Context, *connect.Request[proto.ResumeWebhookRequest]) (*connect.Response[proto.ResumeWebhookResponse], error)
- func (UnimplementedWebhookServiceHandler) UnregisterWebhook(context.Context, *connect.Request[proto.UnregisterWebhookRequest]) (*connect.Response[proto.UnregisterWebhookResponse], error)
- func (UnimplementedWebhookServiceHandler) UpdateWebhookConfig(context.Context, *connect.Request[proto.UpdateWebhookConfigRequest]) (*connect.Response[proto.UpdateWebhookConfigResponse], error)
- type WebhookServiceClient
- type WebhookServiceHandler
Constants ¶
const ( // WebhookServiceName is the fully-qualified name of the WebhookService service. WebhookServiceName = "webhook.WebhookService" // EventServiceName is the fully-qualified name of the EventService service. EventServiceName = "webhook.EventService" // SubscriptionServiceName is the fully-qualified name of the SubscriptionService service. SubscriptionServiceName = "webhook.SubscriptionService" // DeliveryServiceName is the fully-qualified name of the DeliveryService service. DeliveryServiceName = "webhook.DeliveryService" // HealthServiceName is the fully-qualified name of the HealthService service. HealthServiceName = "webhook.HealthService" )
const ( // WebhookServiceRegisterWebhookProcedure is the fully-qualified name of the WebhookService's // RegisterWebhook RPC. WebhookServiceRegisterWebhookProcedure = "/webhook.WebhookService/RegisterWebhook" // WebhookServiceUnregisterWebhookProcedure is the fully-qualified name of the WebhookService's // UnregisterWebhook RPC. WebhookServiceUnregisterWebhookProcedure = "/webhook.WebhookService/UnregisterWebhook" // WebhookServiceListWebhooksProcedure is the fully-qualified name of the WebhookService's // ListWebhooks RPC. WebhookServiceListWebhooksProcedure = "/webhook.WebhookService/ListWebhooks" // WebhookServiceUpdateWebhookConfigProcedure is the fully-qualified name of the WebhookService's // UpdateWebhookConfig RPC. WebhookServiceUpdateWebhookConfigProcedure = "/webhook.WebhookService/UpdateWebhookConfig" // WebhookServicePauseWebhookProcedure is the fully-qualified name of the WebhookService's // PauseWebhook RPC. WebhookServicePauseWebhookProcedure = "/webhook.WebhookService/PauseWebhook" // WebhookServiceResumeWebhookProcedure is the fully-qualified name of the WebhookService's // ResumeWebhook RPC. WebhookServiceResumeWebhookProcedure = "/webhook.WebhookService/ResumeWebhook" // WebhookServiceGetNamespaceStatsProcedure is the fully-qualified name of the WebhookService's // GetNamespaceStats RPC. WebhookServiceGetNamespaceStatsProcedure = "/webhook.WebhookService/GetNamespaceStats" // WebhookServiceGetTemplateFunctionsProcedure is the fully-qualified name of the WebhookService's // GetTemplateFunctions RPC. WebhookServiceGetTemplateFunctionsProcedure = "/webhook.WebhookService/GetTemplateFunctions" // EventServiceRegisterEventProcedure is the fully-qualified name of the EventService's // RegisterEvent RPC. EventServiceRegisterEventProcedure = "/webhook.EventService/RegisterEvent" // EventServiceListEventsProcedure is the fully-qualified name of the EventService's ListEvents RPC. EventServiceListEventsProcedure = "/webhook.EventService/ListEvents" // EventServiceUpdateEventProcedure is the fully-qualified name of the EventService's UpdateEvent // RPC. EventServiceUpdateEventProcedure = "/webhook.EventService/UpdateEvent" // EventServiceDeleteEventProcedure is the fully-qualified name of the EventService's DeleteEvent // RPC. EventServiceDeleteEventProcedure = "/webhook.EventService/DeleteEvent" // EventServiceGetEventProcedure is the fully-qualified name of the EventService's GetEvent RPC. EventServiceGetEventProcedure = "/webhook.EventService/GetEvent" // EventServicePushEventProcedure is the fully-qualified name of the EventService's PushEvent RPC. EventServicePushEventProcedure = "/webhook.EventService/PushEvent" // EventServiceListEventReportsProcedure is the fully-qualified name of the EventService's // ListEventReports RPC. EventServiceListEventReportsProcedure = "/webhook.EventService/ListEventReports" // EventServiceGetEventRecordProcedure is the fully-qualified name of the EventService's // GetEventRecord RPC. EventServiceGetEventRecordProcedure = "/webhook.EventService/GetEventRecord" // EventServiceRePushEventProcedure is the fully-qualified name of the EventService's RePushEvent // RPC. EventServiceRePushEventProcedure = "/webhook.EventService/RePushEvent" // EventServiceRePushEventsProcedure is the fully-qualified name of the EventService's RePushEvents // RPC. EventServiceRePushEventsProcedure = "/webhook.EventService/RePushEvents" // EventServiceGetRepushStatusProcedure is the fully-qualified name of the EventService's // GetRepushStatus RPC. EventServiceGetRepushStatusProcedure = "/webhook.EventService/GetRepushStatus" // EventServiceCancelRepushProcedure is the fully-qualified name of the EventService's CancelRepush // RPC. EventServiceCancelRepushProcedure = "/webhook.EventService/CancelRepush" // SubscriptionServiceCreateSubscriptionProcedure is the fully-qualified name of the // SubscriptionService's CreateSubscription RPC. SubscriptionServiceCreateSubscriptionProcedure = "/webhook.SubscriptionService/CreateSubscription" // SubscriptionServiceGetSubscriptionProcedure is the fully-qualified name of the // SubscriptionService's GetSubscription RPC. SubscriptionServiceGetSubscriptionProcedure = "/webhook.SubscriptionService/GetSubscription" // SubscriptionServiceListSubscriptionsProcedure is the fully-qualified name of the // SubscriptionService's ListSubscriptions RPC. SubscriptionServiceListSubscriptionsProcedure = "/webhook.SubscriptionService/ListSubscriptions" // SubscriptionServiceUpdateSubscriptionProcedure is the fully-qualified name of the // SubscriptionService's UpdateSubscription RPC. SubscriptionServiceUpdateSubscriptionProcedure = "/webhook.SubscriptionService/UpdateSubscription" // SubscriptionServiceDeleteSubscriptionProcedure is the fully-qualified name of the // SubscriptionService's DeleteSubscription RPC. SubscriptionServiceDeleteSubscriptionProcedure = "/webhook.SubscriptionService/DeleteSubscription" // SubscriptionServiceTestSubscriptionTemplateProcedure is the fully-qualified name of the // SubscriptionService's TestSubscriptionTemplate RPC. SubscriptionServiceTestSubscriptionTemplateProcedure = "/webhook.SubscriptionService/TestSubscriptionTemplate" // DeliveryServiceGetDeliveryStatusProcedure is the fully-qualified name of the DeliveryService's // GetDeliveryStatus RPC. DeliveryServiceGetDeliveryStatusProcedure = "/webhook.DeliveryService/GetDeliveryStatus" // DeliveryServiceListDeliveriesProcedure is the fully-qualified name of the DeliveryService's // ListDeliveries RPC. DeliveryServiceListDeliveriesProcedure = "/webhook.DeliveryService/ListDeliveries" // DeliveryServiceRetryDeliveryProcedure is the fully-qualified name of the DeliveryService's // RetryDelivery RPC. DeliveryServiceRetryDeliveryProcedure = "/webhook.DeliveryService/RetryDelivery" // DeliveryServiceGetDeliveryAttemptsProcedure is the fully-qualified name of the DeliveryService's // GetDeliveryAttempts RPC. DeliveryServiceGetDeliveryAttemptsProcedure = "/webhook.DeliveryService/GetDeliveryAttempts" // DeliveryServiceRetryDeliveriesProcedure is the fully-qualified name of the DeliveryService's // RetryDeliveries RPC. DeliveryServiceRetryDeliveriesProcedure = "/webhook.DeliveryService/RetryDeliveries" // DeliveryServiceGetRetryStatusProcedure is the fully-qualified name of the DeliveryService's // GetRetryStatus RPC. DeliveryServiceGetRetryStatusProcedure = "/webhook.DeliveryService/GetRetryStatus" // DeliveryServiceCancelRetryProcedure is the fully-qualified name of the DeliveryService's // CancelRetry RPC. DeliveryServiceCancelRetryProcedure = "/webhook.DeliveryService/CancelRetry" // HealthServiceGetWebhookHealthProcedure is the fully-qualified name of the HealthService's // GetWebhookHealth RPC. HealthServiceGetWebhookHealthProcedure = "/webhook.HealthService/GetWebhookHealth" // HealthServiceListWebhooksByHealthProcedure is the fully-qualified name of the HealthService's // ListWebhooksByHealth RPC. HealthServiceListWebhooksByHealthProcedure = "/webhook.HealthService/ListWebhooksByHealth" // HealthServiceGetHealthSummaryProcedure is the fully-qualified name of the HealthService's // GetHealthSummary RPC. HealthServiceGetHealthSummaryProcedure = "/webhook.HealthService/GetHealthSummary" )
These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.
Variables ¶
This section is empty.
Functions ¶
func NewDeliveryServiceHandler ¶ added in v0.2.0
func NewDeliveryServiceHandler(svc DeliveryServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewDeliveryServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.
By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.
func NewEventServiceHandler ¶ added in v0.2.0
func NewEventServiceHandler(svc EventServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewEventServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.
By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.
func NewHealthServiceHandler ¶ added in v0.2.0
func NewHealthServiceHandler(svc HealthServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewHealthServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.
By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.
func NewSubscriptionServiceHandler ¶ added in v0.2.0
func NewSubscriptionServiceHandler(svc SubscriptionServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewSubscriptionServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.
By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.
func NewWebhookServiceHandler ¶
func NewWebhookServiceHandler(svc WebhookServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewWebhookServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.
By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.
Types ¶
type DeliveryServiceClient ¶ added in v0.2.0
type DeliveryServiceClient interface {
// GetDeliveryStatus returns full details of a single delivery, including
// request body, response body, response code, error category, and retry state.
// Errors: NOT_FOUND if the delivery_id does not exist in the given namespace.
GetDeliveryStatus(context.Context, *connect.Request[proto.GetDeliveryStatusRequest]) (*connect.Response[proto.GetDeliveryStatusResponse], error)
// ListDeliveries returns delivery records for a namespace, optionally filtered
// by webhook_id or event_id. Ordered by created_at descending. Paginated.
ListDeliveries(context.Context, *connect.Request[proto.ListDeliveriesRequest]) (*connect.Response[proto.ListDeliveriesResponse], error)
// RetryDelivery re-enqueues deliveries for processing.
// Can target a specific delivery_id, all failed/pending deliveries for a webhook_id,
// or both. Set force=true to retry even successful deliveries.
// Returns the count and IDs of deliveries that were re-enqueued.
RetryDelivery(context.Context, *connect.Request[proto.RetryDeliveryRequest]) (*connect.Response[proto.RetryDeliveryResponse], error)
// GetDeliveryAttempts returns the per-attempt history for a delivery, ordered by timestamp.
// Each attempt includes response_time, response_code, error_message, and error_category.
// Errors: INVALID_ARGUMENT if delivery_id is empty.
GetDeliveryAttempts(context.Context, *connect.Request[proto.GetDeliveryAttemptsRequest]) (*connect.Response[proto.GetDeliveryAttemptsResponse], error)
// RetryDeliveries executes a deterministic batch retry of deliveries whose IDs were
// previously snapshotted via ListDeliveries with prepare_retry=true.
// Each delivery is reset to pending and re-enqueued for HTTP delivery.
// The batch is processed asynchronously via a River job; poll GetRetryStatus for progress.
// Errors: NOT_FOUND if the retry_id does not exist or has expired.
// Errors: FAILED_PRECONDITION if the batch is not in 'pending' status.
RetryDeliveries(context.Context, *connect.Request[proto.RetryDeliveriesRequest]) (*connect.Response[proto.RetryDeliveriesResponse], error)
// GetRetryStatus returns the current progress of a batch retry operation.
// Errors: NOT_FOUND if the retry_id does not exist or has expired.
GetRetryStatus(context.Context, *connect.Request[proto.GetRetryStatusRequest]) (*connect.Response[proto.GetRetryStatusResponse], error)
// CancelRetry aborts a batch retry that is pending or in progress.
// Items already processed are not rolled back.
// Errors: NOT_FOUND if the retry_id does not exist.
// Errors: FAILED_PRECONDITION if the batch is already completed or cancelled.
CancelRetry(context.Context, *connect.Request[proto.CancelRetryRequest]) (*connect.Response[proto.CancelRetryResponse], error)
}
DeliveryServiceClient is a client for the webhook.DeliveryService service.
func NewDeliveryServiceClient ¶ added in v0.2.0
func NewDeliveryServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) DeliveryServiceClient
NewDeliveryServiceClient constructs a client for the webhook.DeliveryService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.
The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).
type DeliveryServiceHandler ¶ added in v0.2.0
type DeliveryServiceHandler interface {
// GetDeliveryStatus returns full details of a single delivery, including
// request body, response body, response code, error category, and retry state.
// Errors: NOT_FOUND if the delivery_id does not exist in the given namespace.
GetDeliveryStatus(context.Context, *connect.Request[proto.GetDeliveryStatusRequest]) (*connect.Response[proto.GetDeliveryStatusResponse], error)
// ListDeliveries returns delivery records for a namespace, optionally filtered
// by webhook_id or event_id. Ordered by created_at descending. Paginated.
ListDeliveries(context.Context, *connect.Request[proto.ListDeliveriesRequest]) (*connect.Response[proto.ListDeliveriesResponse], error)
// RetryDelivery re-enqueues deliveries for processing.
// Can target a specific delivery_id, all failed/pending deliveries for a webhook_id,
// or both. Set force=true to retry even successful deliveries.
// Returns the count and IDs of deliveries that were re-enqueued.
RetryDelivery(context.Context, *connect.Request[proto.RetryDeliveryRequest]) (*connect.Response[proto.RetryDeliveryResponse], error)
// GetDeliveryAttempts returns the per-attempt history for a delivery, ordered by timestamp.
// Each attempt includes response_time, response_code, error_message, and error_category.
// Errors: INVALID_ARGUMENT if delivery_id is empty.
GetDeliveryAttempts(context.Context, *connect.Request[proto.GetDeliveryAttemptsRequest]) (*connect.Response[proto.GetDeliveryAttemptsResponse], error)
// RetryDeliveries executes a deterministic batch retry of deliveries whose IDs were
// previously snapshotted via ListDeliveries with prepare_retry=true.
// Each delivery is reset to pending and re-enqueued for HTTP delivery.
// The batch is processed asynchronously via a River job; poll GetRetryStatus for progress.
// Errors: NOT_FOUND if the retry_id does not exist or has expired.
// Errors: FAILED_PRECONDITION if the batch is not in 'pending' status.
RetryDeliveries(context.Context, *connect.Request[proto.RetryDeliveriesRequest]) (*connect.Response[proto.RetryDeliveriesResponse], error)
// GetRetryStatus returns the current progress of a batch retry operation.
// Errors: NOT_FOUND if the retry_id does not exist or has expired.
GetRetryStatus(context.Context, *connect.Request[proto.GetRetryStatusRequest]) (*connect.Response[proto.GetRetryStatusResponse], error)
// CancelRetry aborts a batch retry that is pending or in progress.
// Items already processed are not rolled back.
// Errors: NOT_FOUND if the retry_id does not exist.
// Errors: FAILED_PRECONDITION if the batch is already completed or cancelled.
CancelRetry(context.Context, *connect.Request[proto.CancelRetryRequest]) (*connect.Response[proto.CancelRetryResponse], error)
}
DeliveryServiceHandler is an implementation of the webhook.DeliveryService service.
type EventServiceClient ¶ added in v0.2.0
type EventServiceClient interface {
// RegisterEvent creates a new event type definition.
// If a JSON schema is provided, all future PushEvent payloads for this event
// are validated against it. The event name is the primary identifier (not a UUID).
// Errors: ALREADY_EXISTS if an event with the same name already exists.
RegisterEvent(context.Context, *connect.Request[proto.RegisterEventRequest]) (*connect.Response[proto.RegisterEventResponse], error)
// ListEvents returns all registered event types, optionally filtered to active-only.
// Results are paginated.
ListEvents(context.Context, *connect.Request[proto.ListEventsRequest]) (*connect.Response[proto.ListEventsResponse], error)
// UpdateEvent modifies an existing event type's description, schema, metadata, or active flag.
// Updating the schema does not retroactively validate previously pushed events.
// Errors: NOT_FOUND if the event name does not exist.
UpdateEvent(context.Context, *connect.Request[proto.UpdateEventRequest]) (*connect.Response[proto.UpdateEventResponse], error)
// DeleteEvent permanently removes an event type definition.
// Existing subscriptions referencing this event name are not automatically deleted.
// Errors: NOT_FOUND if the event name does not exist.
DeleteEvent(context.Context, *connect.Request[proto.DeleteEventRequest]) (*connect.Response[proto.DeleteEventResponse], error)
// GetEvent returns a single event type by name, including its schema and auto-generated sample payload.
// Errors: NOT_FOUND if the event name does not exist.
GetEvent(context.Context, *connect.Request[proto.GetEventRequest]) (*connect.Response[proto.GetEventResponse], error)
// PushEvent emits an event instance. This is the primary ingestion endpoint.
// On success, the event is persisted and a background job is enqueued to fan out
// deliveries to all matching subscriptions (by namespace + event_name + label_filters).
// The response returns immediately with the event_id; delivery happens asynchronously.
// If the event type has a JSON schema, the payload is validated before acceptance.
// Errors: INVALID_ARGUMENT if the payload fails schema validation.
// Errors: NOT_FOUND if the event name is not registered.
PushEvent(context.Context, *connect.Request[proto.PushEventRequest]) (*connect.Response[proto.PushEventResponse], error)
// ListEventReports returns pushed event instances (not type definitions) for a namespace,
// ordered by created_at descending. Each report includes delivery stats
// (webhook_count, successful/failed/pending counts). Paginated, max 1000 per page.
ListEventReports(context.Context, *connect.Request[proto.ListEventReportsRequest]) (*connect.Response[proto.ListEventReportsResponse], error)
// GetEventRecord retrieves a single pushed event instance by its UUID.
// Returns the event record with its payload, metadata, labels, and aggregated
// delivery statistics (webhook_count, successful/failed/pending counts).
// This is different from GetEvent which returns an event type definition by name.
// Errors: NOT_FOUND if the event_id does not exist.
// Errors: INVALID_ARGUMENT if the event_id is not a valid UUID.
GetEventRecord(context.Context, *connect.Request[proto.GetEventRecordRequest]) (*connect.Response[proto.GetEventRecordResponse], error)
// RePushEvent replays a single previously pushed event as if it were pushed fresh.
// Loads the original event record and re-pushes through the standard PushEvent pipeline.
// Errors: NOT_FOUND if the event_id does not exist.
// Errors: INVALID_ARGUMENT if the event_id is not a valid UUID.
RePushEvent(context.Context, *connect.Request[proto.RePushEventRequest]) (*connect.Response[proto.RePushEventResponse], error)
// RePushEvents executes a deterministic batch re-push of events whose IDs were
// previously snapshotted via ListEventReports with prepare_repush=true.
// Each event is re-pushed as if it were pushed fresh: new event_id, current schema validation.
// The batch is processed asynchronously via a River job; poll GetRepushStatus for progress.
// Errors: NOT_FOUND if the repush_id does not exist or has expired.
// Errors: FAILED_PRECONDITION if the batch is not in 'pending' status.
RePushEvents(context.Context, *connect.Request[proto.RePushEventsRequest]) (*connect.Response[proto.RePushEventsResponse], error)
// GetRepushStatus returns the current progress of a batch re-push operation.
// Errors: NOT_FOUND if the repush_id does not exist or has expired.
GetRepushStatus(context.Context, *connect.Request[proto.GetRepushStatusRequest]) (*connect.Response[proto.GetRepushStatusResponse], error)
// CancelRepush aborts a batch re-push that is pending or in progress.
// Items already processed are not rolled back.
// Errors: NOT_FOUND if the repush_id does not exist.
// Errors: FAILED_PRECONDITION if the batch is already completed or cancelled.
CancelRepush(context.Context, *connect.Request[proto.CancelRepushRequest]) (*connect.Response[proto.CancelRepushResponse], error)
}
EventServiceClient is a client for the webhook.EventService service.
func NewEventServiceClient ¶ added in v0.2.0
func NewEventServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) EventServiceClient
NewEventServiceClient constructs a client for the webhook.EventService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.
The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).
type EventServiceHandler ¶ added in v0.2.0
type EventServiceHandler interface {
// RegisterEvent creates a new event type definition.
// If a JSON schema is provided, all future PushEvent payloads for this event
// are validated against it. The event name is the primary identifier (not a UUID).
// Errors: ALREADY_EXISTS if an event with the same name already exists.
RegisterEvent(context.Context, *connect.Request[proto.RegisterEventRequest]) (*connect.Response[proto.RegisterEventResponse], error)
// ListEvents returns all registered event types, optionally filtered to active-only.
// Results are paginated.
ListEvents(context.Context, *connect.Request[proto.ListEventsRequest]) (*connect.Response[proto.ListEventsResponse], error)
// UpdateEvent modifies an existing event type's description, schema, metadata, or active flag.
// Updating the schema does not retroactively validate previously pushed events.
// Errors: NOT_FOUND if the event name does not exist.
UpdateEvent(context.Context, *connect.Request[proto.UpdateEventRequest]) (*connect.Response[proto.UpdateEventResponse], error)
// DeleteEvent permanently removes an event type definition.
// Existing subscriptions referencing this event name are not automatically deleted.
// Errors: NOT_FOUND if the event name does not exist.
DeleteEvent(context.Context, *connect.Request[proto.DeleteEventRequest]) (*connect.Response[proto.DeleteEventResponse], error)
// GetEvent returns a single event type by name, including its schema and auto-generated sample payload.
// Errors: NOT_FOUND if the event name does not exist.
GetEvent(context.Context, *connect.Request[proto.GetEventRequest]) (*connect.Response[proto.GetEventResponse], error)
// PushEvent emits an event instance. This is the primary ingestion endpoint.
// On success, the event is persisted and a background job is enqueued to fan out
// deliveries to all matching subscriptions (by namespace + event_name + label_filters).
// The response returns immediately with the event_id; delivery happens asynchronously.
// If the event type has a JSON schema, the payload is validated before acceptance.
// Errors: INVALID_ARGUMENT if the payload fails schema validation.
// Errors: NOT_FOUND if the event name is not registered.
PushEvent(context.Context, *connect.Request[proto.PushEventRequest]) (*connect.Response[proto.PushEventResponse], error)
// ListEventReports returns pushed event instances (not type definitions) for a namespace,
// ordered by created_at descending. Each report includes delivery stats
// (webhook_count, successful/failed/pending counts). Paginated, max 1000 per page.
ListEventReports(context.Context, *connect.Request[proto.ListEventReportsRequest]) (*connect.Response[proto.ListEventReportsResponse], error)
// GetEventRecord retrieves a single pushed event instance by its UUID.
// Returns the event record with its payload, metadata, labels, and aggregated
// delivery statistics (webhook_count, successful/failed/pending counts).
// This is different from GetEvent which returns an event type definition by name.
// Errors: NOT_FOUND if the event_id does not exist.
// Errors: INVALID_ARGUMENT if the event_id is not a valid UUID.
GetEventRecord(context.Context, *connect.Request[proto.GetEventRecordRequest]) (*connect.Response[proto.GetEventRecordResponse], error)
// RePushEvent replays a single previously pushed event as if it were pushed fresh.
// Loads the original event record and re-pushes through the standard PushEvent pipeline.
// Errors: NOT_FOUND if the event_id does not exist.
// Errors: INVALID_ARGUMENT if the event_id is not a valid UUID.
RePushEvent(context.Context, *connect.Request[proto.RePushEventRequest]) (*connect.Response[proto.RePushEventResponse], error)
// RePushEvents executes a deterministic batch re-push of events whose IDs were
// previously snapshotted via ListEventReports with prepare_repush=true.
// Each event is re-pushed as if it were pushed fresh: new event_id, current schema validation.
// The batch is processed asynchronously via a River job; poll GetRepushStatus for progress.
// Errors: NOT_FOUND if the repush_id does not exist or has expired.
// Errors: FAILED_PRECONDITION if the batch is not in 'pending' status.
RePushEvents(context.Context, *connect.Request[proto.RePushEventsRequest]) (*connect.Response[proto.RePushEventsResponse], error)
// GetRepushStatus returns the current progress of a batch re-push operation.
// Errors: NOT_FOUND if the repush_id does not exist or has expired.
GetRepushStatus(context.Context, *connect.Request[proto.GetRepushStatusRequest]) (*connect.Response[proto.GetRepushStatusResponse], error)
// CancelRepush aborts a batch re-push that is pending or in progress.
// Items already processed are not rolled back.
// Errors: NOT_FOUND if the repush_id does not exist.
// Errors: FAILED_PRECONDITION if the batch is already completed or cancelled.
CancelRepush(context.Context, *connect.Request[proto.CancelRepushRequest]) (*connect.Response[proto.CancelRepushResponse], error)
}
EventServiceHandler is an implementation of the webhook.EventService service.
type HealthServiceClient ¶ added in v0.2.0
type HealthServiceClient interface {
// GetWebhookHealth returns health status and detailed metrics for a single webhook:
// total/successful/failed deliveries, consecutive failures, success rate, avg response time,
// and error category breakdown (client/server/timeout/network errors).
// Returns HEALTH_UNSPECIFIED with no metrics if the webhook has no delivery history.
GetWebhookHealth(context.Context, *connect.Request[proto.GetWebhookHealthRequest]) (*connect.Response[proto.GetWebhookHealthResponse], error)
// ListWebhooksByHealth returns all webhooks matching a given health status.
// Useful for finding degraded or unhealthy endpoints. Paginated.
ListWebhooksByHealth(context.Context, *connect.Request[proto.ListWebhooksByHealthRequest]) (*connect.Response[proto.ListWebhooksByHealthResponse], error)
// GetHealthSummary returns aggregate counts of webhooks by health status
// (healthy, degraded, unhealthy, unknown) across all namespaces.
GetHealthSummary(context.Context, *connect.Request[proto.GetHealthSummaryRequest]) (*connect.Response[proto.GetHealthSummaryResponse], error)
}
HealthServiceClient is a client for the webhook.HealthService service.
func NewHealthServiceClient ¶ added in v0.2.0
func NewHealthServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) HealthServiceClient
NewHealthServiceClient constructs a client for the webhook.HealthService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.
The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).
type HealthServiceHandler ¶ added in v0.2.0
type HealthServiceHandler interface {
// GetWebhookHealth returns health status and detailed metrics for a single webhook:
// total/successful/failed deliveries, consecutive failures, success rate, avg response time,
// and error category breakdown (client/server/timeout/network errors).
// Returns HEALTH_UNSPECIFIED with no metrics if the webhook has no delivery history.
GetWebhookHealth(context.Context, *connect.Request[proto.GetWebhookHealthRequest]) (*connect.Response[proto.GetWebhookHealthResponse], error)
// ListWebhooksByHealth returns all webhooks matching a given health status.
// Useful for finding degraded or unhealthy endpoints. Paginated.
ListWebhooksByHealth(context.Context, *connect.Request[proto.ListWebhooksByHealthRequest]) (*connect.Response[proto.ListWebhooksByHealthResponse], error)
// GetHealthSummary returns aggregate counts of webhooks by health status
// (healthy, degraded, unhealthy, unknown) across all namespaces.
GetHealthSummary(context.Context, *connect.Request[proto.GetHealthSummaryRequest]) (*connect.Response[proto.GetHealthSummaryResponse], error)
}
HealthServiceHandler is an implementation of the webhook.HealthService service.
type SubscriptionServiceClient ¶ added in v0.2.0
type SubscriptionServiceClient interface {
// CreateSubscription links a webhook to an event name in a namespace.
// Optionally configure per-subscription headers, HTTP method override, timeout override,
// payload transformation (Go template), and label filters for selective matching.
// Errors: ALREADY_EXISTS if the webhook is already subscribed to this event in this namespace.
// Errors: NOT_FOUND if the webhook_id does not exist.
CreateSubscription(context.Context, *connect.Request[proto.CreateSubscriptionRequest]) (*connect.Response[proto.CreateSubscriptionResponse], error)
// GetSubscription returns a single subscription by ID.
// Errors: NOT_FOUND if the subscription_id does not exist in the given namespace.
GetSubscription(context.Context, *connect.Request[proto.GetSubscriptionRequest]) (*connect.Response[proto.GetSubscriptionResponse], error)
// ListSubscriptions returns subscriptions in a namespace, optionally filtered
// by webhook_id or event_name. Results are paginated.
ListSubscriptions(context.Context, *connect.Request[proto.ListSubscriptionsRequest]) (*connect.Response[proto.ListSubscriptionsResponse], error)
// UpdateSubscription modifies a subscription's headers, method, timeout,
// transform settings, or label filters. Only non-zero fields are applied.
// Errors: NOT_FOUND if the subscription does not exist.
UpdateSubscription(context.Context, *connect.Request[proto.UpdateSubscriptionRequest]) (*connect.Response[proto.UpdateSubscriptionResponse], error)
// DeleteSubscription permanently removes a subscription.
// Existing in-flight deliveries for this subscription are not cancelled.
// Errors: NOT_FOUND if the subscription does not exist.
DeleteSubscription(context.Context, *connect.Request[proto.DeleteSubscriptionRequest]) (*connect.Response[proto.DeleteSubscriptionResponse], error)
// TestSubscriptionTemplate renders a Go template against the sample payload of the
// given event type. Returns the transformed output string. Use this to validate
// templates before saving them on a subscription.
// Errors: INVALID_ARGUMENT if the template fails to parse or execute.
// Errors: NOT_FOUND if the event_name does not exist.
TestSubscriptionTemplate(context.Context, *connect.Request[proto.TestSubscriptionTemplateRequest]) (*connect.Response[proto.TestSubscriptionTemplateResponse], error)
}
SubscriptionServiceClient is a client for the webhook.SubscriptionService service.
func NewSubscriptionServiceClient ¶ added in v0.2.0
func NewSubscriptionServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) SubscriptionServiceClient
NewSubscriptionServiceClient constructs a client for the webhook.SubscriptionService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.
The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).
type SubscriptionServiceHandler ¶ added in v0.2.0
type SubscriptionServiceHandler interface {
// CreateSubscription links a webhook to an event name in a namespace.
// Optionally configure per-subscription headers, HTTP method override, timeout override,
// payload transformation (Go template), and label filters for selective matching.
// Errors: ALREADY_EXISTS if the webhook is already subscribed to this event in this namespace.
// Errors: NOT_FOUND if the webhook_id does not exist.
CreateSubscription(context.Context, *connect.Request[proto.CreateSubscriptionRequest]) (*connect.Response[proto.CreateSubscriptionResponse], error)
// GetSubscription returns a single subscription by ID.
// Errors: NOT_FOUND if the subscription_id does not exist in the given namespace.
GetSubscription(context.Context, *connect.Request[proto.GetSubscriptionRequest]) (*connect.Response[proto.GetSubscriptionResponse], error)
// ListSubscriptions returns subscriptions in a namespace, optionally filtered
// by webhook_id or event_name. Results are paginated.
ListSubscriptions(context.Context, *connect.Request[proto.ListSubscriptionsRequest]) (*connect.Response[proto.ListSubscriptionsResponse], error)
// UpdateSubscription modifies a subscription's headers, method, timeout,
// transform settings, or label filters. Only non-zero fields are applied.
// Errors: NOT_FOUND if the subscription does not exist.
UpdateSubscription(context.Context, *connect.Request[proto.UpdateSubscriptionRequest]) (*connect.Response[proto.UpdateSubscriptionResponse], error)
// DeleteSubscription permanently removes a subscription.
// Existing in-flight deliveries for this subscription are not cancelled.
// Errors: NOT_FOUND if the subscription does not exist.
DeleteSubscription(context.Context, *connect.Request[proto.DeleteSubscriptionRequest]) (*connect.Response[proto.DeleteSubscriptionResponse], error)
// TestSubscriptionTemplate renders a Go template against the sample payload of the
// given event type. Returns the transformed output string. Use this to validate
// templates before saving them on a subscription.
// Errors: INVALID_ARGUMENT if the template fails to parse or execute.
// Errors: NOT_FOUND if the event_name does not exist.
TestSubscriptionTemplate(context.Context, *connect.Request[proto.TestSubscriptionTemplateRequest]) (*connect.Response[proto.TestSubscriptionTemplateResponse], error)
}
SubscriptionServiceHandler is an implementation of the webhook.SubscriptionService service.
type UnimplementedDeliveryServiceHandler ¶ added in v0.2.0
type UnimplementedDeliveryServiceHandler struct{}
UnimplementedDeliveryServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedDeliveryServiceHandler) CancelRetry ¶ added in v0.8.0
func (UnimplementedDeliveryServiceHandler) CancelRetry(context.Context, *connect.Request[proto.CancelRetryRequest]) (*connect.Response[proto.CancelRetryResponse], error)
func (UnimplementedDeliveryServiceHandler) GetDeliveryAttempts ¶ added in v0.2.0
func (UnimplementedDeliveryServiceHandler) GetDeliveryAttempts(context.Context, *connect.Request[proto.GetDeliveryAttemptsRequest]) (*connect.Response[proto.GetDeliveryAttemptsResponse], error)
func (UnimplementedDeliveryServiceHandler) GetDeliveryStatus ¶ added in v0.2.0
func (UnimplementedDeliveryServiceHandler) GetDeliveryStatus(context.Context, *connect.Request[proto.GetDeliveryStatusRequest]) (*connect.Response[proto.GetDeliveryStatusResponse], error)
func (UnimplementedDeliveryServiceHandler) GetRetryStatus ¶ added in v0.8.0
func (UnimplementedDeliveryServiceHandler) GetRetryStatus(context.Context, *connect.Request[proto.GetRetryStatusRequest]) (*connect.Response[proto.GetRetryStatusResponse], error)
func (UnimplementedDeliveryServiceHandler) ListDeliveries ¶ added in v0.2.0
func (UnimplementedDeliveryServiceHandler) ListDeliveries(context.Context, *connect.Request[proto.ListDeliveriesRequest]) (*connect.Response[proto.ListDeliveriesResponse], error)
func (UnimplementedDeliveryServiceHandler) RetryDeliveries ¶ added in v0.8.0
func (UnimplementedDeliveryServiceHandler) RetryDeliveries(context.Context, *connect.Request[proto.RetryDeliveriesRequest]) (*connect.Response[proto.RetryDeliveriesResponse], error)
func (UnimplementedDeliveryServiceHandler) RetryDelivery ¶ added in v0.2.0
func (UnimplementedDeliveryServiceHandler) RetryDelivery(context.Context, *connect.Request[proto.RetryDeliveryRequest]) (*connect.Response[proto.RetryDeliveryResponse], error)
type UnimplementedEventServiceHandler ¶ added in v0.2.0
type UnimplementedEventServiceHandler struct{}
UnimplementedEventServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedEventServiceHandler) CancelRepush ¶ added in v0.8.0
func (UnimplementedEventServiceHandler) CancelRepush(context.Context, *connect.Request[proto.CancelRepushRequest]) (*connect.Response[proto.CancelRepushResponse], error)
func (UnimplementedEventServiceHandler) DeleteEvent ¶ added in v0.2.0
func (UnimplementedEventServiceHandler) DeleteEvent(context.Context, *connect.Request[proto.DeleteEventRequest]) (*connect.Response[proto.DeleteEventResponse], error)
func (UnimplementedEventServiceHandler) GetEvent ¶ added in v0.2.0
func (UnimplementedEventServiceHandler) GetEvent(context.Context, *connect.Request[proto.GetEventRequest]) (*connect.Response[proto.GetEventResponse], error)
func (UnimplementedEventServiceHandler) GetEventRecord ¶ added in v1.1.0
func (UnimplementedEventServiceHandler) GetEventRecord(context.Context, *connect.Request[proto.GetEventRecordRequest]) (*connect.Response[proto.GetEventRecordResponse], error)
func (UnimplementedEventServiceHandler) GetRepushStatus ¶ added in v0.8.0
func (UnimplementedEventServiceHandler) GetRepushStatus(context.Context, *connect.Request[proto.GetRepushStatusRequest]) (*connect.Response[proto.GetRepushStatusResponse], error)
func (UnimplementedEventServiceHandler) ListEventReports ¶ added in v0.2.0
func (UnimplementedEventServiceHandler) ListEventReports(context.Context, *connect.Request[proto.ListEventReportsRequest]) (*connect.Response[proto.ListEventReportsResponse], error)
func (UnimplementedEventServiceHandler) ListEvents ¶ added in v0.2.0
func (UnimplementedEventServiceHandler) ListEvents(context.Context, *connect.Request[proto.ListEventsRequest]) (*connect.Response[proto.ListEventsResponse], error)
func (UnimplementedEventServiceHandler) PushEvent ¶ added in v0.2.0
func (UnimplementedEventServiceHandler) PushEvent(context.Context, *connect.Request[proto.PushEventRequest]) (*connect.Response[proto.PushEventResponse], error)
func (UnimplementedEventServiceHandler) RePushEvent ¶ added in v0.9.3
func (UnimplementedEventServiceHandler) RePushEvent(context.Context, *connect.Request[proto.RePushEventRequest]) (*connect.Response[proto.RePushEventResponse], error)
func (UnimplementedEventServiceHandler) RePushEvents ¶ added in v0.8.0
func (UnimplementedEventServiceHandler) RePushEvents(context.Context, *connect.Request[proto.RePushEventsRequest]) (*connect.Response[proto.RePushEventsResponse], error)
func (UnimplementedEventServiceHandler) RegisterEvent ¶ added in v0.2.0
func (UnimplementedEventServiceHandler) RegisterEvent(context.Context, *connect.Request[proto.RegisterEventRequest]) (*connect.Response[proto.RegisterEventResponse], error)
func (UnimplementedEventServiceHandler) UpdateEvent ¶ added in v0.2.0
func (UnimplementedEventServiceHandler) UpdateEvent(context.Context, *connect.Request[proto.UpdateEventRequest]) (*connect.Response[proto.UpdateEventResponse], error)
type UnimplementedHealthServiceHandler ¶ added in v0.2.0
type UnimplementedHealthServiceHandler struct{}
UnimplementedHealthServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedHealthServiceHandler) GetHealthSummary ¶ added in v0.2.0
func (UnimplementedHealthServiceHandler) GetHealthSummary(context.Context, *connect.Request[proto.GetHealthSummaryRequest]) (*connect.Response[proto.GetHealthSummaryResponse], error)
func (UnimplementedHealthServiceHandler) GetWebhookHealth ¶ added in v0.2.0
func (UnimplementedHealthServiceHandler) GetWebhookHealth(context.Context, *connect.Request[proto.GetWebhookHealthRequest]) (*connect.Response[proto.GetWebhookHealthResponse], error)
func (UnimplementedHealthServiceHandler) ListWebhooksByHealth ¶ added in v0.2.0
func (UnimplementedHealthServiceHandler) ListWebhooksByHealth(context.Context, *connect.Request[proto.ListWebhooksByHealthRequest]) (*connect.Response[proto.ListWebhooksByHealthResponse], error)
type UnimplementedSubscriptionServiceHandler ¶ added in v0.2.0
type UnimplementedSubscriptionServiceHandler struct{}
UnimplementedSubscriptionServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedSubscriptionServiceHandler) CreateSubscription ¶ added in v0.2.0
func (UnimplementedSubscriptionServiceHandler) CreateSubscription(context.Context, *connect.Request[proto.CreateSubscriptionRequest]) (*connect.Response[proto.CreateSubscriptionResponse], error)
func (UnimplementedSubscriptionServiceHandler) DeleteSubscription ¶ added in v0.2.0
func (UnimplementedSubscriptionServiceHandler) DeleteSubscription(context.Context, *connect.Request[proto.DeleteSubscriptionRequest]) (*connect.Response[proto.DeleteSubscriptionResponse], error)
func (UnimplementedSubscriptionServiceHandler) GetSubscription ¶ added in v0.2.0
func (UnimplementedSubscriptionServiceHandler) GetSubscription(context.Context, *connect.Request[proto.GetSubscriptionRequest]) (*connect.Response[proto.GetSubscriptionResponse], error)
func (UnimplementedSubscriptionServiceHandler) ListSubscriptions ¶ added in v0.2.0
func (UnimplementedSubscriptionServiceHandler) ListSubscriptions(context.Context, *connect.Request[proto.ListSubscriptionsRequest]) (*connect.Response[proto.ListSubscriptionsResponse], error)
func (UnimplementedSubscriptionServiceHandler) TestSubscriptionTemplate ¶ added in v0.2.0
func (UnimplementedSubscriptionServiceHandler) TestSubscriptionTemplate(context.Context, *connect.Request[proto.TestSubscriptionTemplateRequest]) (*connect.Response[proto.TestSubscriptionTemplateResponse], error)
func (UnimplementedSubscriptionServiceHandler) UpdateSubscription ¶ added in v0.2.0
func (UnimplementedSubscriptionServiceHandler) UpdateSubscription(context.Context, *connect.Request[proto.UpdateSubscriptionRequest]) (*connect.Response[proto.UpdateSubscriptionResponse], error)
type UnimplementedWebhookServiceHandler ¶
type UnimplementedWebhookServiceHandler struct{}
UnimplementedWebhookServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedWebhookServiceHandler) GetNamespaceStats ¶
func (UnimplementedWebhookServiceHandler) GetNamespaceStats(context.Context, *connect.Request[proto.GetNamespaceStatsRequest]) (*connect.Response[proto.GetNamespaceStatsResponse], error)
func (UnimplementedWebhookServiceHandler) GetTemplateFunctions ¶ added in v0.2.0
func (UnimplementedWebhookServiceHandler) GetTemplateFunctions(context.Context, *connect.Request[proto.GetTemplateFunctionsRequest]) (*connect.Response[proto.GetTemplateFunctionsResponse], error)
func (UnimplementedWebhookServiceHandler) ListWebhooks ¶
func (UnimplementedWebhookServiceHandler) ListWebhooks(context.Context, *connect.Request[proto.ListWebhooksRequest]) (*connect.Response[proto.ListWebhooksResponse], error)
func (UnimplementedWebhookServiceHandler) PauseWebhook ¶
func (UnimplementedWebhookServiceHandler) PauseWebhook(context.Context, *connect.Request[proto.PauseWebhookRequest]) (*connect.Response[proto.PauseWebhookResponse], error)
func (UnimplementedWebhookServiceHandler) RegisterWebhook ¶
func (UnimplementedWebhookServiceHandler) RegisterWebhook(context.Context, *connect.Request[proto.RegisterWebhookRequest]) (*connect.Response[proto.RegisterWebhookResponse], error)
func (UnimplementedWebhookServiceHandler) ResumeWebhook ¶
func (UnimplementedWebhookServiceHandler) ResumeWebhook(context.Context, *connect.Request[proto.ResumeWebhookRequest]) (*connect.Response[proto.ResumeWebhookResponse], error)
func (UnimplementedWebhookServiceHandler) UnregisterWebhook ¶
func (UnimplementedWebhookServiceHandler) UnregisterWebhook(context.Context, *connect.Request[proto.UnregisterWebhookRequest]) (*connect.Response[proto.UnregisterWebhookResponse], error)
func (UnimplementedWebhookServiceHandler) UpdateWebhookConfig ¶
func (UnimplementedWebhookServiceHandler) UpdateWebhookConfig(context.Context, *connect.Request[proto.UpdateWebhookConfigRequest]) (*connect.Response[proto.UpdateWebhookConfigResponse], error)
type WebhookServiceClient ¶
type WebhookServiceClient interface {
// RegisterWebhook creates a new webhook registration.
// Accepts a target URL, a list of event names, and optional HTTP configuration.
// Subscriptions are created automatically for each event in the events list.
// Returns the generated webhook_id and created_at timestamp.
// Errors: ALREADY_EXISTS if the URL is already registered in the same namespace.
RegisterWebhook(context.Context, *connect.Request[proto.RegisterWebhookRequest]) (*connect.Response[proto.RegisterWebhookResponse], error)
// UnregisterWebhook permanently deletes a webhook and all its subscriptions.
// Associated delivery records are also cascade-deleted.
// Errors: NOT_FOUND if the webhook_id does not exist in the given namespace.
UnregisterWebhook(context.Context, *connect.Request[proto.UnregisterWebhookRequest]) (*connect.Response[proto.UnregisterWebhookResponse], error)
// ListWebhooks returns webhooks for a namespace with optional filters.
// Supports filtering by event name, active status, or specific webhook_id.
// Results are paginated (default limit: 50). Each webhook includes its current health status.
ListWebhooks(context.Context, *connect.Request[proto.ListWebhooksRequest]) (*connect.Response[proto.ListWebhooksResponse], error)
// UpdateWebhookConfig patches one or more fields on an existing webhook.
// Only non-zero fields in WebhookUpdateFields are applied. Updating events replaces
// the full subscription set: removed events have their subscriptions deleted,
// new events get subscriptions created.
// Errors: NOT_FOUND if the webhook does not exist.
UpdateWebhookConfig(context.Context, *connect.Request[proto.UpdateWebhookConfigRequest]) (*connect.Response[proto.UpdateWebhookConfigResponse], error)
// PauseWebhook sets a webhook to inactive. Paused webhooks are skipped during
// event fan-out -- no new deliveries are created for them. Existing in-flight
// deliveries are not cancelled.
// Errors: NOT_FOUND if the webhook does not exist.
PauseWebhook(context.Context, *connect.Request[proto.PauseWebhookRequest]) (*connect.Response[proto.PauseWebhookResponse], error)
// ResumeWebhook re-activates a paused webhook. Future events will again create
// deliveries for this webhook. Events pushed while the webhook was paused are not retroactively delivered.
// Errors: NOT_FOUND if the webhook does not exist.
ResumeWebhook(context.Context, *connect.Request[proto.ResumeWebhookRequest]) (*connect.Response[proto.ResumeWebhookResponse], error)
// GetNamespaceStats returns aggregate delivery statistics for a namespace:
// total/active webhooks, total/successful/failed/pending deliveries, and success rate.
GetNamespaceStats(context.Context, *connect.Request[proto.GetNamespaceStatsRequest]) (*connect.Response[proto.GetNamespaceStatsResponse], error)
// GetTemplateFunctions returns the list of Go template functions available for
// payload transformation in subscriptions. Each entry includes the function name
// and a description of its behavior.
GetTemplateFunctions(context.Context, *connect.Request[proto.GetTemplateFunctionsRequest]) (*connect.Response[proto.GetTemplateFunctionsResponse], error)
}
WebhookServiceClient is a client for the webhook.WebhookService service.
func NewWebhookServiceClient ¶
func NewWebhookServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) WebhookServiceClient
NewWebhookServiceClient constructs a client for the webhook.WebhookService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.
The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).
type WebhookServiceHandler ¶
type WebhookServiceHandler interface {
// RegisterWebhook creates a new webhook registration.
// Accepts a target URL, a list of event names, and optional HTTP configuration.
// Subscriptions are created automatically for each event in the events list.
// Returns the generated webhook_id and created_at timestamp.
// Errors: ALREADY_EXISTS if the URL is already registered in the same namespace.
RegisterWebhook(context.Context, *connect.Request[proto.RegisterWebhookRequest]) (*connect.Response[proto.RegisterWebhookResponse], error)
// UnregisterWebhook permanently deletes a webhook and all its subscriptions.
// Associated delivery records are also cascade-deleted.
// Errors: NOT_FOUND if the webhook_id does not exist in the given namespace.
UnregisterWebhook(context.Context, *connect.Request[proto.UnregisterWebhookRequest]) (*connect.Response[proto.UnregisterWebhookResponse], error)
// ListWebhooks returns webhooks for a namespace with optional filters.
// Supports filtering by event name, active status, or specific webhook_id.
// Results are paginated (default limit: 50). Each webhook includes its current health status.
ListWebhooks(context.Context, *connect.Request[proto.ListWebhooksRequest]) (*connect.Response[proto.ListWebhooksResponse], error)
// UpdateWebhookConfig patches one or more fields on an existing webhook.
// Only non-zero fields in WebhookUpdateFields are applied. Updating events replaces
// the full subscription set: removed events have their subscriptions deleted,
// new events get subscriptions created.
// Errors: NOT_FOUND if the webhook does not exist.
UpdateWebhookConfig(context.Context, *connect.Request[proto.UpdateWebhookConfigRequest]) (*connect.Response[proto.UpdateWebhookConfigResponse], error)
// PauseWebhook sets a webhook to inactive. Paused webhooks are skipped during
// event fan-out -- no new deliveries are created for them. Existing in-flight
// deliveries are not cancelled.
// Errors: NOT_FOUND if the webhook does not exist.
PauseWebhook(context.Context, *connect.Request[proto.PauseWebhookRequest]) (*connect.Response[proto.PauseWebhookResponse], error)
// ResumeWebhook re-activates a paused webhook. Future events will again create
// deliveries for this webhook. Events pushed while the webhook was paused are not retroactively delivered.
// Errors: NOT_FOUND if the webhook does not exist.
ResumeWebhook(context.Context, *connect.Request[proto.ResumeWebhookRequest]) (*connect.Response[proto.ResumeWebhookResponse], error)
// GetNamespaceStats returns aggregate delivery statistics for a namespace:
// total/active webhooks, total/successful/failed/pending deliveries, and success rate.
GetNamespaceStats(context.Context, *connect.Request[proto.GetNamespaceStatsRequest]) (*connect.Response[proto.GetNamespaceStatsResponse], error)
// GetTemplateFunctions returns the list of Go template functions available for
// payload transformation in subscriptions. Each entry includes the function name
// and a description of its behavior.
GetTemplateFunctions(context.Context, *connect.Request[proto.GetTemplateFunctionsRequest]) (*connect.Response[proto.GetTemplateFunctionsResponse], error)
}
WebhookServiceHandler is an implementation of the webhook.WebhookService service.