repository

package
v0.0.0-...-af7f365 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: 14 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 AppKeyRepository

type AppKeyRepository interface {
	FindByKey(ctx context.Context, app string, key string) helper.QueryResult
}

func NewAppKeyRepo

func NewAppKeyRepo(db *gorm.DB) AppKeyRepository

type CurrencyRateRepository

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

func NewCurrencyRateRepository

func NewCurrencyRateRepository(db *gorm.DB) CurrencyRateRepository

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 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 PersonalEmailProviderRepository

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

func NewPersonalEmailProviderRepository

func NewPersonalEmailProviderRepository(gormDb *gorm.DB) PersonalEmailProviderRepository

type PersonalIntegrationRepository

type PersonalIntegrationRepository interface {
	FindIntegration(tenant, email, integration string) helper.QueryResult
	FindIntegrations(tenant, email string) helper.QueryResult
	SaveIntegration(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) FindIntegration

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

func (*PersonalIntegrationsRepo) FindIntegrations

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

func (*PersonalIntegrationsRepo) SaveIntegration

func (r *PersonalIntegrationsRepo) SaveIntegration(integration entity.PersonalIntegration) helper.QueryResult

type PostmarkApiKeyRepo

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

func NewPostmarkApiKeyRepo

func NewPostmarkApiKeyRepo(db *gorm.DB) *PostmarkApiKeyRepo

func (*PostmarkApiKeyRepo) CreateApiKey

func (r *PostmarkApiKeyRepo) CreateApiKey(apiKey entity.PostmarkApiKey) helper.QueryResult

func (*PostmarkApiKeyRepo) GetPostmarkApiKey

func (r *PostmarkApiKeyRepo) GetPostmarkApiKey(tenant string) helper.QueryResult

type PostmarkApiKeyRepository

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

type Repositories

type Repositories struct {
	AppKeyRepository                  AppKeyRepository
	PersonalIntegrationRepository     PersonalIntegrationRepository
	AiPromptLogRepository             AiPromptLogRepository
	WhitelistDomainRepository         WhitelistDomainRepository
	PersonalEmailProviderRepository   PersonalEmailProviderRepository
	TenantWebhookApiKeyRepository     TenantWebhookApiKeyRepository
	TenantWebhookRepository           TenantWebhookRepository
	SlackChannelRepository            SlackChannelRepository
	PostmarkApiKeyRepository          PostmarkApiKeyRepository
	GoogleServiceAccountKeyRepository GoogleServiceAccountKeyRepository
	CurrencyRateRepository            CurrencyRateRepository
	EventBufferRepository             EventBufferRepository
	TableViewDefinitionRepository     TableViewDefinitionRepository
}

func InitRepositories

func InitRepositories(db *gorm.DB) *Repositories

func (*Repositories) Migration

func (r *Repositories) Migration(db *gorm.DB)

type SlackChannelRepository

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

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

func NewSlackChannelRepository

func NewSlackChannelRepository(db *gorm.DB) SlackChannelRepository

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
}

func NewTableViewDefinitionRepository

func NewTableViewDefinitionRepository(gormDb *gorm.DB) TableViewDefinitionRepository

type TenantWebhookApiKeyRepo

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

func NewTenantWebhookApiKeyRepo

func NewTenantWebhookApiKeyRepo(db *gorm.DB) *TenantWebhookApiKeyRepo

func (*TenantWebhookApiKeyRepo) GetTenantWithApiKey

func (r *TenantWebhookApiKeyRepo) GetTenantWithApiKey(apiKey string) helper.QueryResult

func (*TenantWebhookApiKeyRepo) SaveApiKey

type TenantWebhookApiKeyRepository

type TenantWebhookApiKeyRepository interface {
	GetTenantWithApiKey(apiKey string) helper.QueryResult
	SaveApiKey(integration entity.TenantWebhookApiKey) helper.QueryResult
}

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(webhook entity.TenantWebhook) helper.QueryResult

func (*TenantWebhookRepo) GetWebhook

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

func (*TenantWebhookRepo) GetWebhooks

func (r *TenantWebhookRepo) GetWebhooks(tenant string) helper.QueryResult

type TenantWebhookRepository

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

type WhitelistDomainRepository

type WhitelistDomainRepository interface {
	GetWildcardAllWhitelistDomain(tenant string) (*entity.WhitelistDomain, error)
	SaveWildcardAllWhitelistDomain(tenant, source, appSource string) error
	RemoveWildcardAllWhitelistDomain(tenant string) error

	SaveWhitelistDomain(whitelistDomain entity.WhitelistDomain) error
	GetWhitelistDomains(tenant string) ([]entity.WhitelistDomain, error)
}

func NewWhitelistDomainRepository

func NewWhitelistDomainRepository(gormDb *gorm.DB) WhitelistDomainRepository

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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