http

package
v0.0.0-...-72cc51b Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server wraps the Echo instance with application configuration and logger.

func NewServer

func NewServer(cfg *config.Config, logger *slog.Logger, opts ...ServerOption) *Server

NewServer creates a configured Echo server with middleware and routes.

func (*Server) Echo

func (s *Server) Echo() *echo.Echo

Echo returns the underlying echo instance (for testing).

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

Start runs the HTTP server with graceful shutdown on context cancellation.

type ServerOption

type ServerOption func(*Server)

ServerOption configures optional Server dependencies.

func WithAPIKeyHandler

func WithAPIKeyHandler(h *handler.APIKeyHandler) ServerOption

WithAPIKeyHandler sets the APIKeyHandler for API key management routes.

func WithAdapterHandler

func WithAdapterHandler(h *handler.AdapterHandler) ServerOption

WithAdapterHandler sets the AdapterHandler for adapter CRUD routes.

func WithAdapterSetupHandler

func WithAdapterSetupHandler(h *handler.AdapterSetupHandler) ServerOption

WithAdapterSetupHandler sets the AdapterSetupHandler for setup guide routes.

func WithAuditHandler

func WithAuditHandler(h *handler.AuditHandler) ServerOption

WithAuditHandler sets the AuditHandler for audit log queries.

func WithAuthDeps

func WithAuthDeps(apiKeyStore port.APIKeyStore, memberStore port.MemberStore, oidcVerifier port.OIDCVerifier, pepper string) ServerOption

WithAuthDeps sets authentication dependencies for the Auth middleware. The pepper parameter is the HMAC pepper derived from the master key for API key hashing.

func WithConfigHandler

func WithConfigHandler(h *handler.ConfigHandler) ServerOption

WithConfigHandler sets the ConfigHandler for config CRUD routes.

func WithConfigStore

func WithConfigStore(cs port.GlobalConfigStore) ServerOption

WithConfigStore sets the GlobalConfigStore for the config handler.

func WithDashboardHandler

func WithDashboardHandler(h *handler.DashboardHandler) ServerOption

WithDashboardHandler sets the DashboardHandler for dashboard stats routes.

func WithDataPlaneEmailHandler

func WithDataPlaneEmailHandler(h *handler.DataPlaneEmailHandler) ServerOption

WithDataPlaneEmailHandler sets the API-key-scoped data-plane email query handler.

func WithEmailHandler

func WithEmailHandler(h *handler.EmailHandler) ServerOption

WithEmailHandler sets the EmailHandler for email query endpoints.

func WithExternalIntegrationHandler

func WithExternalIntegrationHandler(h *handler.ExternalIntegrationHandler) ServerOption

WithExternalIntegrationHandler sets the handler for the external integration bootstrap route.

func WithIdentityHandler

func WithIdentityHandler(h *handler.IdentityHandler) ServerOption

WithIdentityHandler sets the IdentityHandler for adapter identity routes.

func WithInjectorHandler

func WithInjectorHandler(h *handler.InjectorHandler) ServerOption

WithInjectorHandler sets the InjectorHandler for injector CRUD routes.

func WithMediaHandler

func WithMediaHandler(h *handler.MediaHandler) ServerOption

WithMediaHandler sets the MediaHandler for public media utility routes.

func WithMemberHandler

func WithMemberHandler(h *handler.MemberHandler) ServerOption

WithMemberHandler sets the MemberHandler for member CRUD routes.

func WithOnboardingHandler

func WithOnboardingHandler(h *handler.OnboardingHandler) ServerOption

WithOnboardingHandler sets the OnboardingHandler for onboarding routes.

func WithPinger

func WithPinger(p handler.Pinger) ServerOption

WithPinger sets the Pinger used by the health endpoint to check DB connectivity.

func WithSESWebhookHandler

func WithSESWebhookHandler(h *handler.SESWebhookHandler) ServerOption

WithSESWebhookHandler sets the SES webhook handler for provider event ingestion.

func WithSendHandler

func WithSendHandler(h *handler.SendHandler) ServerOption

WithSendHandler sets the SendHandler for the data-plane send endpoint.

func WithSuppressionHandler

func WithSuppressionHandler(h *handler.SuppressionHandler) ServerOption

WithSuppressionHandler sets the SuppressionHandler for suppression list management.

func WithTemplateHandler

func WithTemplateHandler(h *handler.TemplateHandler) ServerOption

WithTemplateHandler sets the TemplateHandler for template/version/locale CRUD routes.

func WithTemplateTypeHandler

func WithTemplateTypeHandler(h *handler.TemplateTypeHandler) ServerOption

WithTemplateTypeHandler sets the TemplateTypeHandler for template type CRUD routes.

func WithTenantHandler

func WithTenantHandler(h *handler.TenantHandler) ServerOption

WithTenantHandler sets the TenantHandler for tenant CRUD routes.

func WithTenantStore

func WithTenantStore(ts port.TenantStore) ServerOption

WithTenantStore sets the TenantStore for RBAC middleware route resolution.

func WithTrackingHandler

func WithTrackingHandler(h *handler.TrackingHandler) ServerOption

WithTrackingHandler sets the TrackingHandler for open-tracking pixel routes.

func WithWebhookHandler

func WithWebhookHandler(h *handler.WebhookHandler) ServerOption

WithWebhookHandler sets the WebhookHandler for webhook CRUD routes.

func WithWorkspaceHandler

func WithWorkspaceHandler(h *handler.WorkspaceHandler) ServerOption

WithWorkspaceHandler sets the WorkspaceHandler for workspace CRUD routes.

func WithWorkspacePolicyHandler

func WithWorkspacePolicyHandler(h *handler.WorkspacePolicyHandler) ServerOption

WithWorkspacePolicyHandler sets the WorkspacePolicyHandler for _system policy routes.

func WithWorkspaceStore

func WithWorkspaceStore(ws port.WorkspaceStore) ServerOption

WithWorkspaceStore sets the WorkspaceStore for RBAC middleware route resolution.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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