server

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2023 License: LGPL-3.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RequestHandlerFunction

type RequestHandlerFunction func(db *sql.DB, w http.ResponseWriter, r *http.Request)

function prototype to inject DB instance in handleRequest()

type Server

type Server struct {
	Router      *chi.Mux
	DB          *sql.DB
	Config      *config.Config
	CertManager *autocert.Manager
	TLSConfig   *tls.Config
}

Server has router and db instances

func (*Server) Initialize

func (s *Server) Initialize(config *config.Config)

Initialize the server with predefined configuration

func (*Server) Run

func (s *Server) Run(conf *config.Config)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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