unified code verification service
This commit is contained in:
@@ -2,7 +2,6 @@ package verification
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/tech/sendico/pkg/model"
|
||||
"go.mongodb.org/mongo-driver/v2/bson"
|
||||
@@ -10,12 +9,6 @@ import (
|
||||
|
||||
type DB interface {
|
||||
// template.DB[*model.VerificationToken]
|
||||
Create(
|
||||
ctx context.Context,
|
||||
accountRef bson.ObjectID,
|
||||
purpose model.VerificationPurpose,
|
||||
target string,
|
||||
ttl time.Duration,
|
||||
) (rawToken string, err error)
|
||||
Consume(ctx context.Context, rawToken string) (*model.VerificationToken, error)
|
||||
Create(ctx context.Context, request *Request) (verificationToken string, err error)
|
||||
Consume(ctx context.Context, accountRef bson.ObjectID, purpose model.VerificationPurpose, verificationToken string) (*model.VerificationToken, error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user