Created
April 28, 2020 22:10
-
-
Save diegoholiveira/6ccba5856c527bd8d8371a4533526d1b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package purchaseshistory | |
import ( | |
"github.com/go-chi/chi" | |
"go.uber.org/fx" | |
) | |
var Module = fx.Options( | |
fx.Invoke(registerEndpoints), | |
factories, | |
) | |
var factories = fx.Provide( | |
NewPurchasesHistoryHandler, | |
NewPurchasesRepository, | |
) | |
func registerEndpoints(router chi.Router, handler PurchasesHistoryHandler) { | |
router.Method("GET", "/users/{id}/purchases", handler) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment