server

package
v0.0.0-...-1c756da Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpServer

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

HttpServer struct

func NewHttpServer

func NewHttpServer(handler handler.BooksHandler) *HttpServer

NewHttpServer New Server constructor

func (*HttpServer) Run

func (s *HttpServer) Run()

type Router

type Router interface {
	GET(uri string, f func(resp http.ResponseWriter, r *http.Request))
	POST(uri string, f func(resp http.ResponseWriter, r *http.Request))
	PATCH(uri string, f func(resp http.ResponseWriter, r *http.Request))
	DELETE(uri string, f func(resp http.ResponseWriter, r *http.Request))
	Serve(port string)
}

Jump to

Keyboard shortcuts

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