genofire/hs_monolith
genofire
/
hs_monolith
Archived
1
0
Fork 0
This repository has been archived on 2020-09-27. You can view files and clone it, but cannot push or open issues or pull requests.
hs_monolith/http/bindapi.go

15 lines
365 B
Go
Raw Normal View History

2017-04-28 10:27:36 +02:00
// all api routes of this microservice
2017-03-25 16:09:17 +01:00
package http
import (
goji "goji.io"
"goji.io/pat"
)
2017-04-28 10:27:36 +02:00
// bind all API routes to webserver
2017-03-25 16:09:17 +01:00
func BindAPI(router *goji.Mux) {
router.HandleFunc(pat.Get("/api/status"), status)
router.HandleFunc(pat.Get("/api/good/:productid"), listGoods)
router.HandleFunc(pat.Get("/api/good/availablity/:productid"), getGoodAvailablity)
2017-03-25 16:09:17 +01:00
}