network

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GeneralMiddleWare

type GeneralMiddleWare func(handler http.Handler) http.Handler

type NetHandler

type NetHandler struct {
	Mux               *http.ServeMux
	GeneralMiddleware GeneralMiddleWare
}

func NewNetwork

func NewNetwork(mux *http.ServeMux) *NetHandler

type Responses

type Responses struct{}

func (Responses) RepondBadRequest

func (Responses) RepondBadRequest(w http.ResponseWriter, r *http.Request, message ...string)

bad request

func (Responses) RepondForbidden

func (Responses) RepondForbidden(w http.ResponseWriter, r *http.Request)

forbidden

func (Responses) RepondUnauthorized

func (Responses) RepondUnauthorized(w http.ResponseWriter, r *http.Request)

unauthorized request

func (Responses) RespondAccepted

func (Responses) RespondAccepted(w http.ResponseWriter, r *http.Request)

accepted request

func (Responses) RespondCreated

func (Responses) RespondCreated(w http.ResponseWriter, r *http.Request, data any, message ...string)

post request

func (Responses) RespondDeleted

func (Responses) RespondDeleted(w http.ResponseWriter, r *http.Request)

delete request

func (Responses) RespondOk

func (Responses) RespondOk(w http.ResponseWriter, r *http.Request, data any, message ...string)

get request

func (Responses) RespondUpdated

func (Responses) RespondUpdated(w http.ResponseWriter, r *http.Request)

put request

Jump to

Keyboard shortcuts

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