Releases: devfeel/dotweb
Releases · devfeel/dotweb
BUG Fixed: 修复Middleware特定场景下无效问题
Version 1.4.7
- BUG Fixed: 修复Middleware特定场景下无效问题
- 新增dotweb.IncludeDotwebGroup,用于自动集成dotweb相关路由
- /dotweb/state 增加 ServerVersion输出
- 2018-01-22 22:00
BUG Fixed:UploadFile废弃Bytes接口,新增ReadBytes接口
Version 1.4.6
- BUG Fixed: UploadFile废弃Bytes接口,新增ReadBytes接口,用于返回上传文件本身
- 需要特别注意,由于io.read具有一次性特性,UploadFile.SaveFile与UploadFile.ReadBytes只能使用其中一个,另外一个将无法正常获取数据
- 增加dotweb.Version,用于输出框架版本号
- 2018-01-21 09:00
新增yaml配置文件,UploadFile新增Bytes接口
Version 1.4.5
- 新增yaml格式配置文件支持,具体参考 example/config/dotweb.yaml
- config新增UnmarshalYaml\MarshalYaml\MarshalYamlString,提供针对Yaml的常规处理
- config新增UnmarshalXML\MarshalXML\MarshalXMLString,提供针对Xml的常规处理
- config新增UnmarshalJSON\MarshalJSON\MarshalJSONString,提供针对Json的常规处理
- UploadFile新增Bytes接口,用于返回上传文件本身
- 完善 example/config
- 移除 example/session,查看更多示例,请移步https://github.com/devfeel/dotweb-example
- 2018-01-20 23:40
完善Bind,完善log输出
Version 1.4.4
- 调整Bind模块内部获取req.Body为HttpContext.PostBody,避免因为Bind后无法再次获取Post内容
- 完善debug log 输出
- 更新example/static, 该示例目前为实现一个纯静态文件服务器功能
- 2018-01-08 12:00
修复BUG,优化代码
完善HttpContext,提升易用性
Version 1.4.2
- Context新增QueryInt\QueryInt64接口,用于简化获取Int类型的Get参数,如果参数未传入或不是合法整形,返回0
- Context接口调整:除Write外,其他WriteXXX接口,返回值从(int, error)调整为error
- 带来的变化:
app.HttpServer.GET("/index", func(ctx dotweb.Context) error{
_, err := ctx.WriteString("welcome to my first web!")
return err
})
简化为
app.HttpServer.GET("/index", func(ctx dotweb.Context) error{
return ctx.WriteString("welcome to my first web!")
})
- 同步更新example代码
- 2018-01-03 22:00
新增ExcludeUse接口,重构Middleware实现
- dotweb新增ExcludeUse接口,用于设置指定排除路由的中间件,fixed for #94 建议增加exuse方法用来实现exclude uri功能
- 调整dotweb部分内部函数名称
- 重构Middleware实现,优化代码结构,使流程更清晰
- Node新增AppMiddlewares与GroupMiddlewares,用于存储App级、Group级的中间件实例
- Middleware新增Exclude相关接口
- Exclude(routers ...string)函数,用于指定不生效的路由
- HasExclude() bool函数,用于判定当前中间件实例是否存在排除路由
- ExistsExcludeRouter(router string) bool函数,用于判定当前中间件实例的排除路由中是否存在指定路由
- middleware执行优先级:
- 优先级1:app级别middleware
- 优先级2:group级别middleware
- 优先级:router级别middleware
- 更新example/middleware
- 2018-01-01 23:00:00
强化Bind能力,新增PostValues接口,更正Readme部分文字描述
Version 1.4.0
- 强化Bind能力,添加BindJsonBody接口,不对Content-Type进行判定,直接获取req.Body进行json序列化
- 基础Bind机制:
1)如果识别到Content-Type = application/json 会尝试使用json序列化到struct
2)如果识别到Content-Type = application/xml 会尝试使用xml序列化到struct
3)非以上类型,会默认识别form的key/value模式匹配 - Context.Request()新增PostValues接口,包含 POST, PATCH, or PUT请求集合,以map[string][]string返回
- 更正Readme部分文字描述
- 完善example/bind
- 2017-12-29 16:00:00
Request新增FormFiles接口,bind支持json标签
Version 1.3.9
- Request新增FormFiles接口,用于支持多文件上传
- fixed #92 支持多文件同时上传
- Server支持SetEnabledBindUseJsonTag接口,用于设置bind是否启用json标签,默认为false
- fixed #91 GET方式请求,根据传参执行bind方法,字段tag目前只支持form,可以考虑兼容json标签
- 感谢 @githubityu
- 完善 example/bind
- 2017-11-30 17:00:00
完善redisutil,增加对hset、set的操作支持
Version 1.3.8
- 完善redisutil,增加对hset、set的操作支持
- 感谢 @chacha923 的pr
- 2017-11-23 00:00