Documentation
¶
Index ¶
- Variables
- func Abort(w http.ResponseWriter, code int, format string, args ...any)
- func Entrance(t *gotext.Locale, conf *config.Config, session *sessions.Manager) func(next http.Handler) http.Handler
- func MustInstall(t *gotext.Locale, app biz.AppRepo) func(next http.Handler) http.Handler
- func MustLogin(t *gotext.Locale, conf *config.Config, session *sessions.Manager, ...) func(next http.Handler) http.Handler
- func Recoverer(next http.Handler) http.Handler
- func Status(t *gotext.Locale) func(next http.Handler) http.Handler
- func Throttle(ipHeader string, tokens uint64, interval time.Duration) func(next http.Handler) http.Handler
- type Middlewares
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewMiddlewares)
Functions ¶
func Entrance ¶
func Entrance(t *gotext.Locale, conf *config.Config, session *sessions.Manager) func(next http.Handler) http.Handler
Entrance 确保通过正确的入口访问
func MustInstall ¶
MustInstall 确保已安装应用
func MustLogin ¶
func MustLogin(t *gotext.Locale, conf *config.Config, session *sessions.Manager, userToken biz.UserTokenRepo) func(next http.Handler) http.Handler
MustLogin 确保已登录
Types ¶
type Middlewares ¶
type Middlewares struct {
// contains filtered or unexported fields
}
func NewMiddlewares ¶
func NewMiddlewares(conf *config.Config, session *sessions.Manager, appRepo biz.AppRepo, userToken biz.UserTokenRepo) *Middlewares
Click to show internal directories.
Click to hide internal directories.