Documentation ¶
Overview ¶
Package storage provides a storage system for the application.
Index ¶
- func NewPostgresDB(cfg PostgresConfig) (*sql.DB, error)
- type DatasourceConfig
- type Postgres
- func (p *Postgres) AddConversation(ctx context.Context, interactionUUID uuid.UUID, role string, message string) (types.Conversation, error)
- func (p *Postgres) AddConversationTx(ctx context.Context, tx *sql.Tx, interactionUUID string, ...) (types.Conversation, error)
- func (p *Postgres) AddDatasource(ctx context.Context, dsConfig types.DatasourceConfig) error
- func (p *Postgres) CreateEmbeddingProvider(ctx context.Context, provider types.EmbeddingProviderConfig) error
- func (p *Postgres) CreateInteraction(ctx context.Context, interaction types.Interaction) (types.Interaction, error)
- func (p *Postgres) CreateLLMProvider(ctx context.Context, provider types.LLMProviderConfig) error
- func (p *Postgres) CreateUser(ctx context.Context, user *types.User) error
- func (p *Postgres) DeleteDatasource(ctx context.Context, uuid uuid.UUID) error
- func (p *Postgres) DeleteEmbeddingProvider(ctx context.Context, id uuid.UUID) error
- func (p *Postgres) DeleteLLMProvider(ctx context.Context, uuid uuid.UUID) error
- func (p *Postgres) Get(ctx context.Context, filter types.DocumentFilter, ...) (types.PaginatedDocuments, error)
- func (p *Postgres) GetAllDatasources(ctx context.Context, page, perPage int) (*types.PaginatedDatasources, error)
- func (p *Postgres) GetAllEmbeddingProviders(ctx context.Context, filter types.EmbeddingProviderFilter, ...) (*types.PaginatedEmbeddingProviders, error)
- func (p *Postgres) GetAllInteractions(ctx context.Context, page, perPage int) (*types.PaginatedInteractions, error)
- func (p *Postgres) GetAllLLMProviders(ctx context.Context, filter types.LLMProviderFilter, ...) (*types.PaginatedLLMProviders, error)
- func (p *Postgres) GetAnalyticsOverview(ctx context.Context) (types.AnalyticsOverview, error)
- func (p *Postgres) GetConversation(ctx context.Context, interactionUUID uuid.UUID) ([]types.Conversation, error)
- func (p *Postgres) GetDatasource(ctx context.Context, uuid uuid.UUID) (types.DatasourceConfig, error)
- func (p *Postgres) GetEmbeddingProvider(ctx context.Context, id uuid.UUID) (*types.EmbeddingProviderConfig, error)
- func (p *Postgres) GetForProcessing(ctx context.Context, _ types.DocumentFilter, batchLimit int) ([]uuid.UUID, error)
- func (p *Postgres) GetInteraction(ctx context.Context, uuid uuid.UUID) (types.Interaction, error)
- func (p *Postgres) GetKeyPair() (privateKey, publicKey []byte, err error)
- func (p *Postgres) GetLLMProvider(ctx context.Context, uuid uuid.UUID) (*types.LLMProviderConfig, error)
- func (p *Postgres) GetPaginatedUsers(ctx context.Context, filter types.UserFilter, option types.UserFilterOption) (types.PaginatedUsers, error)
- func (p *Postgres) GetSettings(ctx context.Context) (types.Settings, error)
- func (p *Postgres) GetUser(ctx context.Context, uuid uuid.UUID) (*types.User, error)
- func (p *Postgres) HandleShutdown(ctx context.Context) error
- func (p *Postgres) HealthCheck() error
- func (p *Postgres) RecordAIOpsUsage(ctx context.Context, usage types.AIUsage) error
- func (p *Postgres) RunMigration() error
- func (p *Postgres) Search(ctx context.Context, config types.SearchConfig) (*types.SearchResults, error)
- func (p *Postgres) SetActiveDatasource(ctx context.Context, uuid uuid.UUID) error
- func (p *Postgres) SetActiveEmbeddingProvider(ctx context.Context, uuid uuid.UUID) error
- func (p *Postgres) SetActiveLLMProvider(ctx context.Context, id uuid.UUID) error
- func (p *Postgres) SetDisableDatasource(ctx context.Context, uuid uuid.UUID) error
- func (p *Postgres) SetDisableEmbeddingProvider(ctx context.Context, uuid uuid.UUID) error
- func (p *Postgres) SetDisableLLMProvider(ctx context.Context, id uuid.UUID) error
- func (p *Postgres) Store(ctx context.Context, doc types.Document) error
- func (p *Postgres) Update(ctx context.Context, doc types.Document) error
- func (p *Postgres) UpdateDatasource(ctx context.Context, uuid uuid.UUID, settings types.DatasourceSettings, ...) error
- func (p *Postgres) UpdateEmbeddingProvider(ctx context.Context, provider types.EmbeddingProviderConfig) error
- func (p *Postgres) UpdateKeyPair(privateKey, publicKey []byte) error
- func (p *Postgres) UpdateLLMProvider(ctx context.Context, provider types.LLMProviderConfig) error
- func (p *Postgres) UpdateSettings(ctx context.Context, settings types.Settings) error
- func (p *Postgres) UpdateUserRoles(ctx context.Context, uuid uuid.UUID, roles []types.UserRole) error
- func (p *Postgres) UpdateUserStatus(ctx context.Context, uuid uuid.UUID, status types.UserStatus) error
- type PostgresConfig
- type Storage
- type StorageMock
- func (_m *StorageMock) AddConversation(ctx context.Context, interactionUUID uuid.UUID, role string, message string) (types.Conversation, error)
- func (_m *StorageMock) AddConversationTx(ctx context.Context, tx *sql.Tx, interactionUUID string, ...) (types.Conversation, error)
- func (_m *StorageMock) AddDatasource(ctx context.Context, dsConfig types.DatasourceConfig) error
- func (_m *StorageMock) CreateEmbeddingProvider(ctx context.Context, provider types.EmbeddingProviderConfig) error
- func (_m *StorageMock) CreateInteraction(ctx context.Context, interaction types.Interaction) (types.Interaction, error)
- func (_m *StorageMock) CreateLLMProvider(ctx context.Context, provider types.LLMProviderConfig) error
- func (_m *StorageMock) CreateUser(ctx context.Context, user *types.User) error
- func (_m *StorageMock) DeleteDatasource(ctx context.Context, _a1 uuid.UUID) error
- func (_m *StorageMock) DeleteEmbeddingProvider(ctx context.Context, id uuid.UUID) error
- func (_m *StorageMock) DeleteLLMProvider(ctx context.Context, _a1 uuid.UUID) error
- func (_m *StorageMock) Get(ctx context.Context, filter types.DocumentFilter, ...) (types.PaginatedDocuments, error)
- func (_m *StorageMock) GetAllDatasources(ctx context.Context, page int, perPage int) (*types.PaginatedDatasources, error)
- func (_m *StorageMock) GetAllEmbeddingProviders(ctx context.Context, filter types.EmbeddingProviderFilter, ...) (*types.PaginatedEmbeddingProviders, error)
- func (_m *StorageMock) GetAllInteractions(ctx context.Context, page int, perPage int) (*types.PaginatedInteractions, error)
- func (_m *StorageMock) GetAllLLMProviders(ctx context.Context, filter types.LLMProviderFilter, ...) (*types.PaginatedLLMProviders, error)
- func (_m *StorageMock) GetAnalyticsOverview(ctx context.Context) (types.AnalyticsOverview, error)
- func (_m *StorageMock) GetConversation(ctx context.Context, interactionUUID uuid.UUID) ([]types.Conversation, error)
- func (_m *StorageMock) GetDatasource(ctx context.Context, _a1 uuid.UUID) (types.DatasourceConfig, error)
- func (_m *StorageMock) GetEmbeddingProvider(ctx context.Context, id uuid.UUID) (*types.EmbeddingProviderConfig, error)
- func (_m *StorageMock) GetForProcessing(ctx context.Context, filter types.DocumentFilter, batchLimit int) ([]uuid.UUID, error)
- func (_m *StorageMock) GetInteraction(ctx context.Context, _a1 uuid.UUID) (types.Interaction, error)
- func (_m *StorageMock) GetKeyPair() ([]byte, []byte, error)
- func (_m *StorageMock) GetLLMProvider(ctx context.Context, _a1 uuid.UUID) (*types.LLMProviderConfig, error)
- func (_m *StorageMock) GetPaginatedUsers(ctx context.Context, filter types.UserFilter, option types.UserFilterOption) (types.PaginatedUsers, error)
- func (_m *StorageMock) GetSettings(ctx context.Context) (types.Settings, error)
- func (_m *StorageMock) GetUser(ctx context.Context, _a1 uuid.UUID) (*types.User, error)
- func (_m *StorageMock) HandleShutdown(ctx context.Context) error
- func (_m *StorageMock) HealthCheck() error
- func (_m *StorageMock) RecordAIOpsUsage(ctx context.Context, usage types.AIUsage) error
- func (_m *StorageMock) RunMigration() error
- func (_m *StorageMock) Search(ctx context.Context, config types.SearchConfig) (*types.SearchResults, error)
- func (_m *StorageMock) SetActiveDatasource(ctx context.Context, _a1 uuid.UUID) error
- func (_m *StorageMock) SetActiveEmbeddingProvider(ctx context.Context, _a1 uuid.UUID) error
- func (_m *StorageMock) SetActiveLLMProvider(ctx context.Context, id uuid.UUID) error
- func (_m *StorageMock) SetDisableDatasource(ctx context.Context, _a1 uuid.UUID) error
- func (_m *StorageMock) SetDisableEmbeddingProvider(ctx context.Context, _a1 uuid.UUID) error
- func (_m *StorageMock) SetDisableLLMProvider(ctx context.Context, id uuid.UUID) error
- func (_m *StorageMock) Store(ctx context.Context, document types.Document) error
- func (_m *StorageMock) Update(ctx context.Context, document types.Document) error
- func (_m *StorageMock) UpdateDatasource(ctx context.Context, _a1 uuid.UUID, settings types.DatasourceSettings, ...) error
- func (_m *StorageMock) UpdateEmbeddingProvider(ctx context.Context, provider types.EmbeddingProviderConfig) error
- func (_m *StorageMock) UpdateKeyPair(privateKey []byte, publicKey []byte) error
- func (_m *StorageMock) UpdateLLMProvider(ctx context.Context, provider types.LLMProviderConfig) error
- func (_m *StorageMock) UpdateSettings(ctx context.Context, settings types.Settings) error
- func (_m *StorageMock) UpdateUserRoles(ctx context.Context, _a1 uuid.UUID, roles []types.UserRole) error
- func (_m *StorageMock) UpdateUserStatus(ctx context.Context, _a1 uuid.UUID, status types.UserStatus) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPostgresDB ¶
func NewPostgresDB(cfg PostgresConfig) (*sql.DB, error)
NewPostgresDB creates a new Postgres database connection
Types ¶
type DatasourceConfig ¶
type Postgres ¶
type Postgres struct {
// contains filtered or unexported fields
}
Postgres is a storage system that uses a Postgres database
func (*Postgres) AddConversation ¶
func (p *Postgres) AddConversation(ctx context.Context, interactionUUID uuid.UUID, role string, message string) (types.Conversation, error)
AddConversation store a new conversation in the database
func (*Postgres) AddConversationTx ¶
func (p *Postgres) AddConversationTx(ctx context.Context, tx *sql.Tx, interactionUUID string, conversation types.Conversation) (types.Conversation, error)
AddConversationTx adds a new conversation to the database using the provided transaction
func (*Postgres) AddDatasource ¶
AddDatasource adds a new datasource to the database
func (*Postgres) CreateEmbeddingProvider ¶
func (p *Postgres) CreateEmbeddingProvider(ctx context.Context, provider types.EmbeddingProviderConfig) error
CreateEmbeddingProvider creates a new embedding provider in the database
func (*Postgres) CreateInteraction ¶
func (p *Postgres) CreateInteraction(ctx context.Context, interaction types.Interaction) (types.Interaction, error)
CreateInteraction creates a new interaction in the database
func (*Postgres) CreateLLMProvider ¶
CreateLLMProvider creates a new LLM provider in the database
func (*Postgres) CreateUser ¶
func (*Postgres) DeleteDatasource ¶
DeleteDatasource deletes a datasource from the database
func (*Postgres) DeleteEmbeddingProvider ¶
DeleteEmbeddingProvider deletes an embedding provider from the database
func (*Postgres) DeleteLLMProvider ¶
DeleteLLMProvider deletes an LLM provider from the database
func (*Postgres) Get ¶
func (p *Postgres) Get(ctx context.Context, filter types.DocumentFilter, options types.DocumentFilterOption) (types.PaginatedDocuments, error)
Get the document from the database
func (*Postgres) GetAllDatasources ¶
func (p *Postgres) GetAllDatasources(ctx context.Context, page, perPage int) (*types.PaginatedDatasources, error)
GetAllDatasources retrieves all datasources from the database
func (*Postgres) GetAllEmbeddingProviders ¶
func (p *Postgres) GetAllEmbeddingProviders(ctx context.Context, filter types.EmbeddingProviderFilter, option types.EmbeddingProviderFilterOption) (*types.PaginatedEmbeddingProviders, error)
GetAllEmbeddingProviders retrieves all embedding providers from the database
func (*Postgres) GetAllInteractions ¶
func (p *Postgres) GetAllInteractions(ctx context.Context, page, perPage int) (*types.PaginatedInteractions, error)
GetAllInteractions retrieves all interactions from the database
func (*Postgres) GetAllLLMProviders ¶
func (p *Postgres) GetAllLLMProviders(ctx context.Context, filter types.LLMProviderFilter, option types.LLMProviderFilterOption) (*types.PaginatedLLMProviders, error)
GetAllLLMProviders retrieves all LLM providers from the database
func (*Postgres) GetAnalyticsOverview ¶
GetAnalyticsOverview retrieves an overview of analytics data from the database
func (*Postgres) GetConversation ¶
func (p *Postgres) GetConversation(ctx context.Context, interactionUUID uuid.UUID) ([]types.Conversation, error)
GetConversation retrieves all conversations for an interaction from the database
func (*Postgres) GetDatasource ¶
func (p *Postgres) GetDatasource(ctx context.Context, uuid uuid.UUID) (types.DatasourceConfig, error)
GetDatasource retrieves a datasource from the database
func (*Postgres) GetEmbeddingProvider ¶
func (p *Postgres) GetEmbeddingProvider(ctx context.Context, id uuid.UUID) (*types.EmbeddingProviderConfig, error)
GetEmbeddingProvider retrieves an embedding provider from the database
func (*Postgres) GetForProcessing ¶
func (p *Postgres) GetForProcessing(ctx context.Context, _ types.DocumentFilter, batchLimit int) ([]uuid.UUID, error)
GetForProcessing retrieves documents for processing
func (*Postgres) GetInteraction ¶
GetInteraction retrieves an interaction from the database
func (*Postgres) GetKeyPair ¶
func (*Postgres) GetLLMProvider ¶
func (p *Postgres) GetLLMProvider(ctx context.Context, uuid uuid.UUID) (*types.LLMProviderConfig, error)
GetLLMProvider retrieves an LLM provider from the database
func (*Postgres) GetPaginatedUsers ¶
func (p *Postgres) GetPaginatedUsers(ctx context.Context, filter types.UserFilter, option types.UserFilterOption) (types.PaginatedUsers, error)
func (*Postgres) GetSettings ¶
GetSettings retrieves the application settings from the database
func (*Postgres) HandleShutdown ¶
HandleShutdown handle graceful shutdown for db migration
func (*Postgres) HealthCheck ¶
HealthCheck checks the health of the storage system
func (*Postgres) RecordAIOpsUsage ¶
RecordAIOpsUsage records AI operations usage in the database
func (*Postgres) RunMigration ¶
RunMigration run database migration
func (*Postgres) Search ¶
func (p *Postgres) Search(ctx context.Context, config types.SearchConfig) (*types.SearchResults, error)
Search searches for documents in the database
func (*Postgres) SetActiveDatasource ¶
SetActiveDatasource sets a datasource to active status
func (*Postgres) SetActiveEmbeddingProvider ¶
SetActiveEmbeddingProvider sets an embedding provider to active status
func (*Postgres) SetActiveLLMProvider ¶
SetActiveLLMProvider sets an LLM provider to active status
func (*Postgres) SetDisableDatasource ¶
SetDisableDatasource sets a datasource to inactive status
func (*Postgres) SetDisableEmbeddingProvider ¶
SetDisableEmbeddingProvider sets an embedding provider to inactive status
func (*Postgres) SetDisableLLMProvider ¶
SetDisableLLMProvider sets an LLM provider to inactive status
func (*Postgres) UpdateDatasource ¶
func (p *Postgres) UpdateDatasource(ctx context.Context, uuid uuid.UUID, settings types.DatasourceSettings, state types.DatasourceState) error
UpdateDatasource updates a datasource in the database
func (*Postgres) UpdateEmbeddingProvider ¶
func (p *Postgres) UpdateEmbeddingProvider(ctx context.Context, provider types.EmbeddingProviderConfig) error
UpdateEmbeddingProvider updates an existing embedding provider in the database
func (*Postgres) UpdateKeyPair ¶
func (*Postgres) UpdateLLMProvider ¶
UpdateLLMProvider updates an existing LLM provider in the database
func (*Postgres) UpdateSettings ¶
UpdateSettings updates the application settings in the database
func (*Postgres) UpdateUserRoles ¶
func (*Postgres) UpdateUserStatus ¶
type PostgresConfig ¶
PostgresConfig contains configuration for a Postgres database
type Storage ¶
type Storage interface { HealthCheck() error Store(ctx context.Context, document types.Document) error Update(ctx context.Context, document types.Document) error Get(ctx context.Context, filter types.DocumentFilter, options types.DocumentFilterOption) (types.PaginatedDocuments, error) GetForProcessing(ctx context.Context, filter types.DocumentFilter, batchLimit int) ([]uuid.UUID, error) AddDatasource(ctx context.Context, dsConfig types.DatasourceConfig) error GetDatasource(ctx context.Context, uuid uuid.UUID) (types.DatasourceConfig, error) GetAllDatasources(ctx context.Context, page, perPage int) (*types.PaginatedDatasources, error) UpdateDatasource(ctx context.Context, uuid uuid.UUID, settings types.DatasourceSettings, state types.DatasourceState) error SetActiveDatasource(ctx context.Context, uuid uuid.UUID) error SetDisableDatasource(ctx context.Context, uuid uuid.UUID) error DeleteDatasource(ctx context.Context, uuid uuid.UUID) error CreateEmbeddingProvider(ctx context.Context, provider types.EmbeddingProviderConfig) error UpdateEmbeddingProvider(ctx context.Context, provider types.EmbeddingProviderConfig) error DeleteEmbeddingProvider(ctx context.Context, id uuid.UUID) error GetEmbeddingProvider(ctx context.Context, id uuid.UUID) (*types.EmbeddingProviderConfig, error) GetAllEmbeddingProviders(ctx context.Context, filter types.EmbeddingProviderFilter, option types.EmbeddingProviderFilterOption) (*types.PaginatedEmbeddingProviders, error) SetActiveEmbeddingProvider(ctx context.Context, uuid uuid.UUID) error SetDisableEmbeddingProvider(ctx context.Context, uuid uuid.UUID) error CreateLLMProvider(ctx context.Context, provider types.LLMProviderConfig) error UpdateLLMProvider(ctx context.Context, provider types.LLMProviderConfig) error DeleteLLMProvider(ctx context.Context, uuid uuid.UUID) error GetLLMProvider(ctx context.Context, uuid uuid.UUID) (*types.LLMProviderConfig, error) GetAllLLMProviders(ctx context.Context, filter types.LLMProviderFilter, option types.LLMProviderFilterOption) (*types.PaginatedLLMProviders, error) SetActiveLLMProvider(ctx context.Context, id uuid.UUID) error SetDisableLLMProvider(ctx context.Context, id uuid.UUID) error RecordAIOpsUsage(ctx context.Context, usage types.AIUsage) error Search(ctx context.Context, config types.SearchConfig) (*types.SearchResults, error) UpdateSettings(ctx context.Context, settings types.Settings) error GetSettings(ctx context.Context) (types.Settings, error) CreateInteraction(ctx context.Context, interaction types.Interaction) (types.Interaction, error) GetInteraction(ctx context.Context, uuid uuid.UUID) (types.Interaction, error) GetAllInteractions(ctx context.Context, page, perPage int) (*types.PaginatedInteractions, error) AddConversationTx(ctx context.Context, tx *sql.Tx, interactionUUID string, conversation types.Conversation) (types.Conversation, error) AddConversation(ctx context.Context, interactionUUID uuid.UUID, role string, message string) (types.Conversation, error) GetConversation(ctx context.Context, interactionUUID uuid.UUID) ([]types.Conversation, error) GetAnalyticsOverview(ctx context.Context) (types.AnalyticsOverview, error) RunMigration() error HandleShutdown(ctx context.Context) error GetKeyPair() (privateKey, publicKey []byte, err error) UpdateKeyPair(privateKey, publicKey []byte) error CreateUser(ctx context.Context, user *types.User) error GetUser(ctx context.Context, uuid uuid.UUID) (*types.User, error) UpdateUserStatus(ctx context.Context, uuid uuid.UUID, status types.UserStatus) error GetPaginatedUsers(ctx context.Context, filter types.UserFilter, option types.UserFilterOption) (types.PaginatedUsers, error) UpdateUserRoles(ctx context.Context, uuid uuid.UUID, roles []types.UserRole) error }
func NewPostgres ¶
func NewPostgres(cfg PostgresConfig, logger *logrus.Logger) (Storage, error)
NewPostgres creates a new Postgres storage system
type StorageMock ¶
StorageMock is an autogenerated mock type for the StorageMock type
func NewStorageMock ¶
func NewStorageMock(t interface { mock.TestingT Cleanup(func()) }) *StorageMock
NewStorage creates a new instance of StorageMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*StorageMock) AddConversation ¶
func (_m *StorageMock) AddConversation(ctx context.Context, interactionUUID uuid.UUID, role string, message string) (types.Conversation, error)
AddConversation provides a mock function with given fields: ctx, interactionUUID, role, message
func (*StorageMock) AddConversationTx ¶
func (_m *StorageMock) AddConversationTx(ctx context.Context, tx *sql.Tx, interactionUUID string, conversation types.Conversation) (types.Conversation, error)
AddConversationTx provides a mock function with given fields: ctx, tx, interactionUUID, conversation
func (*StorageMock) AddDatasource ¶
func (_m *StorageMock) AddDatasource(ctx context.Context, dsConfig types.DatasourceConfig) error
AddDatasource provides a mock function with given fields: ctx, dsConfig
func (*StorageMock) CreateEmbeddingProvider ¶
func (_m *StorageMock) CreateEmbeddingProvider(ctx context.Context, provider types.EmbeddingProviderConfig) error
CreateEmbeddingProvider provides a mock function with given fields: ctx, provider
func (*StorageMock) CreateInteraction ¶
func (_m *StorageMock) CreateInteraction(ctx context.Context, interaction types.Interaction) (types.Interaction, error)
CreateInteraction provides a mock function with given fields: ctx, interaction
func (*StorageMock) CreateLLMProvider ¶
func (_m *StorageMock) CreateLLMProvider(ctx context.Context, provider types.LLMProviderConfig) error
CreateLLMProvider provides a mock function with given fields: ctx, provider
func (*StorageMock) CreateUser ¶
CreateUser provides a mock function with given fields: ctx, user
func (*StorageMock) DeleteDatasource ¶
DeleteDatasource provides a mock function with given fields: ctx, _a1
func (*StorageMock) DeleteEmbeddingProvider ¶
DeleteEmbeddingProvider provides a mock function with given fields: ctx, id
func (*StorageMock) DeleteLLMProvider ¶
DeleteLLMProvider provides a mock function with given fields: ctx, _a1
func (*StorageMock) Get ¶
func (_m *StorageMock) Get(ctx context.Context, filter types.DocumentFilter, options types.DocumentFilterOption) (types.PaginatedDocuments, error)
Get provides a mock function with given fields: ctx, filter, options
func (*StorageMock) GetAllDatasources ¶
func (_m *StorageMock) GetAllDatasources(ctx context.Context, page int, perPage int) (*types.PaginatedDatasources, error)
GetAllDatasources provides a mock function with given fields: ctx, page, perPage
func (*StorageMock) GetAllEmbeddingProviders ¶
func (_m *StorageMock) GetAllEmbeddingProviders(ctx context.Context, filter types.EmbeddingProviderFilter, option types.EmbeddingProviderFilterOption) (*types.PaginatedEmbeddingProviders, error)
GetAllEmbeddingProviders provides a mock function with given fields: ctx, filter, option
func (*StorageMock) GetAllInteractions ¶
func (_m *StorageMock) GetAllInteractions(ctx context.Context, page int, perPage int) (*types.PaginatedInteractions, error)
GetAllInteractions provides a mock function with given fields: ctx, page, perPage
func (*StorageMock) GetAllLLMProviders ¶
func (_m *StorageMock) GetAllLLMProviders(ctx context.Context, filter types.LLMProviderFilter, option types.LLMProviderFilterOption) (*types.PaginatedLLMProviders, error)
GetAllLLMProviders provides a mock function with given fields: ctx, filter, option
func (*StorageMock) GetAnalyticsOverview ¶
func (_m *StorageMock) GetAnalyticsOverview(ctx context.Context) (types.AnalyticsOverview, error)
GetAnalyticsOverview provides a mock function with given fields: ctx
func (*StorageMock) GetConversation ¶
func (_m *StorageMock) GetConversation(ctx context.Context, interactionUUID uuid.UUID) ([]types.Conversation, error)
GetConversation provides a mock function with given fields: ctx, interactionUUID
func (*StorageMock) GetDatasource ¶
func (_m *StorageMock) GetDatasource(ctx context.Context, _a1 uuid.UUID) (types.DatasourceConfig, error)
GetDatasource provides a mock function with given fields: ctx, _a1
func (*StorageMock) GetEmbeddingProvider ¶
func (_m *StorageMock) GetEmbeddingProvider(ctx context.Context, id uuid.UUID) (*types.EmbeddingProviderConfig, error)
GetEmbeddingProvider provides a mock function with given fields: ctx, id
func (*StorageMock) GetForProcessing ¶
func (_m *StorageMock) GetForProcessing(ctx context.Context, filter types.DocumentFilter, batchLimit int) ([]uuid.UUID, error)
GetForProcessing provides a mock function with given fields: ctx, filter, batchLimit
func (*StorageMock) GetInteraction ¶
func (_m *StorageMock) GetInteraction(ctx context.Context, _a1 uuid.UUID) (types.Interaction, error)
GetInteraction provides a mock function with given fields: ctx, _a1
func (*StorageMock) GetKeyPair ¶
func (_m *StorageMock) GetKeyPair() ([]byte, []byte, error)
GetKeyPair provides a mock function with given fields:
func (*StorageMock) GetLLMProvider ¶
func (_m *StorageMock) GetLLMProvider(ctx context.Context, _a1 uuid.UUID) (*types.LLMProviderConfig, error)
GetLLMProvider provides a mock function with given fields: ctx, _a1
func (*StorageMock) GetPaginatedUsers ¶
func (_m *StorageMock) GetPaginatedUsers(ctx context.Context, filter types.UserFilter, option types.UserFilterOption) (types.PaginatedUsers, error)
GetPaginatedUsers provides a mock function with given fields: ctx, filter, option
func (*StorageMock) GetSettings ¶
GetSettings provides a mock function with given fields: ctx
func (*StorageMock) HandleShutdown ¶
func (_m *StorageMock) HandleShutdown(ctx context.Context) error
HandleShutdown provides a mock function with given fields: ctx
func (*StorageMock) HealthCheck ¶
func (_m *StorageMock) HealthCheck() error
HealthCheck provides a mock function with given fields:
func (*StorageMock) RecordAIOpsUsage ¶
RecordAIOpsUsage provides a mock function with given fields: ctx, usage
func (*StorageMock) RunMigration ¶
func (_m *StorageMock) RunMigration() error
RunMigration provides a mock function with given fields:
func (*StorageMock) Search ¶
func (_m *StorageMock) Search(ctx context.Context, config types.SearchConfig) (*types.SearchResults, error)
Search provides a mock function with given fields: ctx, config
func (*StorageMock) SetActiveDatasource ¶
SetActiveDatasource provides a mock function with given fields: ctx, _a1
func (*StorageMock) SetActiveEmbeddingProvider ¶
SetActiveEmbeddingProvider provides a mock function with given fields: ctx, _a1
func (*StorageMock) SetActiveLLMProvider ¶
SetActiveLLMProvider provides a mock function with given fields: ctx, id
func (*StorageMock) SetDisableDatasource ¶
SetDisableDatasource provides a mock function with given fields: ctx, _a1
func (*StorageMock) SetDisableEmbeddingProvider ¶
SetDisableEmbeddingProvider provides a mock function with given fields: ctx, _a1
func (*StorageMock) SetDisableLLMProvider ¶
SetDisableLLMProvider provides a mock function with given fields: ctx, id
func (*StorageMock) UpdateDatasource ¶
func (_m *StorageMock) UpdateDatasource(ctx context.Context, _a1 uuid.UUID, settings types.DatasourceSettings, state types.DatasourceState) error
UpdateDatasource provides a mock function with given fields: ctx, _a1, settings, state
func (*StorageMock) UpdateEmbeddingProvider ¶
func (_m *StorageMock) UpdateEmbeddingProvider(ctx context.Context, provider types.EmbeddingProviderConfig) error
UpdateEmbeddingProvider provides a mock function with given fields: ctx, provider
func (*StorageMock) UpdateKeyPair ¶
func (_m *StorageMock) UpdateKeyPair(privateKey []byte, publicKey []byte) error
UpdateKeyPair provides a mock function with given fields: privateKey, publicKey
func (*StorageMock) UpdateLLMProvider ¶
func (_m *StorageMock) UpdateLLMProvider(ctx context.Context, provider types.LLMProviderConfig) error
UpdateLLMProvider provides a mock function with given fields: ctx, provider
func (*StorageMock) UpdateSettings ¶
UpdateSettings provides a mock function with given fields: ctx, settings
func (*StorageMock) UpdateUserRoles ¶
func (_m *StorageMock) UpdateUserRoles(ctx context.Context, _a1 uuid.UUID, roles []types.UserRole) error
UpdateUserRoles provides a mock function with given fields: ctx, _a1, roles
func (*StorageMock) UpdateUserStatus ¶
func (_m *StorageMock) UpdateUserStatus(ctx context.Context, _a1 uuid.UUID, status types.UserStatus) error
UpdateUserStatus provides a mock function with given fields: ctx, _a1, status