router

package
v0.2.38 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Router

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

Router 路由

func HttpRouter

func HttpRouter() *Router

HttpRouter 获得路由

func (*Router) File

func (r *Router) File(filePath string, ctx *context.Context)

File 输出文件

func (*Router) HandleHttpRequest

func (r *Router) HandleHttpRequest(ctx *context.Context)

HandleHttpRequest 处理http请求

func (*Router) RegisterRouter

func (r *Router) RegisterRouter(method, relativePath string, handler context.HandlerFunc)

RegisterRouter 注册路由

func (*Router) Static

func (r *Router) Static(relativePath, root string)

Static 静态资源

func (*Router) StaticFS

func (r *Router) StaticFS(relativePath string, fs http.FileSystem)

StaticFS 静态资源

func (*Router) StaticFile

func (r *Router) StaticFile(relativePath, filePath string)

StaticFile 静态文件

type RouterInfo

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

RouterInfo 路由信息

Jump to

Keyboard shortcuts

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