Skip to content

Releases: devfeel/dotweb

BUG Fixed: 修复Middleware特定场景下无效问题

26 Jan 06:26
3cf5444

Choose a tag to compare

Version 1.4.7

  • BUG Fixed: 修复Middleware特定场景下无效问题
  • 新增dotweb.IncludeDotwebGroup,用于自动集成dotweb相关路由
  • /dotweb/state 增加 ServerVersion输出
  • 2018-01-22 22:00

BUG Fixed:UploadFile废弃Bytes接口,新增ReadBytes接口

22 Jan 13:47
73a14f5

Choose a tag to compare

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接口

22 Jan 13:46
73a14f5

Choose a tag to compare

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输出

10 Jan 01:36
7ec5535

Choose a tag to compare

Version 1.4.4

  • 调整Bind模块内部获取req.Body为HttpContext.PostBody,避免因为Bind后无法再次获取Post内容
  • 完善debug log 输出
  • 更新example/static, 该示例目前为实现一个纯静态文件服务器功能
  • 2018-01-08 12:00

修复BUG,优化代码

07 Jan 14:14
34f6a50

Choose a tag to compare

Version 1.4.3

  • 调整dotweb内部路由注册逻辑,New模式默认不开启,Classic模式默认开启,可通过app.UseDotwebRouter手动开启
  • 修复 issue #100, 解决特定场景下Exclude不生效问题
  • Use filepath.Ext to replace file.GetFileExt, update for issue #99
  • 移除 framework/file.GetFileExt 函数
  • 同步更新example代码
  • 2018-01-07 22:00

完善HttpContext,提升易用性

03 Jan 14:08
129df76

Choose a tag to compare

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实现

03 Jan 14:08
129df76

Choose a tag to compare

  • 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部分文字描述

29 Dec 10:08
d4e05e6

Choose a tag to compare

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标签

30 Nov 10:35
650e68d

Choose a tag to compare

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的操作支持

23 Nov 01:25
eb7c72e

Choose a tag to compare

Version 1.3.8

  • 完善redisutil,增加对hset、set的操作支持
  • 感谢 @chacha923 的pr
  • 2017-11-23 00:00