internal

package
v0.4.3-dev.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterRoutes

func RegisterRoutes(e *echo.Echo, db *gorm.DB, cfg *config.Config, opts ...RouteOptions)

RegisterRoutes wires all application dependencies and registers HTTP routes.

Types

type RouteOptions added in v0.2.0

type RouteOptions struct {
	EmailSender email.Sender
	// StripeClient, when non-nil, overrides the real Stripe SDK client used by
	// the subscription handler. Tests inject an in-memory fake; production
	// callers leave this nil so NewStripeClient is used.
	StripeClient subscription.StripeClient
	// StripeEventVerifier, when non-nil, overrides the real Stripe webhook
	// signature verifier. Tests inject a fake verifier that accepts any
	// signature; production leaves this nil.
	StripeEventVerifier webhook.EventVerifier
	// Tracker is the analytics event tracker injected into handlers. When nil,
	// a NoopTracker is used so tests that don't care about analytics still work
	// without any extra setup.
	Tracker analytics.Tracker
}

RouteOptions allows optional overrides when registering routes (e.g. for testing).

Directories

Path Synopsis
Package analytics provides a thin, non-blocking wrapper around PostHog for capturing product analytics events.
Package analytics provides a thin, non-blocking wrapper around PostHog for capturing product analytics events.
Package logging provides the single initialisation point for the application logger.
Package logging provides the single initialisation point for the application logger.
Package webhook implements unauthenticated inbound webhook handlers.
Package webhook implements unauthenticated inbound webhook handlers.

Jump to

Keyboard shortcuts

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