Skip to content

Instantly share code, notes, and snippets.

@bykof
Last active February 18, 2020 13:55
Show Gist options
  • Save bykof/6050498d5738d4619b8561c4de60a2de to your computer and use it in GitHub Desktop.
Save bykof/6050498d5738d4619b8561c4de60a2de to your computer and use it in GitHub Desktop.
package api
import (
"dashboard/api/interfaces"
"flamingo.me/flamingo/v3/framework/web"
)
type Routes struct {
orderController application.OrderController
}
func (routes *Routes) Inject(orderController *application.OrderController) {
routes.orderController = *orderController
}
func (routes *Routes) Routes(registry *web.RouterRegistry) {
registry.Route("/order", "order")
registry.HandleGet("order", routes.orderController.Get)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment