server

package
v0.4.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(
	cfg configuration.ServerConfiguration,
	sessionManager *sessions.Manager,
	authenticator Authenticator,
	authorizer Authorizer,
	redisClient RedisClient,
	metrics Metrics,
	logger *slog.Logger,
) http.Handler

New returns a new http.Handler that serves all API endpoints and the web frontend.

Types

type Authenticator added in v0.3.0

type Authenticator interface {
	InitiateLogin(ctx context.Context, url string) (string, error)
	ConfirmLogin(ctx context.Context, state, code string) (provider.Identity, string, error)
}

type Authorizer added in v0.3.0

type Authorizer interface {
	Allow(url *url.URL, user string) bool
	GroupsForUser(email string) []string
}

type Metrics

type Metrics interface {
	InstrumentedHandler(label string) func(http.Handler) http.Handler
}

type RedisClient

type RedisClient interface {
	Ping(ctx context.Context) *redis.StatusCmd
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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