repository

package
v0.0.0-...-bcf736d Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: Apache-2.0 Imports: 21 Imported by: 21

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AiLocationMappingRepository

type AiLocationMappingRepository interface {
	AddLocationMapping(ctx context.Context, aiLocationMapping entity.AiLocationMapping) error
	GetLatestLocationMappingByInput(ctx context.Context, input string) (*entity.AiLocationMapping, error)
}

func NewAiLocationMappingRepository

func NewAiLocationMappingRepository(gormDb *gorm.DB) AiLocationMappingRepository

type AiPromptLogRepository

type AiPromptLogRepository interface {
	Store(aiPrompt entity.AiPromptLog) (string, error)
	UpdateResponse(id string, rawResponse string) error
	UpdateError(id string, postProcessErrorMessage string) error
}

func NewAiPromptLogRepository

func NewAiPromptLogRepository(gormDb *gorm.DB) AiPromptLogRepository

type ApiBillableEventRepository

type ApiBillableEventRepository interface {
	RegisterEvent(ctx context.Context, tenant string, event entity.BillableEvent, details BillableEventDetails) (*entity.ApiBillableEvent, error)
}

func NewApiBillableEventRepository

func NewApiBillableEventRepository(db *gorm.DB) ApiBillableEventRepository

type AppKeyRepository

type AppKeyRepository interface {
	FindByKey(ctx context.Context, app string, key string) (*entity.AppKey, error)
}

func NewAppKeyRepo

func NewAppKeyRepo(db *gorm.DB) AppKeyRepository

type BillableEventDetails

type BillableEventDetails struct {
	ExternalID    string `json:"externalId"`
	ReferenceData string `json:"referenceData"`
	Subtype       string `json:"subtype"`
	Source        string `json:"source"`
}

type BrowserAutomationRunRepository

type BrowserAutomationRunRepository interface {
	Get(ctx context.Context, automationType, status string) ([]entity.BrowserAutomationsRun, error)
	Add(ctx context.Context, input *entity.BrowserAutomationsRun) error
	MarkAsProcessed(ctx context.Context, id int) error
}

func NewBrowserAutomationRunRepository

func NewBrowserAutomationRunRepository(gormDb *gorm.DB) BrowserAutomationRunRepository

type BrowserAutomationRunResultRepository

type BrowserAutomationRunResultRepository interface {
	Get(ctx context.Context, runId int) (*entity.BrowserAutomationsRunResult, error)
}

func NewBrowserAutomationRunResultRepository

func NewBrowserAutomationRunResultRepository(gormDb *gorm.DB) BrowserAutomationRunResultRepository

type BrowserConfigRepository

type BrowserConfigRepository interface {
	Get(ctx context.Context) ([]entity.BrowserConfig, error)
	GetForUser(ctx context.Context, userId string) (*entity.BrowserConfig, error)

	Merge(ctx context.Context, browserConfig *entity.BrowserConfig) error
}

func NewBrowserConfigRepository

func NewBrowserConfigRepository(gormDb *gorm.DB) BrowserConfigRepository

type CacheEmailEnrowRepository

type CacheEmailEnrowRepository interface {
	RegisterRequest(ctx context.Context, record entity.CacheEmailEnrow) (*entity.CacheEmailEnrow, error)
	AddResponse(ctx context.Context, requestId, qualification, response string) error
	GetLatestByEmail(ctx context.Context, email string) (*entity.CacheEmailEnrow, error)
	GetAllByEmail(ctx context.Context, email string) ([]entity.CacheEmailEnrow, error)
	GetWithoutResponses(ctx context.Context) ([]*entity.CacheEmailEnrow, error)
}

func NewCacheEmailEnrowRepository

func NewCacheEmailEnrowRepository(gormDb *gorm.DB) CacheEmailEnrowRepository

type CacheEmailScrubbyRepository

type CacheEmailScrubbyRepository interface {
	Save(ctx context.Context, cacheEmailScrubby entity.CacheEmailScrubby) (*entity.CacheEmailScrubby, error)
	GetAllByEmail(ctx context.Context, email string) ([]entity.CacheEmailScrubby, error)
	GetLatestByEmail(ctx context.Context, email string) (*entity.CacheEmailScrubby, error)
	SetStatus(ctx context.Context, email, status string) error
	SetJustChecked(ctx context.Context, id string) (*entity.CacheEmailScrubby, error)
	GetToCheck(ctx context.Context, delayFromPreviousCheckInHours, limit int) ([]entity.CacheEmailScrubby, error)
}

func NewCacheEmailScrubbyRepository

func NewCacheEmailScrubbyRepository(gormDb *gorm.DB) CacheEmailScrubbyRepository

type CacheEmailTrueinboxRepository

type CacheEmailTrueinboxRepository interface {
	Create(ctx context.Context, record entity.CacheEmailTrueinbox) (*entity.CacheEmailTrueinbox, error)
	GetLatestByEmail(ctx context.Context, email string) (*entity.CacheEmailTrueinbox, error)
	GetAllByEmail(ctx context.Context, email string) ([]entity.CacheEmailTrueinbox, error)
}

func NewCacheEmailTrueinboxRepository

func NewCacheEmailTrueinboxRepository(gormDb *gorm.DB) CacheEmailTrueinboxRepository

type CacheEmailValidationDomainRepository

type CacheEmailValidationDomainRepository interface {
	Get(ctx context.Context, domain string) (*entity.CacheEmailValidationDomain, error)
	Save(ctx context.Context, cacheEmailValidationDomain entity.CacheEmailValidationDomain) (*entity.CacheEmailValidationDomain, error)
}

func NewCacheEmailValidationDomainRepository

func NewCacheEmailValidationDomainRepository(gormDb *gorm.DB) CacheEmailValidationDomainRepository

type CacheEmailValidationRepository

type CacheEmailValidationRepository interface {
	Get(ctx context.Context, email string) (*entity.CacheEmailValidation, error)
	Save(ctx context.Context, cacheEmailValidation entity.CacheEmailValidation) (*entity.CacheEmailValidation, error)
}

func NewCacheEmailValidationRepository

func NewCacheEmailValidationRepository(gormDb *gorm.DB) CacheEmailValidationRepository

type CacheIpDataRepository

type CacheIpDataRepository interface {
	Get(ctx context.Context, ip string) (*entity.CacheIpData, error)
	Save(ctx context.Context, cacheIpData entity.CacheIpData) (*entity.CacheIpData, error)
}

func NewCacheIpDataRepository

func NewCacheIpDataRepository(gormDb *gorm.DB) CacheIpDataRepository

type CacheIpHunterRepository

type CacheIpHunterRepository interface {
	Get(ctx context.Context, ip string) (*entity.CacheIpHunter, error)
	Save(ctx context.Context, cacheIpHunter entity.CacheIpHunter) (*entity.CacheIpHunter, error)
}

func NewCacheIpHunterRepository

func NewCacheIpHunterRepository(gormDb *gorm.DB) CacheIpHunterRepository

type CommonRepository

type CommonRepository interface {
	UpdateProperty(ctx context.Context, tenant string, entityType interface{}, id any, propertyName string, newValue interface{}) error
	PermanentlyDelete(ctx context.Context, tenant string) error
}

func NewCommonRepository

func NewCommonRepository(postgresDB *config.PostgresDB) CommonRepository

type CosApiEnrichPersonTempResultRepository

type CosApiEnrichPersonTempResultRepository interface {
	Create(ctx context.Context, data entity.CosApiEnrichPersonTempResult) (*entity.CosApiEnrichPersonTempResult, error)
	GetById(ctx context.Context, id, tenant string) (*entity.CosApiEnrichPersonTempResult, error)
	GetByBettercontactRecordId(ctx context.Context, bettercontactRecordId string) (*entity.CosApiEnrichPersonTempResult, error)
}

func NewCosApiEnrichPersonTempResultRepository

func NewCosApiEnrichPersonTempResultRepository(gormDb *gorm.DB) CosApiEnrichPersonTempResultRepository

type CurrencyRateRepository

type CurrencyRateRepository interface {
	GetLatestCurrencyRate(ctx context.Context, currency string) (*entity.CurrencyRate, error)
	SaveCurrencyRate(ctx context.Context, currency string, rate float64, date time.Time, source string) error
}

func NewCurrencyRateRepository

func NewCurrencyRateRepository(db *gorm.DB) CurrencyRateRepository

type CustomerOsIdsRepository

type CustomerOsIdsRepository interface {
	Reserve(ctx context.Context, customerOsIds entity.CustomerOsIds) error
}

func NewCustomerOsIdsRepository

func NewCustomerOsIdsRepository(gormDb *gorm.DB) CustomerOsIdsRepository

type EmailLookupRepository

type EmailLookupRepository interface {
	GetById(ctx context.Context, id string) (*entity.EmailLookup, error)
	Create(ctx context.Context, emailLookup entity.EmailLookup) (*entity.EmailLookup, error)
}

func NewEmailLookupRepository

func NewEmailLookupRepository(gormDb *gorm.DB) EmailLookupRepository

type EmailMessageRepository

type EmailMessageRepository interface {
	GetByProviderMessageId(ctx context.Context, tenant, providerMessageId string) (*entity.EmailMessage, error)
	GetByProducer(ctx context.Context, tenant, producerId, producerType string) (*entity.EmailMessage, error)
	GetForSending(ctx context.Context) ([]*entity.EmailMessage, error)
	GetForProcessing(ctx context.Context) ([]*entity.EmailMessage, error)
	Store(ctx context.Context, tenant string, input *entity.EmailMessage) error
}

func NewEmailMessageRepository

func NewEmailMessageRepository(gormDb *gorm.DB) EmailMessageRepository

type EmailTrackingRepository

type EmailTrackingRepository interface {
	Register(ctx context.Context, emailTracking entity.EmailTracking) (*entity.EmailTracking, error)
	Update(ctx context.Context, emailTracking entity.EmailTracking) (*entity.EmailTracking, error)
}

func NewEmailTrackingRepository

func NewEmailTrackingRepository(gormDb *gorm.DB) EmailTrackingRepository

type EmailValidationRecordRepository

type EmailValidationRecordRepository interface {
	BulkInsertRecords(ctx context.Context, tenant, requestId string, verifyCatchAll bool, emails []string) error
	UpdateEmailRecord(ctx context.Context, id uint64, newData string) error
	CountPendingRequests(ctx context.Context, priority int, createdBefore time.Time) (int64, error)
	CountPendingRequestsByRequestID(ctx context.Context, requestID string) (int64, error)
	GetUnprocessedEmailRecords(ctx context.Context, limit int) ([]entity.EmailValidationRecord, error)
	GetEmailRecordsInChunks(ctx context.Context, requestId string, chunkSize, offset int) ([]entity.EmailValidationRecord, error)
}

func NewEmailValidationRecordRepository

func NewEmailValidationRecordRepository(gormDb *gorm.DB) EmailValidationRecordRepository

type EmailValidationRequestBulkRepository

type EmailValidationRequestBulkRepository interface {
	RegisterRequest(ctx context.Context, tenant, requestId, fileName string, verifyCatchAll bool, totalRecords int) (*entity.EmailValidationRequestBulk, error)
	GetByRequestID(ctx context.Context, requestId string) (*entity.EmailValidationRequestBulk, error)
	IncrementDeliverableEmails(ctx context.Context, requestID string) error
	IncrementUndeliverableEmails(ctx context.Context, requestID string) error
	MarkRequestAsCompleted(ctx context.Context, requestID, fileStoreId string) error
	GetOldestUncompletedRequests(ctx context.Context, limit int) ([]entity.EmailValidationRequestBulk, error)
}

func NewEmailValidationRequestBulkRepository

func NewEmailValidationRequestBulkRepository(gormDb *gorm.DB) EmailValidationRequestBulkRepository

type EnrichDetailsBetterContactRepository

type EnrichDetailsBetterContactRepository interface {
	RegisterRequest(ctx context.Context, data entity.EnrichDetailsBetterContact) (*entity.EnrichDetailsBetterContact, error)
	AddResponse(ctx context.Context, requestId, response string) error
	GetByLinkedInUrl(ctx context.Context, linkedInUrl string, enrichPhoneNumber bool) (*entity.EnrichDetailsBetterContact, error)
	GetById(ctx context.Context, id string) (*entity.EnrichDetailsBetterContact, error)
	GetByRequestId(ctx context.Context, requestId string) (*entity.EnrichDetailsBetterContact, error)
	GetBy(ctx context.Context, firstName, lastName, companyName, companyDomain string, enrichPhoneNumber bool) ([]*entity.EnrichDetailsBetterContact, error)
	GetWithoutResponses(ctx context.Context) ([]*entity.EnrichDetailsBetterContact, error)
}

func NewEnrichDetailsBetterContactRepository

func NewEnrichDetailsBetterContactRepository(gormDb *gorm.DB) EnrichDetailsBetterContactRepository

type EnrichDetailsBrandfetchRepository

type EnrichDetailsBrandfetchRepository interface {
	Create(ctx context.Context, data entity.EnrichDetailsBrandfetch) (*entity.EnrichDetailsBrandfetch, error)
	GetAllSuccessByDomain(ctx context.Context, domain string) ([]entity.EnrichDetailsBrandfetch, error)
	GetLatestByDomain(ctx context.Context, domain string) (*entity.EnrichDetailsBrandfetch, error)
	GetToSyncIntoGlobalOrganizations(ctx context.Context, limit int) ([]*entity.EnrichDetailsBrandfetch, error)
	MarkSyncedToGlobalOrganizations(ctx context.Context, id uint64) error
}

func NewEnrichDetailsBrandfetchRepository

func NewEnrichDetailsBrandfetchRepository(gormDb *gorm.DB) EnrichDetailsBrandfetchRepository

type EnrichDetailsPrefilterTrackingRepository

type EnrichDetailsPrefilterTrackingRepository interface {
	GetForSendingRequests(ctx context.Context) ([]*entity.EnrichDetailsPreFilterTracking, error)
	GetByIP(ctx context.Context, IP string) (*entity.EnrichDetailsPreFilterTracking, error)

	RegisterRequest(ctx context.Context, ip string) error
	RegisterResponse(ctx context.Context, ip string, shouldIdentify bool, skipIdenitifyReason, response string) error
}

func NewEnrichDetailsPrefilterTrackingRepository

func NewEnrichDetailsPrefilterTrackingRepository(gormDb *gorm.DB) EnrichDetailsPrefilterTrackingRepository

type EnrichDetailsScrapInRepository

type EnrichDetailsScrapInRepository interface {
	Create(ctx context.Context, data entity.EnrichDetailsScrapIn) (*entity.EnrichDetailsScrapIn, error)
	GetAllByParam1AndFlow(ctx context.Context, param string, flow entity.ScrapInFlow) ([]entity.EnrichDetailsScrapIn, error)
	GetLatestByParam1AndFlow(ctx context.Context, param string, flow entity.ScrapInFlow) (*entity.EnrichDetailsScrapIn, error)
	GetLatestByParam1AndFlowWithPersonFound(ctx context.Context, param string, flow entity.ScrapInFlow) (*entity.EnrichDetailsScrapIn, error)
	GetLatestByParam1AndFlowWithCompanyFound(ctx context.Context, param string, flow entity.ScrapInFlow) (*entity.EnrichDetailsScrapIn, error)
	GetLatestByAllParamsAndFlow(ctx context.Context, param1, param2, param3, param4, param5 string, flow entity.ScrapInFlow) (*entity.EnrichDetailsScrapIn, error)
	GetLatestByAllParamsAndFlowWithPersonFound(ctx context.Context, param1, param2, param3, param4, param5 string, flow entity.ScrapInFlow) (*entity.EnrichDetailsScrapIn, error)
	GetById(ctx context.Context, id uint64) (*entity.EnrichDetailsScrapIn, error)
	GetToSyncIntoGlobalOrganizations(ctx context.Context, limit int) ([]*entity.EnrichDetailsScrapIn, error)
	MarkSyncedToGlobalOrganizations(ctx context.Context, id uint64) error
}

func NewEnrichDetailsScrapInRepository

func NewEnrichDetailsScrapInRepository(gormDb *gorm.DB) EnrichDetailsScrapInRepository

type EnrichDetailsTrackingRepository

type EnrichDetailsTrackingRepository interface {
	Save(ctx context.Context, request entity.EnrichDetailsTracking) error
	GetByIP(ctx context.Context, IP string) (*entity.EnrichDetailsTracking, error)
}

func NewEnrichDetailsTrackingRepository

func NewEnrichDetailsTrackingRepository(gormDb *gorm.DB) EnrichDetailsTrackingRepository

type EventBufferRepository

type EventBufferRepository interface {
	Upsert(eventBuffer *entity.EventBuffer) error
	GetByExpired(now time.Time) ([]entity.EventBuffer, error)
	GetByUUID(uuid string) (*entity.EventBuffer, error)
	Delete(eventBuffer *entity.EventBuffer) error
}

func NewEventBufferRepository

func NewEventBufferRepository(gormDb *gorm.DB) EventBufferRepository

type ExternalAppKeysRepository

type ExternalAppKeysRepository interface {
	IncrementUsageCount(ctx context.Context, id uint64) helper.QueryResult
	GetAppKeys(ctx context.Context, app, group string, usageLimit int) helper.QueryResult
}

func NewExternalAppKeysRepository

func NewExternalAppKeysRepository(gormDb *gorm.DB) ExternalAppKeysRepository

type FlowAgentExecutionRepository

type FlowAgentExecutionRepository interface {
	Create(ctx context.Context, executionRecord entity.FlowAgentExecution) (*entity.FlowAgentExecution, error)
	Find(ctx context.Context, executionRecord entity.FlowAgentExecution) (*entity.FlowAgentExecution, error)
	Update(ctx context.Context, executionRecord entity.FlowAgentExecution) (*entity.FlowAgentExecution, error)
}

func NewFlowAgentExecutionRepository

func NewFlowAgentExecutionRepository(gormDb *gorm.DB) FlowAgentExecutionRepository

type FlowAgentRegistryRepository

type FlowAgentRegistryRepository interface {
	Initialize(ctx context.Context) error
	Create(ctx context.Context, flowAgent entity.FlowAgentRegistry) (*entity.FlowAgentRegistry, error)
	Find(ctx context.Context, flowAgent entity.FlowAgentRegistry) (*entity.FlowAgentRegistry, error)
	FindAll(ctx context.Context) (*[]entity.FlowAgentRegistry, error)
}

func NewFlowAgentRegistryRepository

func NewFlowAgentRegistryRepository(gormDb *gorm.DB) FlowAgentRegistryRepository

type FlowDeadEventsRepository

type FlowDeadEventsRepository interface {
	Create(ctx context.Context, deadEvent entity.FlowDeadEvents) (*entity.FlowDeadEvents, error)
	Find(ctx context.Context, deadEvent entity.FlowDeadEvents) (*entity.FlowDeadEvents, error)
	Update(ctx context.Context, deadEvent entity.FlowDeadEvents) (*entity.FlowDeadEvents, error)
}

func NewFlowDeadEventsRepository

func NewFlowDeadEventsRepository(gormDb *gorm.DB) FlowDeadEventsRepository

type FlowEdgeRepository

type FlowEdgeRepository interface {
	Create(ctx context.Context, flowEdge entity.FlowEdge) (*entity.FlowEdge, error)
	FindAll(ctx context.Context, flowEdge entity.FlowEdge) (*[]entity.FlowEdge, error)
	Find(ctx context.Context, flowEdge entity.FlowEdge) (*entity.FlowEdge, error)
	Update(ctx context.Context, flowEdge entity.FlowEdge) (*entity.FlowEdge, error)
}

func NewFlowEdgeRepository

func NewFlowEdgeRepository(gormDb *gorm.DB) FlowEdgeRepository

type FlowExecutionRepository

type FlowExecutionRepository interface {
	Create(ctx context.Context, executionRecord entity.FlowExecution) (*entity.FlowExecution, error)
	Find(ctx context.Context, executionRecord entity.FlowExecution) (*entity.FlowExecution, error)
	Update(ctx context.Context, executionRecord entity.FlowExecution) (*entity.FlowExecution, error)
}

func NewFlowExecutionRepository

func NewFlowExecutionRepository(gormDb *gorm.DB) FlowExecutionRepository

type FlowListenerRegistryRepository

type FlowListenerRegistryRepository interface {
	Create(ctx context.Context, event *entity.FlowListenerRegistry) (*entity.FlowListenerRegistry, error)
	FindAll(ctx context.Context) (*[]entity.FlowListenerRegistry, error)
	Find(ctx context.Context, event *entity.FlowListenerRegistry) (*entity.FlowListenerRegistry, error)
	Initialize(ctx context.Context) error
}

func NewFlowListenerRegistryRepository

func NewFlowListenerRegistryRepository(gormDb *gorm.DB) FlowListenerRegistryRepository

type FlowNodeRepository

type FlowNodeRepository interface {
	Create(ctx context.Context, flowNode entity.FlowNode) (*entity.FlowNode, error)
	FindAll(ctx context.Context, flowNode entity.FlowNode) (*[]entity.FlowNode, error)
	Find(ctx context.Context, flowNode entity.FlowNode) (*entity.FlowNode, error)
	Update(ctx context.Context, flowNode entity.FlowNode) (*entity.FlowNode, error)
}

func NewFlowNodeRepository

func NewFlowNodeRepository(gormDb *gorm.DB) FlowNodeRepository

type FlowRepository

type FlowRepository interface {
	Create(ctx context.Context, flowRecord entity.Flow) (*entity.Flow, error)
	Find(ctx context.Context, flowRecord entity.Flow) (*entity.Flow, error)
	FindAll(ctx context.Context, flowRecord entity.Flow) (*[]entity.Flow, error)
	Update(ctx context.Context, flowRecord entity.Flow) (*entity.Flow, error)
}

func NewFlowRepository

func NewFlowRepository(gormDb *gorm.DB) FlowRepository

type FlowWebhooksRepository

type FlowWebhooksRepository interface {
	FindAll(ctx context.Context) (*[]entity.FlowWebhooks, error)
	Find(ctx context.Context, webhook entity.FlowWebhooks) (*entity.FlowWebhooks, error)
	Update(ctx context.Context, webhook entity.FlowWebhooks) (*entity.FlowWebhooks, error)
	Create(ctx context.Context, webhook entity.FlowWebhooks) (*entity.FlowWebhooks, error)
}

func NewFlowWebhooksRepository

func NewFlowWebhooksRepository(gormDb *gorm.DB) FlowWebhooksRepository

type FromNodeRecord

type FromNodeRecord struct {
	FromNode     string `gorm:"column:from_node"`
	FromNodeType string `gorm:"column:from_node_type"`
}

type GlobalOrganizationRepository

type GlobalOrganizationRepository interface {
	GetById(ctx context.Context, id uint64) (*entity.GlobalOrganization, error)
	GetByPrimaryDomain(ctx context.Context, domain string) (*entity.GlobalOrganization, error)
	GetByPrimaryDomains(ctx context.Context, domains []string) ([]*entity.GlobalOrganization, error)
	Create(ctx context.Context, organization *entity.GlobalOrganization) (*entity.GlobalOrganization, error)
	Update(ctx context.Context, organization *entity.GlobalOrganization) (*entity.GlobalOrganization, error)
	Search(ctx context.Context, searchTerm string, limit int) ([]*entity.GlobalOrganization, error)
}

func NewGlobalOrganizationRepository

func NewGlobalOrganizationRepository(gormDb *gorm.DB) GlobalOrganizationRepository

type GlobalOrganizationWebsiteToProcessRepository

type GlobalOrganizationWebsiteToProcessRepository interface {
	GetWebsitesToProcess(ctx context.Context, limit int) ([]*entity.GlobalOrganizationWebsiteToProcess, error)
	MarkAsProcessed(ctx context.Context, id uint64, notes string) error
}

func NewGlobalOrganizationWebsiteToProcessRepository

func NewGlobalOrganizationWebsiteToProcessRepository(gormDb *gorm.DB) GlobalOrganizationWebsiteToProcessRepository

type GoogleServiceAccountKeyRepository

type GoogleServiceAccountKeyRepository interface {
	GetApiKeyByTenantService(ctx context.Context, tenantId, serviceId string) (string, error)
	SaveKey(ctx context.Context, tenant, key, value string) error
	DeleteKey(ctx context.Context, tenant, key string) error
}

type GoogleServiceAccountKeyRepositoryImpl

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

func NewGoogleServiceAccountKeyRepository

func NewGoogleServiceAccountKeyRepository(gormDb *gorm.DB) *GoogleServiceAccountKeyRepositoryImpl

func (*GoogleServiceAccountKeyRepositoryImpl) DeleteKey

func (repo *GoogleServiceAccountKeyRepositoryImpl) DeleteKey(ctx context.Context, tenant, key string) error

func (*GoogleServiceAccountKeyRepositoryImpl) GetApiKeyByTenantService

func (repo *GoogleServiceAccountKeyRepositoryImpl) GetApiKeyByTenantService(ctx context.Context, tenantName, serviceId string) (string, error)

func (*GoogleServiceAccountKeyRepositoryImpl) SaveKey

func (repo *GoogleServiceAccountKeyRepositoryImpl) SaveKey(ctx context.Context, tenant, key, value string) error

type IndustryMappingRepository

type IndustryMappingRepository interface {
	GetAllIndustryMappingsAsMap(ctx context.Context) (map[string]string, error)
}

func NewIndustryMappingRepository

func NewIndustryMappingRepository(gormDb *gorm.DB) IndustryMappingRepository

type MagicLinkRepository

type MagicLinkRepository interface {
	GetByEmail(ctx context.Context, email string) (*entity.MagicLink, error)
	GetByCode(ctx context.Context, code string) (*entity.MagicLink, error)
	Create(ctx context.Context, magicLink *entity.MagicLink) error
	Delete(ctx context.Context, id string) error
}

func NewMagicLinkRepository

func NewMagicLinkRepository(db *gorm.DB) MagicLinkRepository

type MailStackDomainRepository

type MailStackDomainRepository interface {
	RegisterDomain(ctx context.Context, tenant, domain string) (*entity.MailStackDomain, error)
	CheckDomainOwnership(ctx context.Context, tenant, domain string) (bool, error)
	GetDomain(ctx context.Context, tenant, domain string) (*entity.MailStackDomain, error)
	GetActiveDomains(ctx context.Context, tenant string) ([]entity.MailStackDomain, error)
	MarkConfigured(ctx context.Context, tenant, domain string) error
	SetDkimKeys(ctx context.Context, tenant, domain, dkimPublic, dkimPrivate string) error
	CreateDMARCReport(ctx context.Context, tenant string, report *entity.DMARCMonitoring) error
	CreateMailstackReputationScore(ctx context.Context, tenant string, score *entity.MailstackReputationEntity) error
	GetDomainCrossTenant(ctx context.Context, domain string) (*entity.MailStackDomain, error)
	GetAllActiveDomainsCrossTenant(ctx context.Context) ([]entity.MailStackDomain, error)
}

func NewMailStackDomainRepository

func NewMailStackDomainRepository(db *gorm.DB) MailStackDomainRepository

type MailstackBuyRequestRepository

type MailstackBuyRequestRepository interface {
	GetList(ctx context.Context) ([]*entity.MailstackBuyRequest, error)
	GetById(ctx context.Context, id string) (*entity.MailstackBuyRequest, error)
	Store(ctx context.Context, tx *gorm.DB, input *entity.MailstackBuyRequest) (string, error)

	GetDomains(ctx context.Context, mailstackBuyRequestId string) ([]*entity.MailstackBuyRequestDomain, error)
	StoreDomain(ctx context.Context, tx *gorm.DB, input *entity.MailstackBuyRequestDomain) error
}

func NewMailstackBuyRequestRepository

func NewMailstackBuyRequestRepository(gormDb *gorm.DB) MailstackBuyRequestRepository

type OAuthTokenRepository

type OAuthTokenRepository interface {
	GetAll(ctx context.Context) ([]entity.OAuthTokenEntity, error)
	GetByTenant(ctx context.Context, tenant string) ([]entity.OAuthTokenEntity, error)
	GetByProvider(ctx context.Context, tenant string, provider string) ([]entity.OAuthTokenEntity, error)
	GetByEmailOnly(ctx context.Context, tenant, email string) (*entity.OAuthTokenEntity, error)
	GetByEmail(ctx context.Context, tenant, provider, email string) (*entity.OAuthTokenEntity, error)
	GetByPlayerId(ctx context.Context, tenant, provider, playerId string) (*entity.OAuthTokenEntity, error)
	Save(ctx context.Context, oAuthToken entity.OAuthTokenEntity) (*entity.OAuthTokenEntity, error)
	Update(ctx context.Context, tenant, playerId, provider, accessToken, refreshToken string, expiresAt time.Time) (*entity.OAuthTokenEntity, error)
	MarkForManualRefresh(ctx context.Context, tenant, playerId, provider string) error
	DeleteByEmail(ctx context.Context, tenant, provider, email string) error
}

func NewOAuthTokenRepository

func NewOAuthTokenRepository(db *gorm.DB) OAuthTokenRepository

type OrganizationWebsiteHostingPlatformRepository

type OrganizationWebsiteHostingPlatformRepository interface {
	GetAllUrlPatterns(ctx context.Context) ([]string, error)
}

func NewOrganizationWebsiteHostingPlatformRepository

func NewOrganizationWebsiteHostingPlatformRepository(gormDb *gorm.DB) OrganizationWebsiteHostingPlatformRepository

type PersonalEmailProviderRepository

type PersonalEmailProviderRepository interface {
	GetPersonalEmailProviders() ([]entity.PersonalEmailProvider, error)
}

func NewPersonalEmailProviderRepository

func NewPersonalEmailProviderRepository(gormDb *gorm.DB) PersonalEmailProviderRepository

type PersonalIntegrationRepository

type PersonalIntegrationRepository interface {
	FindActivesByIntegration(ctx context.Context, integration string) ([]*entity.PersonalIntegration, error)
	FindIntegration(ctx context.Context, tenant, email, integration string) helper.QueryResult
	FindIntegrations(ctx context.Context, tenant, email string) helper.QueryResult
	SaveIntegration(ctx context.Context, integration entity.PersonalIntegration) helper.QueryResult
}

type PersonalIntegrationsRepo

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

func NewPersonalIntegrationsRepo

func NewPersonalIntegrationsRepo(db *gorm.DB) *PersonalIntegrationsRepo

func (*PersonalIntegrationsRepo) FindActivesByIntegration

func (r *PersonalIntegrationsRepo) FindActivesByIntegration(ctx context.Context, integration string) ([]*entity.PersonalIntegration, error)

func (*PersonalIntegrationsRepo) FindIntegration

func (r *PersonalIntegrationsRepo) FindIntegration(ctx context.Context, tenant, email, integration string) helper.QueryResult

func (*PersonalIntegrationsRepo) FindIntegrations

func (r *PersonalIntegrationsRepo) FindIntegrations(ctx context.Context, tenant, email string) helper.QueryResult

func (*PersonalIntegrationsRepo) SaveIntegration

type PostmarkApiKeyRepo

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

func NewPostmarkApiKeyRepo

func NewPostmarkApiKeyRepo(db *gorm.DB) *PostmarkApiKeyRepo

func (*PostmarkApiKeyRepo) CreateApiKey

func (*PostmarkApiKeyRepo) GetPostmarkApiKey

func (r *PostmarkApiKeyRepo) GetPostmarkApiKey(ctx context.Context, tenant string) helper.QueryResult

type PostmarkApiKeyRepository

type PostmarkApiKeyRepository interface {
	GetPostmarkApiKey(ctx context.Context, tenant string) helper.QueryResult
	CreateApiKey(ctx context.Context, integration entity.PostmarkApiKey) helper.QueryResult
}

type RawEmailRepository

type RawEmailRepository interface {
	CountForUsername(ctx context.Context, externalSystem, tenant, username string) (int64, error)
	GetByMessageId(ctx context.Context, externalSystem, tenant, username, messageId string) (*entity.RawEmail, error)
	EmailExistsByMessageId(ctx context.Context, externalSystem, tenant, username, messageId string) (bool, error)
	Store(ctx context.Context, externalSystem, tenant, username, providerMessageId, messageId, rawEmail string, sentAt time.Time, state entity.EmailImportState) error
	GetEmailsIdsForSync(externalSystem, tenantName string) ([]entity.RawEmail, error)
	GetEmailsIdsForUserForSync(tenantName, userEmailAddress string) ([]entity.RawEmail, error)
	GetEmailForProcess(id uuid.UUID) (*entity.RawEmail, error)
	GetEmailForSyncByMessageId(tenant, usernameSource, messageId string) (*entity.RawEmail, error)
	UpdateRawEmailTable(id uuid.UUID, dbUpdateRecord entity.UpdateRawEmailTable) error
}

func NewRawEmailRepository

func NewRawEmailRepository(gormDb *gorm.DB) RawEmailRepository

type Repositories

type Repositories struct {
	Db      *gorm.DB
	AsyncDb *gorm.DB

	AiLocationMappingRepository                  AiLocationMappingRepository
	AiPromptLogRepository                        AiPromptLogRepository
	ApiBillableEventRepository                   ApiBillableEventRepository
	AppKeyRepository                             AppKeyRepository
	BrowserAutomationRunRepository               BrowserAutomationRunRepository
	BrowserAutomationRunResultRepository         BrowserAutomationRunResultRepository
	BrowserConfigRepository                      BrowserConfigRepository
	CacheEmailEnrowRepository                    CacheEmailEnrowRepository
	CacheEmailScrubbyRepository                  CacheEmailScrubbyRepository
	CacheEmailTrueinboxRepository                CacheEmailTrueinboxRepository
	CacheEmailValidationDomainRepository         CacheEmailValidationDomainRepository
	CacheEmailValidationRepository               CacheEmailValidationRepository
	CacheIpDataRepository                        CacheIpDataRepository
	CacheIpHunterRepository                      CacheIpHunterRepository
	CommonRepository                             CommonRepository
	CosApiEnrichPersonTempResultRepository       CosApiEnrichPersonTempResultRepository
	CurrencyRateRepository                       CurrencyRateRepository
	CustomerOsIdsRepository                      CustomerOsIdsRepository
	EmailLookupRepository                        EmailLookupRepository
	EmailMessageRepository                       EmailMessageRepository
	EmailTrackingRepository                      EmailTrackingRepository
	EmailValidationRecordRepository              EmailValidationRecordRepository
	EmailValidationRequestBulkRepository         EmailValidationRequestBulkRepository
	EnrichDetailsBetterContactRepository         EnrichDetailsBetterContactRepository
	EnrichDetailsBrandfetchRepository            EnrichDetailsBrandfetchRepository
	EnrichDetailsPrefilterTrackingRepository     EnrichDetailsPrefilterTrackingRepository
	EnrichDetailsScrapInRepository               EnrichDetailsScrapInRepository
	EnrichDetailsTrackingRepository              EnrichDetailsTrackingRepository
	EventBufferRepository                        EventBufferRepository
	ExternalAppKeysRepository                    ExternalAppKeysRepository
	FlowRepository                               FlowRepository
	FlowAgentExecutionRepository                 FlowAgentExecutionRepository
	FlowAgentRegistryRepository                  FlowAgentRegistryRepository
	FlowDeadEventsRepository                     FlowDeadEventsRepository
	FlowEdgeRepository                           FlowEdgeRepository
	FlowExecutionRepository                      FlowExecutionRepository
	FlowListenerRegistryRepository               FlowListenerRegistryRepository
	FlowNodeRepository                           FlowNodeRepository
	FlowTransitionsRegistryRepository            FlowTransitionsRegistryRepository
	FlowWebhooksRepository                       FlowWebhooksRepository
	GoogleServiceAccountKeyRepository            GoogleServiceAccountKeyRepository
	IndustryMappingRepository                    IndustryMappingRepository
	MailStackDomainRepository                    MailStackDomainRepository
	MailstackBuyRequestRepository                MailstackBuyRequestRepository
	MagicLinkRepository                          MagicLinkRepository
	OAuthTokenRepository                         OAuthTokenRepository
	OranizationWebsiteHostingPlatformRepository  OrganizationWebsiteHostingPlatformRepository
	PersonalEmailProviderRepository              PersonalEmailProviderRepository
	PersonalIntegrationRepository                PersonalIntegrationRepository
	PostmarkApiKeyRepository                     PostmarkApiKeyRepository
	RawEmailRepository                           RawEmailRepository
	SlackChannelNotificationRepository           SlackChannelNotificationRepository
	SlackChannelRepository                       SlackChannelRepository
	SlackSettingsRepository                      SlackSettingsRepository
	StatsApiCallsRepository                      StatsApiCallsRepository
	TableViewDefinitionRepository                TableViewDefinitionRepository
	TenantRepository                             TenantRepository
	TenantSettingsEmailExclusionRepository       TenantSettingsEmailExclusionRepository
	TenantSettingsMailboxRepository              TenantSettingsMailboxRepository
	TenantSettingsOpportunityStageRepository     TenantSettingsOpportunityStageRepository
	TenantSettingsRepository                     TenantSettingsRepository
	TenantWebhookApiKeyRepository                TenantWebhookApiKeyRepository
	TenantWebhookRepository                      TenantWebhookRepository
	TrackingAllowedOriginRepository              TrackingAllowedOriginRepository
	TrackingRepository                           TrackingRepository
	UserEmailImportPageTokenRepository           UserEmailImportStateRepository
	UserWorkingScheduleRepository                UserWorkingScheduleRepository
	GlobalOrganizationRepository                 GlobalOrganizationRepository
	GlobalOrganizationWebsiteToProcessRepository GlobalOrganizationWebsiteToProcessRepository
}

func InitRepositories

func InitRepositories(postgresDB *config.PostgresDB) *Repositories

func (*Repositories) InitData

func (r *Repositories) InitData(ctx context.Context, postgresRepos *Repositories)

func (*Repositories) Migration

func (r *Repositories) Migration(postgresDB *config.PostgresDB)

type SlackChannelNotificationRepository

type SlackChannelNotificationRepository interface {
	GetSlackChannels(c context.Context, tenant, workflow string) ([]*entity.SlackChannelNotification, error)
}

func NewSlackChannelNotificationRepository

func NewSlackChannelNotificationRepository(db *gorm.DB) SlackChannelNotificationRepository

type SlackChannelRepository

type SlackChannelRepository interface {
	GetSlackChannel(ctx context.Context, tenant, channelId string) (*entity.SlackChannel, error)
	GetSlackChannels(ctx context.Context, tenant string) ([]*entity.SlackChannel, error)
	GetPaginatedSlackChannels(ctx context.Context, tenant string, skip, limit int) ([]*entity.SlackChannel, int64, error)

	CreateSlackChannel(ctx context.Context, entity *entity.SlackChannel) error
	UpdateSlackChannelOrganization(ctx context.Context, entityId uuid.UUID, organizationId string) error
	UpdateSlackChannelName(ctx context.Context, entityId uuid.UUID, channelName string) error
}

func NewSlackChannelRepository

func NewSlackChannelRepository(db *gorm.DB) SlackChannelRepository

type SlackSettingsRepository

type SlackSettingsRepository interface {
	Get(ctx context.Context, tenant string) (*entity.SlackSettingsEntity, error)
	Save(ctx context.Context, slackSettings entity.SlackSettingsEntity) (*entity.SlackSettingsEntity, error)
	Delete(ctx context.Context, tenant string) error
}

func NewSlackSettingsRepository

func NewSlackSettingsRepository(db *gorm.DB) SlackSettingsRepository

type StatsApiCallsRepository

type StatsApiCallsRepository interface {
	Increment(ctx context.Context, tenant, api string) (*entity.StatsApiCalls, error)
}

func NewStatsApiCallsRepository

func NewStatsApiCallsRepository(gormDb *gorm.DB) StatsApiCallsRepository

type TableViewDefinitionRepository

type TableViewDefinitionRepository interface {
	GetTableViewDefinitions(ctx context.Context, tenant, userId string) helper.QueryResult
	CreateTableViewDefinition(ctx context.Context, viewDefinition entity.TableViewDefinition) helper.QueryResult
	UpdateTableViewDefinition(ctx context.Context, viewDefinition entity.TableViewDefinition) helper.QueryResult
	UpdateTableViewSharedDefinition(ctx context.Context, viewDefinition entity.TableViewDefinition) helper.QueryResult
	ArchiveTableViewDefinition(ctx context.Context, viewDefinitionId uint64) error
	GetTableViewDefinition(ctx context.Context, tenant string, id uint64) (entity.TableViewDefinition, error)
}

func NewTableViewDefinitionRepository

func NewTableViewDefinitionRepository(gormDb *gorm.DB) TableViewDefinitionRepository

type TenantRepository

type TenantRepository interface {
	Create(ctx context.Context, tenantEntity entity.Tenant) (*entity.Tenant, error)
	GetTenant(ctx context.Context, hashID string) (string, error)
	GetHashID(ctx context.Context, tenant string) (string, error)
	PermanentlyDelete(ctx context.Context, tenant string) error
}

func NewTenantRepository

func NewTenantRepository(gormDb *gorm.DB) TenantRepository

type TenantSettingsEmailExclusionRepository

type TenantSettingsEmailExclusionRepository interface {
	GetExclusionList(ctx context.Context) ([]entity.TenantSettingsEmailExclusion, error)
}

func NewEmailExclusionRepository

func NewEmailExclusionRepository(gormDb *gorm.DB) TenantSettingsEmailExclusionRepository

type TenantSettingsMailboxRepository

type TenantSettingsMailboxRepository interface {
	GetAll(ctx context.Context) ([]*entity.TenantSettingsMailbox, error)
	GetForRampUp(ctx context.Context) ([]*entity.TenantSettingsMailbox, error)
	GetById(ctx context.Context, id string) (*entity.TenantSettingsMailbox, error)
	GetByMailbox(ctx context.Context, mailbox string) (*entity.TenantSettingsMailbox, error)
	GetAllByDomain(ctx context.Context, domain string) ([]entity.TenantSettingsMailbox, error)
	GetAllByUserId(ctx context.Context, userId string) ([]entity.TenantSettingsMailbox, error)

	Merge(ctx context.Context, tx *gorm.DB, mailbox *entity.TenantSettingsMailbox) error
}

func NewTenantSettingsMailboxRepository

func NewTenantSettingsMailboxRepository(db *gorm.DB) TenantSettingsMailboxRepository

type TenantSettingsOpportunityStageRepository

type TenantSettingsOpportunityStageRepository interface {
	GetById(c context.Context, tenant, id string) (*entity.TenantSettingsOpportunityStage, error)
	GetOrInitialize(c context.Context, tenant string) ([]*entity.TenantSettingsOpportunityStage, error)
	Init(c context.Context, tenant string) error
	Store(c context.Context, entity entity.TenantSettingsOpportunityStage) (*entity.TenantSettingsOpportunityStage, error)
	Update(ctx context.Context, tenant, id string, label *string, likelihoodRate *int64, visible *bool) (*entity.TenantSettingsOpportunityStage, error)
}

func NewTenantSettingsOpportunityStageRepository

func NewTenantSettingsOpportunityStageRepository(db *gorm.DB) TenantSettingsOpportunityStageRepository

type TenantSettingsRepository

type TenantSettingsRepository interface {
	FindForTenantName(ctx context.Context, tenantName string) (*entity.TenantSettings, error)
	Save(ctx context.Context, tenantSettings *entity.TenantSettings) (*entity.TenantSettings, error)
}

func NewTenantSettingsRepository

func NewTenantSettingsRepository(db *gorm.DB) TenantSettingsRepository

type TenantWebhookApiKeyRepository

type TenantWebhookApiKeyRepository interface {
	CreateApiKey(ctx context.Context, tenant string) error
	GetTenantForApiKey(ctx context.Context, apiKey string) (*entity.TenantWebhookApiKey, error)
	GetFirstApiKeyForTenant(ctx context.Context, tenant string) (*entity.TenantWebhookApiKey, error)
}

func NewTenantWebhookApiKeyRepository

func NewTenantWebhookApiKeyRepository(gormDb *gorm.DB) TenantWebhookApiKeyRepository

type TenantWebhookRepo

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

func NewTenantWebhookRepo

func NewTenantWebhookRepo(db *gorm.DB) *TenantWebhookRepo

func (*TenantWebhookRepo) CreateWebhook

func (r *TenantWebhookRepo) CreateWebhook(ctx context.Context, webhook entity.TenantWebhook) helper.QueryResult

func (*TenantWebhookRepo) GetWebhook

func (r *TenantWebhookRepo) GetWebhook(ctx context.Context, tenant, event string) helper.QueryResult

func (*TenantWebhookRepo) GetWebhooks

func (r *TenantWebhookRepo) GetWebhooks(ctx context.Context, tenant string) helper.QueryResult

type TenantWebhookRepository

type TenantWebhookRepository interface {
	GetWebhook(ctx context.Context, tenant, event string) helper.QueryResult
	GetWebhooks(ctx context.Context, tenant string) helper.QueryResult
	CreateWebhook(ctx context.Context, integration entity.TenantWebhook) helper.QueryResult
}

type TrackingAllowedOriginRepository

type TrackingAllowedOriginRepository interface {
	GetTenantForOrigin(ctx context.Context, origin string) (*string, error)
	Create(ctx context.Context, whitelist entity.TrackingAllowedOrigin) (*entity.TrackingAllowedOrigin, error)
	Update(ctx context.Context, whitelist entity.TrackingAllowedOrigin) (*entity.TrackingAllowedOrigin, error)
	FindAll(ctx context.Context, whitelist entity.TrackingAllowedOrigin) (*[]entity.TrackingAllowedOrigin, error)
	Find(ctx context.Context, whitelist entity.TrackingAllowedOrigin) (*entity.TrackingAllowedOrigin, error)
}

func NewTrackingAllowedOriginRepository

func NewTrackingAllowedOriginRepository(gormDb *gorm.DB) TrackingAllowedOriginRepository

type TrackingRepository

type TrackingRepository interface {
	GetById(ctx context.Context, id string) (*entity.Tracking, error)
	GetNewRecords(ctx context.Context) ([]*entity.Tracking, error)
	GetForPrefilter(ctx context.Context) ([]*entity.Tracking, error)
	GetReadyForIdentification(ctx context.Context) ([]*entity.Tracking, error)
	GetIdentifiedWithDistinctIP(ctx context.Context) ([]*entity.Tracking, error)
	GetForSlackNotifications(ctx context.Context, limit int) ([]*entity.Tracking, error)

	Store(ctx context.Context, tracking entity.Tracking) (string, error)

	SetStateById(ctx context.Context, id string, newState entity.TrackingIdentificationState) error

	MarkAsNotified(ctx context.Context, id string) error
	MarkAsOrganizationCreated(ctx context.Context, id, organizationId string, organizationName, organizationDomain, organizationWebsite *string) error
	MarkAllWithState(ctx context.Context, ip string, state entity.TrackingIdentificationState) error
	MarkAllExcludeIdWithState(ctx context.Context, excludeId, ip string, state entity.TrackingIdentificationState) error
	IncrementNotificationTry(ctx context.Context, id string) error
	WasNotifiedRecently(ctx context.Context, organizationDomain string, lookBackWindowHours int) (bool, error)
}

func NewTrackingRepository

func NewTrackingRepository(gormDb *gorm.DB) TrackingRepository

type UserEmailImportStateRepository

type UserEmailImportStateRepository interface {
	GetEmailImportState(ctx context.Context, tenantName, provider, username string, state entity.EmailImportState) (*entity.UserEmailImportState, error)
	CreateEmailImportState(ctx context.Context, tenantName, provider, username string, state entity.EmailImportState, startDate, stopDate *time.Time, active bool, cursor string) (*entity.UserEmailImportState, error)
	UpdateEmailImportState(ctx context.Context, tenantName, provider, username string, state entity.EmailImportState, cursor string) (*entity.UserEmailImportState, error)
	ActivateEmailImportState(ctx context.Context, tenantName, provider, username string, state entity.EmailImportState) error
	DeactivateEmailImportState(ctx context.Context, tenantName, provider, username string, state entity.EmailImportState) error
}

func NewUserEmailImportStateRepository

func NewUserEmailImportStateRepository(gormDb *gorm.DB) UserEmailImportStateRepository

type UserWorkingScheduleRepository

type UserWorkingScheduleRepository interface {
	GetForUser(ctx context.Context, tenant, userId string) ([]*entity.UserWorkingSchedule, error)
	Store(ctx context.Context, tenant string, input *entity.UserWorkingSchedule) error
}

func NewUserWorkingScheduleRepository

func NewUserWorkingScheduleRepository(gormDb *gorm.DB) UserWorkingScheduleRepository

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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