func onStart() {
	webService := service.NewWebService()

	accountValidator := AccountValidatorController(parsers.CreateFileParser(), newRateLimiter())
	webService.AddWebController(accountValidator)

	server = httptest.NewServer(webService.BuildRouter())
	base = fmt.Sprintf("%s/verify", server.URL)
}
예제 #2
0
func main() {
	service.BuildTag = buildTag
	service.BuildDate = buildDate
	service.VersionRoute = "/version"
	service.HeartbeatRoute = "/heartbeat"

	address := flag.String("a", ":8080", "address to listen")
	flag.Parse()

	webService := service.NewWebService()

	parser := parsers.CreateFileParser()
	accountValidator := controllers.AccountValidatorController(parser, newRateLimiter())
	webService.AddWebController(accountValidator)

	webService.Run(*address)
}