routers

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package routers 各类路由包的定义处

Index

Constants

This section is empty.

Variables

View Source
var Routers = make([]*Router, 0, 10)

Routers 所有的路由

Functions

This section is empty.

Types

type Load

type Load func(apis []*apis.API) ServeFunc

Load 加载路由的函数

type Router

type Router struct {
	Name string // 路由的名称,建议使用 owner-repo 的形式命名。
	URL  string
	Load Load
}

Router 路由的相关信息

type ServeFunc

type ServeFunc func(*apis.API) string

ServeFunc 传入一个 api,返回处理之后的内容。

Jump to

Keyboard shortcuts

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