|
%!s(int64=5) %!d(string=hai) anos | |
---|---|---|
.. | ||
log | %!s(int64=5) %!d(string=hai) anos | |
.gitignore | %!s(int64=5) %!d(string=hai) anos | |
.travis.yml | %!s(int64=5) %!d(string=hai) anos | |
BUILD | %!s(int64=5) %!d(string=hai) anos | |
CHANGES.md | %!s(int64=5) %!d(string=hai) anos | |
LICENSE | %!s(int64=5) %!d(string=hai) anos | |
Makefile | %!s(int64=5) %!d(string=hai) anos | |
README.md | %!s(int64=5) %!d(string=hai) anos | |
Srcfile | %!s(int64=5) %!d(string=hai) anos | |
bench_test.sh | %!s(int64=5) %!d(string=hai) anos | |
compress.go | %!s(int64=5) %!d(string=hai) anos | |
compressor_cache.go | %!s(int64=5) %!d(string=hai) anos | |
compressor_pools.go | %!s(int64=5) %!d(string=hai) anos | |
compressors.go | %!s(int64=5) %!d(string=hai) anos | |
constants.go | %!s(int64=5) %!d(string=hai) anos | |
container.go | %!s(int64=5) %!d(string=hai) anos | |
cors_filter.go | %!s(int64=5) %!d(string=hai) anos | |
coverage.sh | %!s(int64=5) %!d(string=hai) anos | |
curly.go | %!s(int64=5) %!d(string=hai) anos | |
curly_route.go | %!s(int64=5) %!d(string=hai) anos | |
doc.go | %!s(int64=5) %!d(string=hai) anos | |
entity_accessors.go | %!s(int64=5) %!d(string=hai) anos | |
filter.go | %!s(int64=5) %!d(string=hai) anos | |
jsr311.go | %!s(int64=5) %!d(string=hai) anos | |
logger.go | %!s(int64=5) %!d(string=hai) anos | |
mime.go | %!s(int64=5) %!d(string=hai) anos | |
options_filter.go | %!s(int64=5) %!d(string=hai) anos | |
parameter.go | %!s(int64=5) %!d(string=hai) anos | |
path_expression.go | %!s(int64=5) %!d(string=hai) anos | |
request.go | %!s(int64=5) %!d(string=hai) anos | |
response.go | %!s(int64=5) %!d(string=hai) anos | |
route.go | %!s(int64=5) %!d(string=hai) anos | |
route_builder.go | %!s(int64=5) %!d(string=hai) anos | |
router.go | %!s(int64=5) %!d(string=hai) anos | |
service_error.go | %!s(int64=5) %!d(string=hai) anos | |
web_service.go | %!s(int64=5) %!d(string=hai) anos | |
web_service_container.go | %!s(int64=5) %!d(string=hai) anos |
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")
...
}
Type git shortlog -s
for a full list of contributors.
© 2012 - 2017, http://ernestmicklei.com. MIT License. Contributions are welcome.