httpapi

package
v0.0.0-...-5038352 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2022 License: Apache-2.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 MuxRoutePath

type MuxRoutePath struct{}

func NewMuxRoutePath

func NewMuxRoutePath() *MuxRoutePath

func (*MuxRoutePath) Vars

func (path *MuxRoutePath) Vars(req *http.Request) map[string]string

type MuxRouter

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

func NewMuxRouter

func NewMuxRouter() *MuxRouter

func (*MuxRouter) Get

func (router *MuxRouter) Get(path string, handler func(http.ResponseWriter, *http.Request))

func (*MuxRouter) Handler

func (router *MuxRouter) Handler() http.Handler

func (*MuxRouter) Use

func (router *MuxRouter) Use(middleware func(http.Handler) http.Handler)

type Server

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

func NewServer

func NewServer(router http.Handler, config ServerConfig) *Server

func (*Server) ListenAndServe

func (server *Server) ListenAndServe(address string) error

type ServerConfig

type ServerConfig struct {
	WriteTimeout time.Duration
	ReadTimeout  time.Duration
	IdleTimeout  time.Duration
}

Jump to

Keyboard shortcuts

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