Help us shape the future of Go! Take the 2026 Go Developer Survey

app

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deps

type Deps struct {
	Config        *config.Config
	ControlDB     *gorm.DB
	DBPool        *pgxpool.Pool
	River         *river.Client[pgx.Tx]
	Tenants       *database.TenantManager
	Jobs          workflow.Enqueuer
	TokenSessions *service.TokenSessionService
	Policies      *service.PolicyService

	// Flags is the feature flag registry's resolver. Distinct from Policies
	// because the two merge in opposite directions: a policy can only tighten as
	// it descends, and a flag's whole purpose is that the narrower level
	// overrides — in either direction.
	Flags   *service.FeatureFlagService
	Estates *service.EstateService
	Mail    service.EmailSender

	// APIKeys verifies every key/secret credential, on every surface. One
	// instance, because scope exclusion is only a boundary if the same code
	// enforces it for org keys and agent keys alike.
	APIKeys *service.APIKeyService

	// Admission is THE org-creation gate, constructed once so registration and
	// social bootstrap cannot end up enforcing different limits. It is a
	// pointer whose nil case denies rather than panics, because api.Build is
	// exercised with partially-populated Deps in the router tests.
	Admission *service.AdmissionService
}

func (*Deps) MailSender

func (d *Deps) MailSender() service.EmailSender

MailSender returns the configured sender, falling back to sending inline.

The fallback is not laziness: api.Build is exercised in tests with partially-populated Deps, and a nil sender there would panic inside a handler rather than fail visibly at construction. In production serve.go sets Mail to the QUEUED sender, so mail gets retries and backoff; the direct path is a development convenience and has neither.

Jump to

Keyboard shortcuts

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