The application is a collection of microservices: auth, checker; http api-gateway, Telegram Bot. App allows you to register by email, confirm it and check an array of links with up to 100 links in one request, or you can use Telegram Bot, and the checking speed is very high, because the worker pool pattern is used to check links.
func WorkerPool(ctx context.Context, in chan string, out chan models.Link, workers int, checkLink CheckLinkFunc) {
wg := new(sync.WaitGroup)
workers = min(workers, maxGoroutines)
wg.Add(workers)
for range workers {
go func() {
defer wg.Done()
for {
select {
case <-ctx.Done():
return
default:
link, ok := <-in
if !ok {
return
}
worker(ctx, link, out, checkLink)
}
}
}()
}
go func() {
wg.Wait()
close(out)
}()
}The main documentation is located in the docs/ directory in english and russian.
All example config files are in dirs - 'config'
Documentation - docs
API routes
package server
func (s *Server) RegisterRoutes() {
s.mux.HandleFunc("POST /api/register", s.api.Register)
s.mux.HandleFunc("/api/verify/", s.api.VerifyEmail)
s.mux.HandleFunc("POST /api/login", s.api.Login)
s.mux.HandleFunc("POST /api/refresh", s.api.RefreshTokens)
s.mux.HandleFunc("POST /api/check", s.middle.AuthMiddleware(s.api.CheckLinks))
}Proto file - auth.proto
Proto file - checker.proto
Pull requests are welcome, but can only be merged if the code conforms to PEP 8 for Python and Google style guide for GO.

