Added code for backend glue

This commit is contained in:
2025-10-13 19:20:24 -04:00
parent 692b069b5b
commit 29a451ab58
25 changed files with 1063 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
package glue
import (
"context"
"mind/internal/db"
"mind/internal/models"
)
type Glue struct { repo *db.Repo }
func NewGlue(r *db.Repo) *Glue { return &Glue{repo: r} }
func (g *Glue) CreateConversation(ctx context.Context, ownerID int64, title string) (int64, error) {
return g.repo.CreateConversation(ctx, ownerID, title)
}
func (g *Glue) ListConversations(ctx context.Context, ownerID int64) ([]models.Conversation, error) {
return g.repo.ListConversations(ctx, ownerID)
}