Documentation
¶
Overview ¶
*
- @Author: DollarKiller
- @Description: 基础中间件
- @Github: https://github.com/dollarkillerx
- @Date: Create in 10:55 2019-09-30
*
- @Author: DollarKiller
- @Description: 参数绑定
- @Github: https://github.com/dollarkillerx
- @Date: Create in 23:48 2019-09-29
*
- @Author: DollarKiller
- @Description: 包装上文
- @Github: https://github.com/dollarkillerx
- @Date: Create in 15:00 2019-09-29
*
- @Author: DollarKiller
- @Description: session or cookie
- @Github: https://github.com/dollarkillerx
- @Date: Create in 14:16 2019-10-12
*
- @Author: DollarKiller
- @Description: 默认的funcMap
- @Github: https://github.com/dollarkillerx
- @Date: Create in 11:15 2019-10-30
*
- @Author: DollarKiller
- @Description: 一些自定义
- @Github: https://github.com/dollarkillerx
- @Date: Create in 21:59 2019-10-26
*
- @Author: DollarKiller
- @Description: 引擎
- @Github: https://github.com/dollarkillerx
- @Date: Create in 15:01 2019-09-29
*
- @Author: DollarKiller
- @Description: view
- @Github: https://github.com/dollarkillerx
- @Date: Create in 10:01 2019-10-21
*
- @Author: DollarKiller
- @Description: 初始二锅头
- @Github: https://github.com/dollarkillerx
- @Date: Create in 23:36 2019-09-29
*
- @Author: DollarKiller
- @Description:
- @Github: https://github.com/dollarkillerx
- @Date: Create in 23:20 2019-09-29
*
- @Author: DollarKiller
- @Description: options 插件设计模式 做设计
- @Github: https://github.com/dollarkillerx
- @Date: Create in 15:08 2019-09-29
*
- @Author: DollarKiller
- @Description: 对象池
- @Github: https://github.com/dollarkillerx
- @Date: Create in 22:02 2019-10-02
*
- @Author: DollarKiller
- @Description:
- @Github: https://github.com/dollarkillerx
- @Date: Create in 16:04 2019-09-29
*
- @Author: DollarKiller
- @Description: url 做反向解析
- @Github: https://github.com/dollarkillerx
- @Date: Create in 11:01 2019-10-30
*
- @Author: DollarKiller
- @Description: 工具库
- @Github: https://github.com/dollarkillerx
- @Date: Create in 18:08 2019-09-29
Index ¶
- Variables
- func HttpSplice(h1, h2 string) string
- func Local(language string) func(ctx *Context)
- func Logger(ctx *Context)
- type Context
- func (c *Context) BindFrom(obj interface{}) error
- func (c *Context) BindGet(obj interface{}) error
- func (c *Context) BindJson(obj interface{}) error
- func (c *Context) BindValue(obj interface{}) error
- func (c *Context) Body() []byte
- func (c *Context) Data(key string, data interface{})
- func (c *Context) FormFile(file string) (*multipart.FileHeader, error)
- func (c *Context) GetCookie(key string) string
- func (c *Context) GetVal(key string) []byte
- func (c *Context) HTML(code int, tplName string) error
- func (c *Context) Header(key string) string
- func (c *Context) Json(code int, msg interface{}) (int, error)
- func (c *Context) Next()
- func (c *Context) PathValue(val string) (interface{}, bool)
- func (c *Context) PathValueInt(val string) (int, bool)
- func (c *Context) PathValueString(val string) (string, bool)
- func (c *Context) PostVal(key string) []byte
- func (c *Context) Redirect(code int, location string)
- func (c *Context) SeedFile(path string)
- func (c *Context) SeedFileByte(file []byte)
- func (c *Context) SetCookie(key string, val string)
- func (c *Context) SetCookieTime(key, val string, ti time.Duration)
- func (c *Context) String(code int, msg string) (int, error)
- func (c *Context) Write(code int, msg []byte) (int, error)
- type Engine
- type H
- type HandlerFunc
- type HandlersChain
- type HtmlTemplate
- type ObjPool
- type Option
- type Options
- type PoolGenerateItem
- type RouterGroup
- func (r *RouterGroup) Delete(relativePath string, handlers ...HandlerFunc) *urlp
- func (r *RouterGroup) Get(relativePath string, handlers ...HandlerFunc) *urlp
- func (r *RouterGroup) Group(relativePath string, handlers ...HandlerFunc) *RouterGroup
- func (r *RouterGroup) Head(relativePath string, handlers ...HandlerFunc) *urlp
- func (r *RouterGroup) Options(relativePath string, handlers ...HandlerFunc) *urlp
- func (r *RouterGroup) Patch(relativePath string, handlers ...HandlerFunc) *urlp
- func (r *RouterGroup) Post(relativePath string, handlers ...HandlerFunc) *urlp
- func (r *RouterGroup) Put(relativePath string, handlers ...HandlerFunc) *urlp
- func (r *RouterGroup) Use(middleware ...HandlerFunc)
- type Utils
Constants ¶
This section is empty.
Variables ¶
View Source
var Jsonp = jsoniter.ConfigCompatibleWithStandardLibrary
Functions ¶
func HttpSplice ¶
Types ¶
type Context ¶
type Context struct { Ctx *fasthttp.RequestCtx // ctx // contains filtered or unexported fields }
func (*Context) FormFile ¶
func (c *Context) FormFile(file string) (*multipart.FileHeader, error)
接受文件
func (*Context) PathValueString ¶
获取参数path string
func (*Context) SetCookieTime ¶ added in v0.0.17
type Engine ¶
type Engine struct { Option Options RouterGroup Html *HtmlTemplate // contains filtered or unexported fields }
func (*Engine) LoadHTMLGlob ¶ added in v0.0.21
注册模板 ("templates/**/*"),funcMap // 这里的设计思路貌似错误了 不是一开始就激活 而是 view html才激活这里 写入html
func (*Engine) SetFuncMap ¶ added in v0.0.21
type HtmlTemplate ¶ added in v0.0.21
type HtmlTemplate struct { FuncMap template.FuncMap // func map Path string // path 路径 HtmlPool *ObjPool // 对象池 HtmlTemporary *sync.Pool // 临时对象池 // contains filtered or unexported fields }
func NewHtmlTemplate ¶ added in v0.0.21
func NewHtmlTemplate(path string) *HtmlTemplate
func (*HtmlTemplate) LoadHTMLDebug ¶ added in v0.0.21
func (e *HtmlTemplate) LoadHTMLDebug() *template.Template
开发默认html热加载
func (*HtmlTemplate) SetDelims ¶ added in v0.0.21
func (h *HtmlTemplate) SetDelims(left, right string)
func (*HtmlTemplate) SetFuncMap ¶ added in v0.0.21
func (h *HtmlTemplate) SetFuncMap(funcMap template.FuncMap)
type ObjPool ¶ added in v0.0.9
type ObjPool struct {
// contains filtered or unexported fields
}
对象池
type PoolGenerateItem ¶ added in v0.0.3
type PoolGenerateItem func() interface{}
type RouterGroup ¶
type RouterGroup struct { Handlers HandlersChain // contains filtered or unexported fields }
内部路由器
func (*RouterGroup) Delete ¶
func (r *RouterGroup) Delete(relativePath string, handlers ...HandlerFunc) *urlp
func (*RouterGroup) Get ¶
func (r *RouterGroup) Get(relativePath string, handlers ...HandlerFunc) *urlp
func (*RouterGroup) Group ¶
func (r *RouterGroup) Group(relativePath string, handlers ...HandlerFunc) *RouterGroup
注册组路由
func (*RouterGroup) Head ¶
func (r *RouterGroup) Head(relativePath string, handlers ...HandlerFunc) *urlp
func (*RouterGroup) Options ¶
func (r *RouterGroup) Options(relativePath string, handlers ...HandlerFunc) *urlp
func (*RouterGroup) Patch ¶
func (r *RouterGroup) Patch(relativePath string, handlers ...HandlerFunc) *urlp
func (*RouterGroup) Post ¶
func (r *RouterGroup) Post(relativePath string, handlers ...HandlerFunc) *urlp
func (*RouterGroup) Put ¶
func (r *RouterGroup) Put(relativePath string, handlers ...HandlerFunc) *urlp
type Utils ¶ added in v0.0.3
type Utils struct{}
func (*Utils) Sha256Encode ¶ added in v0.0.11
获取sha256
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
* * @Author: DollarKiller * @Description: 内部高速缓存 * @Github: https://github.com/dollarkillerx * @Date: Create in 13:56 2019-10-29
|
* * @Author: DollarKiller * @Description: 内部高速缓存 * @Github: https://github.com/dollarkillerx * @Date: Create in 13:56 2019-10-29 |
examples
|
|
band_test
* * @Author: DollarKiller * @Description: 参数绑定 * @Github: https://github.com/dollarkillerx * @Date: Create in 21:45 2019-10-26
|
* * @Author: DollarKiller * @Description: 参数绑定 * @Github: https://github.com/dollarkillerx * @Date: Create in 21:45 2019-10-26 |
cache
* * @Author: DollarKiller * @Description: 高速缓存 * @Github: https://github.com/dollarkillerx * @Date: Create in 08:52 2019-10-30
|
* * @Author: DollarKiller * @Description: 高速缓存 * @Github: https://github.com/dollarkillerx * @Date: Create in 08:52 2019-10-30 |
cookie
* * @Author: DollarKiller * @Description: * @Github: https://github.com/dollarkillerx * @Date: Create in 14:35 2019-10-12
|
* * @Author: DollarKiller * @Description: * @Github: https://github.com/dollarkillerx * @Date: Create in 14:35 2019-10-12 |
get_parameter
* * @Author: DollarKiller * @Description: 获取git参数 * @Github: https://github.com/dollarkillerx * @Date: Create in 11:10 2019-09-30
|
* * @Author: DollarKiller * @Description: 获取git参数 * @Github: https://github.com/dollarkillerx * @Date: Create in 11:10 2019-09-30 |
group_router
* * @Author: DollarKiller * @Description: 路由分组 * @Github: https://github.com/dollarkillerx * @Date: Create in 11:25 2019-09-30
|
* * @Author: DollarKiller * @Description: 路由分组 * @Github: https://github.com/dollarkillerx * @Date: Create in 11:25 2019-09-30 |
html
* * @Author: DollarKiller * @Description: 渲染html * @Github: https://github.com/dollarkillerx * @Date: Create in 19:58 2019-10-02
|
* * @Author: DollarKiller * @Description: 渲染html * @Github: https://github.com/dollarkillerx * @Date: Create in 19:58 2019-10-02 |
json
* * @Author: DollarKiller * @Description: json test * @Github: https://github.com/dollarkillerx * @Date: Create in 19:07 2019-10-05
|
* * @Author: DollarKiller * @Description: json test * @Github: https://github.com/dollarkillerx * @Date: Create in 19:07 2019-10-05 |
locat_test
* * @Author: DollarKiller * @Description: 本地化测试 * @Github: https://github.com/dollarkillerx * @Date: Create in 15:05 2019-10-14
|
* * @Author: DollarKiller * @Description: 本地化测试 * @Github: https://github.com/dollarkillerx * @Date: Create in 15:05 2019-10-14 |
path_parameter
* * @Author: DollarKiller * @Description: 路径中参数 * @Github: https://github.com/dollarkillerx * @Date: Create in 11:06 2019-09-30
|
* * @Author: DollarKiller * @Description: 路径中参数 * @Github: https://github.com/dollarkillerx * @Date: Create in 11:06 2019-09-30 |
post_parameter
* * @Author: DollarKiller * @Description: 获取post参数 * @Github: https://github.com/dollarkillerx * @Date: Create in 11:13 2019-09-30
|
* * @Author: DollarKiller * @Description: 获取post参数 * @Github: https://github.com/dollarkillerx * @Date: Create in 11:13 2019-09-30 |
restful_api
* * @Author: DollarKiller * @Description:restful api * @Github: https://github.com/dollarkillerx * @Date: Create in 11:02 2019-09-30
|
* * @Author: DollarKiller * @Description:restful api * @Github: https://github.com/dollarkillerx * @Date: Create in 11:02 2019-09-30 |
return
* * @Author: DollarKiller * @Description: * @Github: https://github.com/dollarkillerx * @Date: Create in 21:57 2019-10-26
|
* * @Author: DollarKiller * @Description: * @Github: https://github.com/dollarkillerx * @Date: Create in 21:57 2019-10-26 |
simple_demo
* * @Author: DollarKiller * @Description: 快速入门教程 * @Github: https://github.com/dollarkillerx * @Date: Create in 10:49 2019-09-30
|
* * @Author: DollarKiller * @Description: 快速入门教程 * @Github: https://github.com/dollarkillerx * @Date: Create in 10:49 2019-09-30 |
token
* * @Author: DollarKiller * @Description: token * @Github: https://github.com/dollarkillerx * @Date: Create in 09:01 2019-10-30
|
* * @Author: DollarKiller * @Description: token * @Github: https://github.com/dollarkillerx * @Date: Create in 09:01 2019-10-30 |
uploda_file
* * @Author: DollarKiller * @Description: upload file * @Github: https://github.com/dollarkillerx * @Date: Create in 11:18 2019-09-30
|
* * @Author: DollarKiller * @Description: upload file * @Github: https://github.com/dollarkillerx * @Date: Create in 11:18 2019-09-30 |
urlpath
* * @Author: DollarKiller * @Description: urlpath 反向解析 * @Github: https://github.com/dollarkillerx * @Date: Create in 13:00 2019-10-30
|
* * @Author: DollarKiller * @Description: urlpath 反向解析 * @Github: https://github.com/dollarkillerx * @Date: Create in 13:00 2019-10-30 |
validate
* * @Author: DollarKiller * @Description: validate * @Github: https://github.com/dollarkillerx * @Date: Create in 10:53 2019-10-30
|
* * @Author: DollarKiller * @Description: validate * @Github: https://github.com/dollarkillerx * @Date: Create in 10:53 2019-10-30 |
Code generated by go run bytesconv_table_gen.go; DO NOT EDIT.
|
Code generated by go run bytesconv_table_gen.go; DO NOT EDIT. |
expvarhandler
Package expvarhandler provides fasthttp-compatible request handler serving expvars.
|
Package expvarhandler provides fasthttp-compatible request handler serving expvars. |
fasthttpadaptor
Package fasthttpadaptor provides helper functions for converting net/http request handlers to fasthttp request handlers.
|
Package fasthttpadaptor provides helper functions for converting net/http request handlers to fasthttp request handlers. |
fasthttputil
Package fasthttputil provides utility functions for fasthttp.
|
Package fasthttputil provides utility functions for fasthttp. |
reuseport
Package reuseport provides TCP net.Listener with SO_REUSEPORT support.
|
Package reuseport provides TCP net.Listener with SO_REUSEPORT support. |
stackless
Package stackless provides functionality that may save stack space for high number of concurrently running goroutines.
|
Package stackless provides functionality that may save stack space for high number of concurrently running goroutines. |
* * @Author: DollarKiller * @Description: local 本地化 * @Github: https://github.com/dollarkillerx * @Date: Create in 14:45 2019-10-14
|
* * @Author: DollarKiller * @Description: local 本地化 * @Github: https://github.com/dollarkillerx * @Date: Create in 14:45 2019-10-14 |
* * @Author: DollarKiller * @Description: * @Github: https://github.com/dollarkillerx * @Date: Create in 18:48 2019-10-13 * * @Author: DollarKiller * @Description: * @Github: https://github.com/dollarkillerx * @Date: Create in 18:57 2019-10-13
|
* * @Author: DollarKiller * @Description: * @Github: https://github.com/dollarkillerx * @Date: Create in 18:48 2019-10-13 * * @Author: DollarKiller * @Description: * @Github: https://github.com/dollarkillerx * @Date: Create in 18:57 2019-10-13 |
test
|
|
validate
* * @Author: DollarKiller * @Description: validate test * @Github: https://github.com/dollarkillerx * @Date: Create in 10:37 2019-10-30
|
* * @Author: DollarKiller * @Description: validate test * @Github: https://github.com/dollarkillerx * @Date: Create in 10:37 2019-10-30 |
* * @Author: DollarKiller * @Description: * @Github: https://github.com/dollarkillerx * @Date: Create in 14:08 2019-10-29
|
* * @Author: DollarKiller * @Description: * @Github: https://github.com/dollarkillerx * @Date: Create in 14:08 2019-10-29 |
* * @Author: DollarKiller * @Description: str 压缩 * @Github: https://github.com/dollarkillerx * @Date: Create in 14:30 2019-10-29 * * @Author: DollarKiller * @Description: 加密 * @Github: https://github.com/dollarkillerx * @Date: Create in 14:19 2019-10-29 * * @Author: DollarKiller * @Description: 随机 * @Github: https://github.com/dollarkillerx * @Date: Create in 14:24 2019-10-29
|
* * @Author: DollarKiller * @Description: str 压缩 * @Github: https://github.com/dollarkillerx * @Date: Create in 14:30 2019-10-29 * * @Author: DollarKiller * @Description: 加密 * @Github: https://github.com/dollarkillerx * @Date: Create in 14:19 2019-10-29 * * @Author: DollarKiller * @Description: 随机 * @Github: https://github.com/dollarkillerx * @Date: Create in 14:24 2019-10-29 |
Click to show internal directories.
Click to hide internal directories.