Skip to content

Releases: devfeel/dotweb

增强ServerFile,增强Router

26 Mar 11:52

Choose a tag to compare

  • 增强静态文件处理,增加设置目录浏览开关,通过Router.ServerFile使用
  • Router增加Any路由方式,如果设置为Any,则自动匹配:GET\HEAD\POST\PUT\PATCH\OPTIONS\DELETE
  • ServerConfig增加EnabledListDir选项,仅对Router.ServerFile有效,若设置该项,则可以浏览目录文件,默认不开启
  • ServerConfig增加EnabledAutoHEAD选项,如果设置该选项,则会为除Websocket\HEAD外所有路由方式默认添加HEAD路由,默认不开启
  • 优化部分代码,增加example\static、example\router
  • 2017-03-26 19:30

新增模板渲染,HttpContext增加ViewData

26 Mar 03:24

Choose a tag to compare

  • 新增模板渲染支持,新增Renderer接口,需实现Render(io.Writer, string, interface{}, *HttpContext) error
  • 支持接入第三方模板引擎,默认使用http/template内建引擎
  • HttpContext增加ViewData,用于向模板传递值
  • HttpContext增加View()方法,传入模板文件名,用于简化模板使用:View(name string) error
  • 增加example\render
  • 2017-03-26 11:10

新增Cache模块,增强ItemContext

25 Mar 15:12

Choose a tag to compare

  • 新增Cache模块,支持runtime、redis,常规支持Get\Set\GetString\GetInt\GetInt64\Incr\Decr\Exists\Clear操作
  • Cache通过app.SetCache启用,通过HttpContext.Cache()使用
  • ItemContext增加Remove、Once接口,影响HttpContext.AppContext、HttpContext.Items
  • 增加example\cache,优化部分代码
  • 2017-03-25 22:30

新增Server接口、Router接口

24 Mar 09:28

Choose a tag to compare

  • App、Server、Session配置代码梳理优化
  • 新增Server接口,新增OfflineServer实现
  • 新增Router接口,将原HttpServer路由操作转移至HttpServer.Router()
  • 2017-03-24 14:00

Config支持,Offline支持

24 Mar 09:27

Choose a tag to compare

  • 新增Config支持, 支持Server、Session、Router三类配置
  • 新增HttpServer.RegisterHandler、HttpServer.GetHandler用于注册HttpHandle
  • 新增Offline配置,可设置Offline欢迎语或者默认跳转维护页
  • 新增example\config

新增AppContext & UploadFile支持

21 Mar 08:09

Choose a tag to compare

  • 新增AppContext支持 - 进程内共享容器,通过HttpContext.AppContext.Get\Set操作
  • 新增文件上传支持, 新增HttpContext.FormFile("key"),返回*UploadFile
  • 新增example\appcontext & example\uploadfile
  • 2017-03-21 15:00

新增Bind支持

17 Mar 13:48

Choose a tag to compare

新增Bind支持 - HttpContext.Bind(interface{}) 支持json、xml、Form数据

新增Session实现

17 Mar 13:41

Choose a tag to compare

新增Session模块实现 - runtime\redis 两种模式

支持RegisterRoute,增加example目录

17 Mar 13:40

Choose a tag to compare

新增HttpServer.RegisterRoute函数,新增example目录

新增Hijack支持

17 Mar 13:40

Choose a tag to compare

新增Hijack支持