Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Level1Router ¶
type Level1Router[Route comparable, Handle any] struct { // contains filtered or unexported fields }
Level1Router 支持一级分类的路由器
func NewLevel1Router ¶
func NewLevel1Router[Route comparable, Handle any]() *Level1Router[Route, Handle]
func (*Level1Router[Route, Handle]) Match ¶
func (slf *Level1Router[Route, Handle]) Match(route Route) Handle
func (*Level1Router[Route, Handle]) Route ¶
func (slf *Level1Router[Route, Handle]) Route(route Route, handleFunc Handle)
type Level2Router ¶
type Level2Router[Route comparable, Handle any] struct { // contains filtered or unexported fields }
Level2Router 支持二级分类的路由器
func NewLevel2Router ¶
func NewLevel2Router[Route comparable, Handle any]() *Level2Router[Route, Handle]
func (*Level2Router[Route, Handle]) Match ¶
func (slf *Level2Router[Route, Handle]) Match(topRoute Route, route Route) Handle
func (*Level2Router[Route, Handle]) Route ¶
func (slf *Level2Router[Route, Handle]) Route(topRoute Route, route Route, handleFunc Handle)
type Level3Router ¶
type Level3Router[Route comparable, Handle any] struct { // contains filtered or unexported fields }
Level3Router 支持三级分类的路由器
func NewLevel3Router ¶
func NewLevel3Router[Route comparable, Handle any]() *Level3Router[Route, Handle]
func (*Level3Router[Route, Handle]) Match ¶
func (slf *Level3Router[Route, Handle]) Match(topRoute Route, level2Route Route, route Route) Handle
func (*Level3Router[Route, Handle]) Route ¶
func (slf *Level3Router[Route, Handle]) Route(topRoute Route, level2Route Route, route Route, handleFunc Handle)
Click to show internal directories.
Click to hide internal directories.