diff options
Diffstat (limited to 'storage/storage.go')
-rw-r--r-- | storage/storage.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/storage/storage.go b/storage/storage.go index 67b8dd8..7d0d941 100644 --- a/storage/storage.go +++ b/storage/storage.go @@ -8,6 +8,11 @@ import ( "github.com/jmoiron/sqlx" ) +type FullRepo interface { + ChatHistory + Memories +} + type ChatHistory interface { ListChats() ([]models.Chat, error) GetChatByID(id uint32) (*models.Chat, error) @@ -61,7 +66,7 @@ func (p ProviderSQL) RemoveChat(id uint32) error { return err } -func NewProviderSQL(dbPath string, logger *slog.Logger) ChatHistory { +func NewProviderSQL(dbPath string, logger *slog.Logger) FullRepo { db, err := sqlx.Open("sqlite", dbPath) if err != nil { panic(err) |