server

package
v0.0.0-...-683b713 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package server defines the top-level server object along with top-level HTTP handlers for the server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server is the top-level server object. Contains depenedencies and configuration.

func New

func New(cfg *global.Config, dbc *sql.DB, mailer mailer.Mailer, staticFs fs.FS) (*Server, error)

New creates a new server object with the given configuration. The server object itself implements http.Handler, and should be used directly. Any middleware is already applied on a per-route basis.

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