server

package
v0.99.36-0...-9dd75c3 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: Artistic-2.0 Imports: 34 Imported by: 0

Documentation

Overview

Package server implements the HTTP server for Convos, including API endpoints and SPA frontend.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextMiddleware

func ContextMiddleware(next http.Handler) http.Handler

func ProviderMiddleware

func ProviderMiddleware(next http.Handler) http.Handler

Types

type Server

type Server struct {
	Router  *chi.Mux
	Core    *core.Core
	Config  *config.Config
	Store   sessions.Store
	Handler *handler.Handler
	// contains filtered or unexported fields
}

func New

func New(c *core.Core, cfg *config.Config, authenticator core.Authenticator) *Server

func (*Server) AuthMiddleware

func (s *Server) AuthMiddleware(next http.Handler) http.Handler

func (*Server) RateLimitMiddleware

func (s *Server) RateLimitMiddleware(next http.Handler) http.Handler

func (*Server) RequireAuthMiddleware

func (s *Server) RequireAuthMiddleware(next http.Handler) http.Handler

func (*Server) ReverseProxyMiddleware

func (s *Server) ReverseProxyMiddleware(next http.Handler) http.Handler

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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