middleware

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: AGPL-3.0 Imports: 44 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Customer   = sessdata.Customer
	AgentLevel = sessdata.AgentLevel
	URLFor     = sessdata.URLFor
)
View Source
var DefaultRenderDataWrapper = func(ctx echo.Context, data interface{}) interface{} {
	return NewRenderData(ctx, data)
}
View Source
var Middlewares []interface{}
View Source
var TmplFuncGenerator = mwutils.TmplFuncGenerators{}

Functions

func AuthCheck

func AuthCheck(h echo.Handler) echo.HandlerFunc

func FuncMap

func FuncMap() echo.MiddlewareFunc

func HostChecker added in v0.1.0

func HostChecker() echo.MiddlewareFuncd

func IPFilter

func IPFilter() echo.MiddlewareFuncd

func JWT

func JWT(skippers ...func(echo.Context) bool) echo.MiddlewareFuncd
func NavigateList(ctx echo.Context, m *dbschema.OfficialCommonNavigate, navType string, parentIDs ...uint) []*official.NavigateExt

func OnlyLocal

func OnlyLocal() echo.MiddlewareFuncd

func RateLimiter

func RateLimiter() echo.MiddlewareFunc

func SessionInfo

func SessionInfo(h echo.Handler) echo.HandlerFunc

func SetFunc

func SetFunc(ctx echo.Context) error

func SetTheme

func SetTheme(theme string) echo.MiddlewareFuncd

SetTheme 设置主题

func SkipCurrentURLPermCheck

func SkipCurrentURLPermCheck(h echo.Handler) echo.HandlerFunc

func TrimPathSuffix

func TrimPathSuffix(ignorePrefixes ...string) echo.MiddlewareFuncd

func Use

func Use(m ...interface{})

func UseTheme

func UseTheme(fn func(echo.Context) *xtemplate.ThemeInfo) echo.MiddlewareFuncd

UseTheme 使用系统设置的主题

Types

type RenderData

type RenderData struct {
	*echo.RenderData
	// contains filtered or unexported fields
}

func NewRenderData

func NewRenderData(ctx echo.Context, data interface{}) *RenderData

func (*RenderData) CaptchaForm

func (r *RenderData) CaptchaForm(args ...interface{}) template.HTML

func (*RenderData) CategoryList

func (r *RenderData) CategoryList(limit int, ctype ...string) []*dbschema.OfficialCommonCategory

func (*RenderData) Customer

func (r *RenderData) Customer() *dbschema.OfficialCustomer

func (*RenderData) CustomerDetail

func (r *RenderData) CustomerDetail() *modelCustomer.CustomerAndGroup

func (*RenderData) CustomerNav

func (r *RenderData) CustomerNav(parentIDs ...uint) []*official.NavigateExt
func (r *RenderData) Friendlink(limit int, categoryIds ...uint) []*dbschema.OfficialCommonFriendlink

func (*RenderData) FrontendNav

func (r *RenderData) FrontendNav(parentIDs ...uint) []*official.NavigateExt

func (*RenderData) SQLQuery

func (r *RenderData) SQLQuery() *common.SQLQuery

func (*RenderData) SQLQueryLimit

func (r *RenderData) SQLQueryLimit(offset int, limit int, linkID ...int) *common.SQLQuery

func (*RenderData) SubCategoryList

func (r *RenderData) SubCategoryList(parentId int, limit int, ctype ...string) []*dbschema.OfficialCommonCategory

func (*RenderData) TagList

func (r *RenderData) TagList(group ...string) []*dbschema.OfficialCommonTags

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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