mirror of
https://github.com/PrivateCaptcha/PrivateCaptcha.git
synced 2026-04-29 17:29:38 -05:00
15 lines
334 B
Go
15 lines
334 B
Go
package db
|
|
|
|
import (
|
|
"context"
|
|
|
|
dbgen "github.com/PrivateCaptcha/PrivateCaptcha/pkg/db/generated"
|
|
)
|
|
|
|
type AsyncTaskHandler = func(ctx context.Context, task *dbgen.AsyncTask) ([]byte, error)
|
|
|
|
type AsyncTasks interface {
|
|
Register(handler string, fn AsyncTaskHandler) bool
|
|
Execute(ctx context.Context, task *dbgen.AsyncTask) error
|
|
}
|