accountdeletion

package
v0.0.0-...-c4f7e29 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 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(loggerFactory *log.Factory, runnableFactory backgroundjob.RunnableFactory) *backgroundjob.Runner

Types

type AppContextResolver

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

type AppUser

type AppUser struct {
	AppID  string
	UserID string
}

type Runnable

type Runnable struct {
	Context            context.Context
	Store              *Store
	AppContextResolver AppContextResolver
	UserServiceFactory UserServiceFactory
	Logger             RunnableLogger
}

func (*Runnable) Run

func (r *Runnable) Run() 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() (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 {
	DeleteFromScheduledDeletion(userID string) error
}

type UserServiceFactory

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

Jump to

Keyboard shortcuts

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