Documentation
¶
Index ¶
- func RunCore(ip string, port int, path string, opt ...config.Opt) error
- type Context
- type Engine
- func (e *Engine) CheckLevel() gin.HandlerFunc
- func (e *Engine) CheckLogin() gin.HandlerFunc
- func (e *Engine) InterceptICO() gin.HandlerFunc
- func (e *Engine) PrintInfo(opt ...config.PrintOpt) *Engine
- func (e *Engine) Run(ports ...int) error
- func (e *Engine) SetConfig(ip string, port int, path string, opt ...config.Opt) *Engine
- func (e *Engine) SetMiddleware() *Engine
- func (e *Engine) SetRoute() *Engine
- type Mode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Engine ¶
func (*Engine) CheckLevel ¶
func (e *Engine) CheckLevel() gin.HandlerFunc
CheckLevel 负责检查当前访问层级是否超出设定最大层级 例如:
共享目录为 /a/b/ , 最大层级为 2 ✓: /a/b/ 根目录 ✓: /a/b/file 根目录下文件 ✓: /a/b/c/ 根目录下第一层目录 ✓: /a/b/c/file 根目录下第一层目录下的文件 ✓: /a/b/c/d/ 根目录下第二层目录 ✓: /a/b/c/d/file 根目录下第二层目录下的文件 x: /a/b/c/d/e/ 根目录下第三层目录 x: /a/b/c/d/e/file 根目录下第三层目录下的文件
func (*Engine) CheckLogin ¶
func (e *Engine) CheckLogin() gin.HandlerFunc
func (*Engine) InterceptICO ¶
func (e *Engine) InterceptICO() gin.HandlerFunc
InterceptICO 拦截浏览器默认请求 favicon.ico 的行为
func (*Engine) SetMiddleware ¶
Click to show internal directories.
Click to hide internal directories.