Path Synopsis
cache Package cache provide a Cache interface and some implement engine Usage: import( "" ) bm, err := cache.NewCache("memory", `{"interval":60}`) Use it like this: bm.Put("astaxie", 1, 10 * time.Second) bm.Get("astaxie") bm.IsExis
config Package config is used to parse config.
context Package context provide the context utils Usage: import "" ctx := context.Context{Request:req,ResponseWriter:rw} more docs
grace Package grace use to hot reload Description: Usage: import( "log" "net/http" "os" "" ) func handler(w http.ResponseWriter, r *http.Request) { w.Write([]byte("WORLD
httplib Package httplib is used as http.Client Usage: import "" b := httplib.Post("") b.Param("username","astaxie") b.Param("password","123456") b.PostFile("uploadfile1", "httplib.pdf") b.PostFile("uploadfile2", "ht
logs Package logs provide a general log interface Usage: import "" log := NewLogger(10000) log.SetLogger("console", "") > the first params stand for how many channel Use it like this: log.Trace("trace") log.Info("info") log.Warn("w
migration Package migration enables you to generate migrations back and forth.
orm Package orm provide ORM for MySQL/PostgreSQL/sqlite Simple Usage package main import ( "fmt" "" _ "" // import your used driver ) // Model Struct type User struct { Id int `orm:"auto"` Name string
session Package session provider Usage: import( "" ) func init() { globalSessions, _ = session.NewManager("memory", `{"cookieName":"gosessionid", "enableSetCookie,omitempty": true, "gclifetime":3600, "maxLifetime": 3600, "secure":
swagger Package swagger struct definition
toolbox Package toolbox healthcheck type DatabaseCheck struct { } func (dc *DatabaseCheck) Check() error { if dc.isConnected() { return nil } else { return errors.New("can't connect database") } } AddHealthCheck("database",&DatabaseCheck{}) more docs: http://beeg
validation Package validation for validations import ( "" "log" ) type User struct { Name string Age int } func main() { u := User{"man", 40} valid := validation.Validation{} valid.Required(u.Name, "name") valid.MaxSize(u.Name, 15,

Package beego imports 41 packages, and is imported by 3650 packages. This documentation is generated 1 week ago. Refresh