web

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2026 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Acting

type Acting struct {
	System  bool
	Current uuid.UUID
	Tenants []console.Membership
}

Acting is what the header shows about who is looking: their role, and, for somebody not confined to a tenant, which one they are inside right now.

type Config

type Config struct {
	Transports   *delivery.Transports
	Auth         *auth.Registry
	Policy       auth.Policy
	SessionTTL   time.Duration
	SecureCookie bool
	Logger       *slog.Logger
}

type Handler

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

func New

func New(store Store, cfg Config) *Handler

func (*Handler) Register

func (h *Handler) Register(mux *http.ServeMux)

type Store

type Store interface {
	UserByEmail(ctx context.Context, email string) (console.User, error)
	VerifyPassword(ctx context.Context, email, password string) (string, error)
	CreateSession(ctx context.Context, digest []byte, userID uuid.UUID, expires time.Time) error
	SessionUser(ctx context.Context, digest []byte) (console.User, error)
	SetTimeZone(ctx context.Context, user uuid.UUID, zone string) error
	DeleteSession(ctx context.Context, digest []byte) error
	UserBySubject(
		ctx context.Context, subject, email string, place console.Placement, provision bool,
	) (console.User, error)
	Role(ctx context.Context, name string) (authz.Role, error)
	Roles(ctx context.Context) ([]authz.Role, error)
	SetRole(ctx context.Context, role authz.Role) error
	PointedHere(ctx context.Context) ([]console.Mapping, error)
	PointValueAt(ctx context.Context, method, value string, place console.Placement) error
	StopPointingValue(ctx context.Context, method, value string) error
	DeleteRole(ctx context.Context, name string) error
	Operators(ctx context.Context) ([]console.Operator, error)
	SystemAdmins(ctx context.Context) ([]console.Operator, error)
	SetSystemAdmin(ctx context.Context, id uuid.UUID) error
	ClearSystemAdmin(ctx context.Context, id uuid.UUID) error
	CreateUser(ctx context.Context, email, passwordHash string, place console.Placement) error
	SetOperatorRole(ctx context.Context, id uuid.UUID, role string) error
	DeleteOperator(ctx context.Context, id uuid.UUID) error
	Tenants(ctx context.Context) ([]console.Tenant, error)
	Memberships(ctx context.Context, user uuid.UUID) ([]console.Membership, error)
	RoleIn(ctx context.Context, user, tenant uuid.UUID) (string, bool, error)
	Join(ctx context.Context, user uuid.UUID, place console.Placement) error
	Settle(ctx context.Context, user uuid.UUID, named []console.Placement) error
	Isolation(ctx context.Context) (postgres.Isolation, error)
	CreateTenant(ctx context.Context, slug, name string) (console.Tenant, error)
	DeleteTenant(ctx context.Context, slug string) error
	Placement(ctx context.Context, method string, claims []string) ([]console.Placement, error)
	SearchEvents(ctx context.Context, filter console.Filter) (console.Page, error)
	Providers(ctx context.Context) ([]string, error)
	EventDetail(ctx context.Context, id uuid.UUID) (console.EventDetail, error)
	EventDeliveries(ctx context.Context, id uuid.UUID) ([]console.Delivery, error)
	ReplayEvent(ctx context.Context, id uuid.UUID) (int64, error)
	ReplayDelivery(ctx context.Context, id uuid.UUID) (int64, error)
	UnroutedProviders(ctx context.Context) ([]console.UnroutedProvider, error)
	DetailedRoutes(ctx context.Context) ([]console.RouteRow, error)
	Unsigned(ctx context.Context) ([]console.UnsignedDestination, error)
	Force(ctx context.Context, operator uuid.UUID, reason string, events []uuid.UUID) (int64, error)
	SendTest(ctx context.Context, routeID uuid.UUID) (uuid.UUID, error)
	AddRoute(ctx context.Context, provider, destination, url, transport string) error
	SaveRoute(ctx context.Context, routeID uuid.UUID, url string, enabled bool) error
	DeleteRoute(ctx context.Context, routeID uuid.UUID) error
	ReplayDestination(ctx context.Context, routeID uuid.UUID) (int64, error)
	Verifications(ctx context.Context) ([]console.Verification, error)
	ProviderSettings(ctx context.Context) ([]postgres.ProviderSettings, error)
	SetProvider(ctx context.Context, settings postgres.ProviderSettings) error
	DeleteProvider(ctx context.Context, name string) error
	Recheck(ctx context.Context, name string, batch int32) (int, error)
	DeliveryStates(ctx context.Context) (map[string]int64, error)
	EventsAwaitingRoute(ctx context.Context) (int64, error)
	PanelChanges(ctx context.Context) <-chan struct{}
}

type Summary

type Summary struct {
	Delivered     int64
	Pending       int64
	Dead          int64
	AwaitingRoute int64
}

Jump to

Keyboard shortcuts

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