func initializeRepo(c *controller.Controller) { manager, err := postgres.NewPgManager(conf.Database.Url) if err != nil { fmt.Printf("Unable to intialize repo: %v\n", err) os.Exit(1) } repo := postgres.NewPgRepository(manager) c.SetRepository(repo) }
func initializeTokenService(c *controller.Controller) { ts := jwt.InitializeJwt([]byte(conf.Auth.Key)) c.SetTokenService(ts) }