Categorygithub.com/go-xweb/xweb
modulepackage
0.2.1
Repository: https://github.com/go-xweb/xweb.git
Documentation: pkg.go.dev

# README

xweb

xweb是一个强大的Go语言web框架。

English

Build Status Go Walker Bitdeli Badge

技术支持

QQ群:369240307

更新日志

  • v0.2.1 : 自动Binding新增对jquery对象,map和array的支持。
  • v0.2 : 新增 validation 子包,从 https://github.com/astaxie/beego/tree/master/validation 拷贝过来。
  • v0.1.2 : 采用 github.com/go-xweb/httpsession 作为session组件,API保持兼容;Action现在必须从*Action继承,这个改变与以前的版本不兼容,必须更改代码;新增两个模板函数{{session "key"}} 和 {{cookie "key"}};Action新增函数MapForm
  • v0.1.1 : App新增AutoAction方法;Action新增AddTmplVar方法;Render方法的模版渲染方法中可以通过T混合传入函数和变量,更新了快速入门
  • v0.1.0 : 初始版本

特性

  • 在一个可执行程序中多Server(http,tls,scgi,fcgi),多App的支持
  • 简单好用的路由映射方式
  • 静态文件及版本支持,并支持自动加载,默认开启
  • 改进的模版支持,并支持自动加载,动态新增模板函数
  • session支持
  • validation支持

安装

在安装之前确认你已经安装了Go语言. Go语言安装请访问 install instructions.

安装 xweb:

go get github.com/go-xweb/xweb

Examples

请访问 examples folder

案例

文档

快速入门

源码文档请访问 GoWalker

License

BSD License http://creativecommons.org/licenses/BSD/

# Packages

No description provided by the author
No description provided by the author

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Close stops the main server.
CloseZWriter closes the io.Writer after compressing static file.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
format bytes number friendly.
short string format.
GetAcceptEncodingZip returns accept encoding format in http header.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewCookie is a helper method that returns a new http.Cookie object.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
OpenMemZipFile returns MemFile object with a compressed static file.
No description provided by the author
print gc information to io.Writer.
Process invokes the main server's routing system.
No description provided by the author
Run starts the web application and serves HTTP requests for the main server.
RunFcgi starts the web application and serves FastCGI requests for the main server.
RunScgi starts the web application and serves SCGI requests for the main server.
RunTLS starts the web application and serves HTTPS requests for the main server.
No description provided by the author
SetLogger sets the logger for the main server.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Slug is a helper function that returns the URL slug for string s.
user[name][test].
start cpu profile monitor.
stop cpu profile monitor.
No description provided by the author
the func is the same as condition ? true : false.
No description provided by the author
No description provided by the author
Urlencode is a helper method that converts a map into URL-encoded form data.
Usage:UrlFor("main:root:/user/login") or UrlFor("root:/user/login") or UrlFor("/user/login") or UrlFor().
No description provided by the author

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

Config is the configuration of the main server.
No description provided by the author
No description provided by the author
[SWH|+].
No description provided by the author

# Structs

No description provided by the author
An Action object or it's substruct is created for every incoming HTTP request.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MemFile contains MemFileInfo and bytes offset when reading.
MemFileInfo contains a compressed file bytes and file information.
No description provided by the author
Server represents a xweb server.
ServerConfig is configuration for server objects.
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author
a struct implements this interface can be convert from request param to a struct.
a struct implements this interface can be convert from struct to template variable Not Implemented.

# Type aliases

No description provided by the author
No description provided by the author