accountanonymization

package
v0.0.0-...-ee57881 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func NewRunnableFactory

func NewRunnableFactory(
	pool *db.Pool,
	globalDBCredentials *config.GlobalDatabaseCredentialsEnvironmentConfig,
	databaseCfg *config.DatabaseEnvironmentConfig,
	logFactory *log.Factory,
	clock clock.Clock,
	appContextResolver AppContextResolver,
	userServiceFactory UserServiceFactory,
) backgroundjob.RunnableFactory

func NewRunner

func NewRunner(ctx context.Context, loggerFactory *log.Factory, runnableFactory backgroundjob.RunnableFactory) *backgroundjob.Runner

Types

type AppContextResolver

type AppContextResolver interface {
	ResolveContext(ctx context.Context, appID string) (*config.AppContext, error)
}

type AppUser

type AppUser struct {
	AppID  string
	UserID string
}

type Runnable

type Runnable struct {
	Store              *Store
	AppContextResolver AppContextResolver
	UserServiceFactory UserServiceFactory
	Logger             RunnableLogger
}

func (*Runnable) Run

func (r *Runnable) Run(ctx context.Context) error

type RunnableLogger

type RunnableLogger struct{ *log.Logger }

func NewRunnableLogger

func NewRunnableLogger(lf *log.Factory) RunnableLogger

type Store

type Store struct {
	Handle      *globaldb.Handle
	SQLBuilder  *globaldb.SQLBuilder
	SQLExecutor *globaldb.SQLExecutor
	Clock       clock.Clock
}

func (*Store) ListAppUsers

func (s *Store) ListAppUsers(ctx context.Context) (appUsers []AppUser, err error)

ListAppUsers returns a list of (appID, userID) pairs that it is the time to execute the scheduled deletion.

type UserService

type UserService interface {
	AnonymizeFromScheduledAnonymization(ctx context.Context, userID string) error
}

type UserServiceFactory

type UserServiceFactory interface {
	MakeUserService(appID string, appContext *config.AppContext) UserService
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL