rest

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	Req  *http.Request
	Resp http.ResponseWriter
}

type HandleFunc

type HandleFunc func(ctx Context)

type HttpServer

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

func NewHttpServer

func NewHttpServer() *HttpServer

func (*HttpServer) Get

func (h *HttpServer) Get(path string, handleFunc HandleFunc)

/=================================================================================================

func (*HttpServer) Post

func (h *HttpServer) Post(path string, handleFunc HandleFunc)

func (*HttpServer) Serve

func (h *HttpServer) Serve(ctx *Context)

func (*HttpServer) ServeHTTP

func (h *HttpServer) ServeHTTP(writer http.ResponseWriter, request *http.Request)

func (*HttpServer) Start

func (h *HttpServer) Start(addr string) error

type Server

type Server interface {
	http.Handler
	Start(addr string) error
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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