repository

package
v0.0.0-...-f880b6f Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContactRepository

type ContactRepository interface {
	GetContactIdsForEmail(ctx context.Context, tenant, emailId string) ([]string, error)
	GetAllCrossTenantsNotSynced(ctx context.Context, size int) ([]*utils.DbNodeAndId, error)
	GetContactIdById(ctx context.Context, tenant, id string) (string, error)
	GetContactIdByExternalId(ctx context.Context, tenant, externalId, externalSystemId string) (string, error)
	GetJobRoleId(ctx context.Context, tenant, contactId, organizationId string) (string, error)
}

func NewContactRepository

func NewContactRepository(driver *neo4j.DriverWithContext) ContactRepository

type Dbs

type Dbs struct {
	GormDB         *gorm.DB
	Neo4jDriver    *neo4j.DriverWithContext
	RawDataStoreDB *config.RawDataStoreDB
}

type EmailRepository

type EmailRepository interface {
	GetEmailId(ctx context.Context, tenant, email string) (string, error)
	GetEmailIdOrCreateContactByEmail(ctx context.Context, tenant, email, firstName, lastName, externalSystemId string) (string, error)
	GetEmailIdOrCreateUserByEmail(ctx context.Context, tenant, email, firstName, lastName, externalSystemId string) (string, error)
	GetAllCrossTenantsWithRawEmail(ctx context.Context, size int) ([]*utils.DbNodeAndId, error)
}

func NewEmailRepository

func NewEmailRepository(driver *neo4j.DriverWithContext) EmailRepository

type ExternalSystemRepository

type ExternalSystemRepository interface {
	Merge(ctx context.Context, tenant, externalSystem string) error
}

func NewExternalSystemRepository

func NewExternalSystemRepository(driver *neo4j.DriverWithContext) ExternalSystemRepository

type InteractionEventRepository

type InteractionEventRepository interface {
	MergeEmailInteractionSession(ctx context.Context, tenant string, date time.Time, message entity.EmailMessageData) (string, error)
	MergeEmailInteractionEvent(ctx context.Context, tenant, externalSystemId string, date time.Time, message entity.EmailMessageData) (string, error)
	LinkInteractionEventToSession(ctx context.Context, tenant, interactionEventId, interactionSessionId string) error
	InteractionEventSentByEmail(ctx context.Context, tenant, interactionEventId, emailId string) error
	InteractionEventSentToEmails(ctx context.Context, tenant, interactionEventId, sentType string, emails []string) error
}

func NewInteractionEventRepository

func NewInteractionEventRepository(driver *neo4j.DriverWithContext) InteractionEventRepository

type LocationRepository

type LocationRepository interface {
	GetAllCrossTenants(ctx context.Context, size int) ([]*utils.DbNodeAndId, error)
}

func NewLocationRepository

func NewLocationRepository(driver *neo4j.DriverWithContext) LocationRepository

type LogEntryRepository

type LogEntryRepository interface {
	GetMatchedLogEntryId(ctx context.Context, tenant string, logEntry entity.LogEntryData) (string, error)
	GetLogEntryIdById(ctx context.Context, tenant, id string) (string, error)
}

func NewLogEntryRepository

func NewLogEntryRepository(driver *neo4j.DriverWithContext) LogEntryRepository

type MeetingRepository

type MeetingRepository interface {
	GetMatchedMeetingId(ctx context.Context, tenant string, meeting entity.MeetingData) (string, error)
	MergeMeeting(ctx context.Context, tenant string, syncDate time.Time, meeting entity.MeetingData) error
	MergeMeetingLocation(ctx context.Context, tenant string, meeting entity.MeetingData) error
	MeetingLinkWithCreatorUserByExternalId(ctx context.Context, tenant, meetingId, userExternalId, externalSystem string) error
	MeetingLinkWithAttendedByUserByExternalId(ctx context.Context, tenant, meetingId, userExternalId, externalSystem string) error
	MeetingLinkWithAttendedByContactByExternalId(ctx context.Context, tenant, meetingId, contactExternalId, externalSystem string) error
}

func NewMeetingRepository

func NewMeetingRepository(driver *neo4j.DriverWithContext) MeetingRepository

type OrganizationRepository

type OrganizationRepository interface {
	GetOrganizationIdsForContact(ctx context.Context, tenant, contactId string) ([]string, error)
	GetOrganizationIdsForContactByExternalId(ctx context.Context, tenant, contactExternalId, externalSystem string) ([]string, error)
	GetAllCrossTenantsNotSynced(ctx context.Context, size int) ([]*utils.DbNodeAndId, error)
	GetAllDomainLinksCrossTenantsNotSynced(ctx context.Context, size int) ([]*neo4j.Record, error)
	GetOrganizationIdById(ctx context.Context, tenant, id string) (string, error)
	GetOrganizationIdByExternalId(ctx context.Context, tenant, externalId, externalSystemId string) (string, error)
	GetOrganizationIdByDomain(ctx context.Context, tenant, domain string) (string, error)
}

func NewOrganizationRepository

func NewOrganizationRepository(driver *neo4j.DriverWithContext, log logger.Logger) OrganizationRepository

type PhoneNumberRepository

type PhoneNumberRepository interface {
	GetAllCrossTenantsWithRawPhoneNumber(ctx context.Context, size int) ([]*utils.DbNodeAndId, error)
}

func NewPhoneNumberRepository

func NewPhoneNumberRepository(driver *neo4j.DriverWithContext) PhoneNumberRepository

type Repositories

type Repositories struct {
	Dbs Dbs

	PostgresRepositories *postgresRepository.Repositories

	TenantSyncSettingsRepository TenantSyncSettingsRepository
	TenantSettingsRepository     TenantSettingsRepository
	SyncRunRepository            SyncRunRepository

	ContactRepository          ContactRepository
	EmailRepository            EmailRepository
	PhoneNumberRepository      PhoneNumberRepository
	LocationRepository         LocationRepository
	ExternalSystemRepository   ExternalSystemRepository
	OrganizationRepository     OrganizationRepository
	UserRepository             UserRepository
	LogEntryRepository         LogEntryRepository
	InteractionEventRepository InteractionEventRepository
	MeetingRepository          MeetingRepository
}

func InitRepos

func InitRepos(driver *neo4j.DriverWithContext, gormDB *gorm.DB, airbyteStoreDb *config.RawDataStoreDB, log logger.Logger) *Repositories

type SyncRunRepository

type SyncRunRepository interface {
	Save(entity entity.SyncRun)
}

func NewSyncRunRepository

func NewSyncRunRepository(gormDb *gorm.DB) SyncRunRepository

type TenantSettingsRepository

type TenantSettingsRepository interface {
	GetTenantSettings(ctx context.Context, tenant string) (entity.TenantSettings, error)
}

func NewTenantSettingsRepository

func NewTenantSettingsRepository(gormDb *gorm.DB) TenantSettingsRepository

type TenantSyncSettingsRepository

type TenantSyncSettingsRepository interface {
	GetTenantsForSync() (entity.TenantSyncSettingsList, error)
}

func NewTenantSyncSettingsRepository

func NewTenantSyncSettingsRepository(gormDb *gorm.DB) TenantSyncSettingsRepository

type UserRepository

type UserRepository interface {
	GetUserIdById(ctx context.Context, tenant, id string) (string, error)
	GetUserIdByExternalId(ctx context.Context, tenant, externalId, externalSystemId string) (string, error)
	GetUserIdByExternalOwnerId(ctx context.Context, tenant, externalOwnerId, externalSystemId string) (string, error)
}

func NewUserRepository

func NewUserRepository(driver *neo4j.DriverWithContext) UserRepository

Jump to

Keyboard shortcuts

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