Documentation
¶
Overview ¶
Package outbox provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.1 DO NOT EDIT.
Package outbox provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.1 DO NOT EDIT.
Index ¶
- func RegisterHandlers(router gin.IRouter, si ServerInterface)
- func RegisterHandlersWithOptions(router gin.IRouter, si ServerInterface, options GinServerOptions)
- type GinServerOptions
- type ListOutboxMessagesParams
- type MiddlewareFunc
- type OutboxMessage
- type OutboxMessageStatus
- type ServerInterface
- type ServerInterfaceWrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterHandlers ¶
func RegisterHandlers(router gin.IRouter, si ServerInterface)
RegisterHandlers creates http.Handler with routing matching OpenAPI spec.
func RegisterHandlersWithOptions ¶
func RegisterHandlersWithOptions(router gin.IRouter, si ServerInterface, options GinServerOptions)
RegisterHandlersWithOptions creates http.Handler with additional options
Types ¶
type GinServerOptions ¶
type GinServerOptions struct {
BaseURL string
Middlewares []MiddlewareFunc
ErrorHandler func(*gin.Context, error, int)
}
GinServerOptions provides options for the Gin server.
type ListOutboxMessagesParams ¶
type ListOutboxMessagesParams struct {
// Status Filter by status (pending, sent, failed, dead)
Status *OutboxMessageStatus `form:"status,omitempty" json:"status,omitempty"`
// EventType Filter by event type
EventType *string `form:"event_type,omitempty" json:"event_type,omitempty"`
// TenantId Filter by tenant ID (SUPER_ADMIN only)
TenantId *string `form:"tenant_id,omitempty" json:"tenant_id,omitempty"`
Page *int `form:"page,omitempty" json:"page,omitempty"`
PageSize *int `form:"page_size,omitempty" json:"page_size,omitempty"`
}
ListOutboxMessagesParams defines parameters for ListOutboxMessages.
type MiddlewareFunc ¶
type OutboxMessage ¶
type OutboxMessage struct {
// Attempts Number of delivery attempts made so far
Attempts int `json:"attempts"`
CreatedAt time.Time `json:"created_at"`
CreatedBy *string `json:"created_by"`
// EventType Identifies the kind of outbound call (e.g. trainer_session_feedback)
EventType string `json:"event_type"`
Id openapi_types.UUID `json:"id"`
// LastError Error message from the last failed attempt
LastError *string `json:"last_error"`
// MaxAttempts Maximum attempts before marking as dead
MaxAttempts int `json:"max_attempts"`
NextRetryAt time.Time `json:"next_retry_at"`
// Payload Arbitrary JSON payload persisted at enqueue time
Payload *map[string]interface{} `json:"payload,omitempty"`
SentAt *time.Time `json:"sent_at"`
// Status Delivery status of an outbox message
Status OutboxMessageStatus `json:"status"`
// TargetUrl HTTP endpoint that receives the POST
TargetUrl string `json:"target_url"`
TenantId *string `json:"tenant_id"`
UpdatedAt time.Time `json:"updated_at"`
}
OutboxMessage defines model for OutboxMessage.
type OutboxMessageStatus ¶
type OutboxMessageStatus string
OutboxMessageStatus Delivery status of an outbox message
const ( Dead OutboxMessageStatus = "dead" Failed OutboxMessageStatus = "failed" Pending OutboxMessageStatus = "pending" Sent OutboxMessageStatus = "sent" )
Defines values for OutboxMessageStatus.
type ServerInterface ¶
type ServerInterface interface {
// (GET /admin-api/v1/outbox/messages)
ListOutboxMessages(c *gin.Context, params ListOutboxMessagesParams)
// (DELETE /admin-api/v1/outbox/messages/{id})
DeleteOutboxMessage(c *gin.Context, id openapi_types.UUID)
// (POST /admin-api/v1/outbox/messages/{id}/retry)
RetryOutboxMessage(c *gin.Context, id openapi_types.UUID)
}
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
HandlerMiddlewares []MiddlewareFunc
ErrorHandler func(*gin.Context, error, int)
}
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) DeleteOutboxMessage ¶
func (siw *ServerInterfaceWrapper) DeleteOutboxMessage(c *gin.Context)
DeleteOutboxMessage operation middleware
func (*ServerInterfaceWrapper) ListOutboxMessages ¶
func (siw *ServerInterfaceWrapper) ListOutboxMessages(c *gin.Context)
ListOutboxMessages operation middleware
func (*ServerInterfaceWrapper) RetryOutboxMessage ¶
func (siw *ServerInterfaceWrapper) RetryOutboxMessage(c *gin.Context)
RetryOutboxMessage operation middleware