usersync

package
v0.0.0-...-7a56977 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Usersynchronizer

type Usersynchronizer struct {
	// contains filtered or unexported fields
}

func New

func New(db usersyncDatabase, auditLogger auditlogger.AuditLogger, adminGroupPrefix, tenantDomain string, service *admin_directory_v1.Service, log logrus.FieldLogger) *Usersynchronizer

func NewFromConfig

func NewFromConfig(ctx context.Context, serviceAccount, subjectEmail, tenantDomain, adminGroupPrefix string, db usersyncDatabase, log logrus.FieldLogger) (*Usersynchronizer, error)

func (*Usersynchronizer) Sync

func (s *Usersynchronizer) Sync(ctx context.Context, correlationID uuid.UUID) error

Sync Fetch all users from the tenant and add them as local users in api. If a user already exists in api the local user will get the name potentially updated. After all users have been upserted, local users that matches the tenant domain that does not exist in the Google Directory will be removed.

Jump to

Keyboard shortcuts

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