webserver

package
v0.0.0-...-4ac03a4 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WebServer

type WebServer struct {
	Router        chi.Router
	Handlers      map[string]map[string]http.HandlerFunc
	WebServerPort string
}

func NewWebServer

func NewWebServer(serverPort string) *WebServer

func (*WebServer) AddHandler

func (s *WebServer) AddHandler(method, path string, handler http.HandlerFunc) error

func (*WebServer) Start

func (s *WebServer) Start()

Start loop through the handlers and add them to the router, register middleware logger and start the server

Jump to

Keyboard shortcuts

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