server

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2023 License: LGPL-3.0 Imports: 11 Imported by: 0

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
}

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(host string)

Run the server on it's router

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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