outbox

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2026 License: AGPL-3.0 Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

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 MiddlewareFunc func(c *gin.Context)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL