server

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

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

Go to latest
Published: May 9, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(r *chi.Mux, c CompaniesHandler, mwCompany Middleware, mwPayload Middleware, mwIp Middleware) *server

NewServer creates a new server with the given router and handlers.

Types

type CompaniesHandler

type CompaniesHandler interface {
	HandleCompanyCreate(http.ResponseWriter, *http.Request)
	HandleCompanyGetOne(http.ResponseWriter, *http.Request)
	HandleCompanyGetAll(http.ResponseWriter, *http.Request)
	HandleCompanyUpdate(http.ResponseWriter, *http.Request)
	HandleCompanyDelete(http.ResponseWriter, *http.Request)
}

CompaniesHandler defines a set of handlers required to be used with the server.

type Middleware

type Middleware interface {
	Handle(http.Handler) http.Handler
}

Middleware defines a requirements for the middlewares to be used with the server.

Jump to

Keyboard shortcuts

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