marmot

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MigrateDB

func MigrateDB(ctx context.Context, db *pgxpool.Pool) error

MigrateDB runs database migrations against the provided pool.

func SecurityHeaders

func SecurityHeaders(next http.Handler, custom map[string]string) http.Handler

SecurityHeaders wraps an http.Handler to set standard security headers.

func SetupStaticFiles

func SetupStaticFiles(mux *http.ServeMux) error

SetupStaticFiles registers the embedded SPA file server on the mux.

Types

type Server

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

Server wraps the internal Marmot API server for use by external modules.

func NewServer

func NewServer(cfg *config.Config, db *pgxpool.Pool) *Server

NewServer creates a new Marmot server with all services initialized.

func (*Server) RegisterRoutes

func (s *Server) RegisterRoutes(mux *http.ServeMux)

RegisterRoutes registers all API routes on the given ServeMux.

func (*Server) Stop

func (s *Server) Stop()

Stop gracefully shuts down all background services.

Jump to

Keyboard shortcuts

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