server

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2021 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddEndPoint added in v1.1.0

func AddEndPoint(ep *model.EndPoint) error

func ParsePathParams added in v1.1.0

func ParsePathParams(template, path string) (map[string]string, error)

ParsePathParams parse request path param according to path template and extract its values.

func Start

func Start(host string, port int, initEndpoint *model.EndPoint) error

Types

type HttpTargetHandler

type HttpTargetHandler struct {
}

func (*HttpTargetHandler) CreatePath

func (h *HttpTargetHandler) CreatePath(res http.ResponseWriter, req *http.Request)

func (*HttpTargetHandler) DeletePath

func (h *HttpTargetHandler) DeletePath(res http.ResponseWriter, req *http.Request)

func (*HttpTargetHandler) GetPaths

func (h *HttpTargetHandler) GetPaths(res http.ResponseWriter, req *http.Request)

func (*HttpTargetHandler) ServeHTTP

func (h *HttpTargetHandler) ServeHTTP(res http.ResponseWriter, req *http.Request)

func (*HttpTargetHandler) UpdatePath

func (h *HttpTargetHandler) UpdatePath(res http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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