middleware

package
v0.0.0-...-1f40810 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GetUsersIds = reload.BuildValFnWithConfirm("usersIds", func(h *wp.Handle) (map[uint64]string, bool) {
	users, err := cache.GetAllUsername(h.C)
	if err != nil {
		return nil, false
	}
	return maps.Flip(users), true
}, 10)

Functions

func CommonMiddleware

func CommonMiddleware(h *wp.Handle)

func MixWithPlain

func MixWithPlain(h *wp.Handle)

func PushExplainRouteParam

func PushExplainRouteParam(explain ...Plain)

func SetExplainRouteParam

func SetExplainRouteParam(p []Plain)

func ShowPreComment

func ShowPreComment(h *wp.Handle)

Types

type Plain

type Plain struct {
	Action string
	Param  map[string]string
	Scene  string
	Fn     func(h *wp.Handle) bool
}

func GetExplainRouteParam

func GetExplainRouteParam() []Plain

Jump to

Keyboard shortcuts

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