Initial commit: Open sourcing all of the Maple Open Technologies code.
This commit is contained in:
commit
755d54a99d
2010 changed files with 448675 additions and 0 deletions
23
cloud/maplefile-backend/internal/domain/user/interface.go
Normal file
23
cloud/maplefile-backend/internal/domain/user/interface.go
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
// codeberg.org/mapleopentech/monorepo/cloud/maplefile-backend/internal/domain/user/interface.go
|
||||
package user
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/gocql/gocql"
|
||||
)
|
||||
|
||||
// Repository Interface for user management.
|
||||
type Repository interface {
|
||||
Create(ctx context.Context, m *User) error
|
||||
GetByID(ctx context.Context, id gocql.UUID) (*User, error)
|
||||
GetByEmail(ctx context.Context, email string) (*User, error)
|
||||
GetByVerificationCode(ctx context.Context, verificationCode string) (*User, error)
|
||||
DeleteByID(ctx context.Context, id gocql.UUID) error
|
||||
DeleteByEmail(ctx context.Context, email string) error
|
||||
CheckIfExistsByEmail(ctx context.Context, email string) (bool, error)
|
||||
UpdateByID(ctx context.Context, m *User) error
|
||||
AnonymizeOldIPs(ctx context.Context, cutoffDate time.Time) (int, error)
|
||||
AnonymizeUserIPs(ctx context.Context, userID gocql.UUID) error // For GDPR right-to-be-forgotten
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue