webserver

package
v0.0.0-...-2d4d2c3 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

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
	GetHandlers   map[string]http.HandlerFunc
	PostHandlers  map[string]http.HandlerFunc
	WebServerPort string
}

func NewWebServer

func NewWebServer(serverPort string) *WebServer

func (*WebServer) AddGetHandler

func (s *WebServer) AddGetHandler(path string, handler http.HandlerFunc)

func (*WebServer) AddPostHandler

func (s *WebServer) AddPostHandler(path string, handler http.HandlerFunc)

func (*WebServer) Start

func (s *WebServer) Start()

loop through the handlers and add them to the router register middeleware logger start the server

type WebServerStarter

type WebServerStarter struct {
	WebServer WebServer
}

func NewWebServerStarter

func NewWebServerStarter(webServer WebServer) *WebServerStarter

Jump to

Keyboard shortcuts

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