![]() |
il y a 4 ans | |
---|---|---|
.. | ||
log | il y a 8 ans | |
swagger | il y a 4 ans | |
.gitignore | il y a 4 ans | |
CHANGES.md | il y a 4 ans | |
LICENSE | il y a 8 ans | |
README.md | il y a 4 ans | |
Srcfile | il y a 4 ans | |
bench_test.sh | il y a 4 ans | |
compress.go | il y a 8 ans | |
compressor_cache.go | il y a 8 ans | |
compressor_pools.go | il y a 8 ans | |
compressors.go | il y a 8 ans | |
constants.go | il y a 8 ans | |
container.go | il y a 8 ans | |
cors_filter.go | il y a 8 ans | |
coverage.sh | il y a 4 ans | |
curly.go | il y a 8 ans | |
curly_route.go | il y a 8 ans | |
doc.go | il y a 8 ans | |
entity_accessors.go | il y a 8 ans | |
filter.go | il y a 8 ans | |
install.sh | il y a 4 ans | |
jsr311.go | il y a 8 ans | |
logger.go | il y a 8 ans | |
mime.go | il y a 8 ans | |
options_filter.go | il y a 8 ans | |
parameter.go | il y a 8 ans | |
path_expression.go | il y a 8 ans | |
request.go | il y a 8 ans | |
response.go | il y a 8 ans | |
route.go | il y a 8 ans | |
route_builder.go | il y a 8 ans | |
router.go | il y a 8 ans | |
service_error.go | il y a 8 ans | |
web_service.go | il y a 8 ans | |
web_service_container.go | il y a 8 ans |
package for building REST-style Web Services using Google Go
REST asks developers to use HTTP methods explicitly and in a way that's consistent with the protocol definition. This basic REST design principle establishes a one-to-one mapping between create, read, update, and delete (CRUD) operations and HTTP methods. According to this mapping:
ws := new(restful.WebService)
ws.
Path("/users").
Consumes(restful.MIME_XML, restful.MIME_JSON).
Produces(restful.MIME_JSON, restful.MIME_XML)
ws.Route(ws.GET("/{user-id}").To(u.findUser).
Doc("get a user").
Param(ws.PathParameter("user-id", "identifier of the user").DataType("string")).
Writes(User{}))
...
func (u UserResource) findUser(request *restful.Request, response *restful.Response) {
id := request.PathParameter("user-id")
...
}
(c) 2012 - 2015, http://ernestmicklei.com. MIT License
Type git shortlog -s
for a full list of contributors.