gatehttp

package
v0.0.0-...-d08609b Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FrontActionFunc

type FrontActionFunc func(h http.Handler) http.Handler

type GateHttp

type GateHttp struct {
	FrontAction func(h http.Handler) http.Handler //FrontActionFunc

	Registry registry.Registry
	// contains filtered or unexported fields
}

func (*GateHttp) AddRoute

func (this *GateHttp) AddRoute(route Route)

func (*GateHttp) BeforeAction

func (this *GateHttp) BeforeAction(h http.Handler) http.Handler

func (*GateHttp) Close

func (this *GateHttp) Close()

func (*GateHttp) GetOpts

func (this *GateHttp) GetOpts() *conf.Config

func (*GateHttp) GetRoutes

func (this *GateHttp) GetRoutes() []Route

func (*GateHttp) Init

func (this *GateHttp) Init()

func (*GateHttp) RestFulServeHTTP

func (this *GateHttp) RestFulServeHTTP(inner http.Handler) http.Handler

func (this *GateHttp) RestFulServeHTTP(inner http.Handler, name string) http.Handler {

func (*GateHttp) Run

func (this *GateHttp) Run() error

func (*GateHttp) SetOpts

func (this *GateHttp) SetOpts(o *conf.Config)

type Route

type Route struct {
	//Route   string
	//Method  string
	Method      []string
	Pattern     string
	HandlerFunc http.HandlerFunc //func(http.ResponseWriter, *http.Request)
	Desc        string
}

Jump to

Keyboard shortcuts

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