app

package
v0.0.0-...-d288a6d Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultIdentityProviderFactory

func DefaultIdentityProviderFactory(ctx context.Context, adapter *domain.Adapter, decryptedConfig []byte) (port.IdentityProvider, error)

DefaultIdentityProviderFactory creates IdentityProvider instances based on adapter type. Lives in app/ because it imports concrete adapters (ses, gmail), which the service layer must not.

Types

type App

type App struct {
	Server      *sendahttp.Server
	RiverClient *river.Client
	Pool        *pgxpool.Pool
	// contains filtered or unexported fields
}

App holds the top-level application components for lifecycle management.

func Bootstrap

func Bootstrap(ctx context.Context, cfg *config.Config, logger *slog.Logger, ext *Extensions) (*App, error)

Bootstrap wires all dependencies and returns a ready-to-start App. ext may be nil when running without SDK extensions.

func (*App) Close

func (a *App) Close(ctx context.Context)

Close gracefully shuts down app resources.

type Extensions

type Extensions struct {
	Injectors                  []port.CodeInjector
	InitFunc                   port.CodeInitFunc
	ExternalAuthMethods        []port.ExternalAuthMethod
	ExternalWorkspaceResolvers []port.ExternalWorkspaceResolver
}

Extensions holds user-provided extensions registered via the SDK Engine. When nil or empty, Senda runs with built-in behavior only.

Jump to

Keyboard shortcuts

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