Documentation ¶
There is no documentation for this package.
Directories ¶
Path | Synopsis |
---|---|
api
|
|
server/v1
Smart home This documentation describes APIs found under https://github.com/e154/smart-home BasePath: /api/v1 Version: 1.0.0 License: MIT https://raw.githubusercontent.com/e154/smart-home/master/LICENSE Contact: Alex Filippov <support@e154.ru> https://e154.github.io/smart-home/ Consumes: - application/json Produces: - application/json Security: - BasicAuth - ApiKeyAuth SecurityDefinitions: ApiKeyAuth: type: apiKey name: Authorization in: header BasicAuth: type: basic swagger:meta
|
Smart home This documentation describes APIs found under https://github.com/e154/smart-home BasePath: /api/v1 Version: 1.0.0 License: MIT https://raw.githubusercontent.com/e154/smart-home/master/LICENSE Contact: Alex Filippov <support@e154.ru> https://e154.github.io/smart-home/ Consumes: - application/json Produces: - application/json Security: - BasicAuth - ApiKeyAuth SecurityDefinitions: ApiKeyAuth: type: apiKey name: Authorization in: header BasicAuth: type: basic swagger:meta |
server/v2
Smart home This documentation describes APIs found under https://github.com/e154/smart-home BasePath: /api/v2 Version: 2.0.0 License: MIT https://raw.githubusercontent.com/e154/smart-home/master/LICENSE Contact: Alex Filippov <support@e154.ru> https://e154.github.io/smart-home/ Consumes: - application/json Produces: - application/json Security: - BasicAuth - ApiKeyAuth SecurityDefinitions: ApiKeyAuth: type: apiKey name: Authorization in: header BasicAuth: type: basic swagger:meta
|
Smart home This documentation describes APIs found under https://github.com/e154/smart-home BasePath: /api/v2 Version: 2.0.0 License: MIT https://raw.githubusercontent.com/e154/smart-home/master/LICENSE Contact: Alex Filippov <support@e154.ru> https://e154.github.io/smart-home/ Consumes: - application/json Produces: - application/json Security: - BasicAuth - ApiKeyAuth SecurityDefinitions: ApiKeyAuth: type: apiKey name: Authorization in: header BasicAuth: type: basic swagger:meta |
system
|
|
dig
Package dig provides an opinionated way of resolving object dependencies.
|
Package dig provides an opinionated way of resolving object dependencies. |
uuid
Package uuid provides implementation of Universally Unique Identifier (UUID).
|
Package uuid provides implementation of Universally Unique Identifier (UUID). |
validation
Package validation for validations import ( "github.com/astaxie/beego/validation" "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, "nameMax") valid.Range(u.Age, 0, 140, "age") if valid.HasErrors() { // validation does not pass // print invalid message for _, err := range valid.Errors { log.Println(err.Key, err.Message) } } // or use like this if v := valid.Max(u.Age, 140, "ageMax"); !v.Ok { log.Println(v.Error.Key, v.Error.Message) } } more info: http://beego.me/docs/mvc/controller/validation.md
|
Package validation for validations import ( "github.com/astaxie/beego/validation" "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, "nameMax") valid.Range(u.Age, 0, 140, "age") if valid.HasErrors() { // validation does not pass // print invalid message for _, err := range valid.Errors { log.Println(err.Key, err.Message) } } // or use like this if v := valid.Max(u.Age, 140, "ageMax"); !v.Ok { log.Println(v.Error.Key, v.Error.Message) } } more info: http://beego.me/docs/mvc/controller/validation.md |
tests
|
|
Click to show internal directories.
Click to hide internal directories.