Documentation
¶
Index ¶
- func NewPool(ctx context.Context) (*pgxpool.Pool, error)
- type HiveshareStore
- func (s *HiveshareStore) AcceptInvitation(ctx context.Context, token string) error
- func (s *HiveshareStore) AddMember(ctx context.Context, hiveshareID, userID, invitedBy uuid.UUID, role string) error
- func (s *HiveshareStore) Create(ctx context.Context, name, description string, ownerID uuid.UUID) (*models.Hiveshare, error)
- func (s *HiveshareStore) CreateInvitation(ctx context.Context, inv *models.Invitation) error
- func (s *HiveshareStore) Delete(ctx context.Context, id uuid.UUID) error
- func (s *HiveshareStore) Get(ctx context.Context, id, userID uuid.UUID) (*models.Hiveshare, error)
- func (s *HiveshareStore) GetInvitation(ctx context.Context, token string) (*models.Invitation, error)
- func (s *HiveshareStore) IsMember(ctx context.Context, hiveshareID, userID uuid.UUID) (string, error)
- func (s *HiveshareStore) ListForUser(ctx context.Context, userID uuid.UUID) ([]*models.Hiveshare, error)
- func (s *HiveshareStore) ListMembers(ctx context.Context, hiveshareID uuid.UUID) ([]*models.Member, error)
- func (s *HiveshareStore) RemoveMember(ctx context.Context, hiveshareID, userID uuid.UUID) error
- func (s *HiveshareStore) Update(ctx context.Context, id uuid.UUID, name, description string) (*models.Hiveshare, error)
- type ListMemoryFilter
- type MemoryStore
- func (s *MemoryStore) Create(ctx context.Context, e *models.MemoryEntry, embedding []float32) (*models.MemoryEntry, error)
- func (s *MemoryStore) Delete(ctx context.Context, id, hiveshareID uuid.UUID) error
- func (s *MemoryStore) Get(ctx context.Context, id, hiveshareID uuid.UUID) (*models.MemoryEntry, error)
- func (s *MemoryStore) IncrementReuse(ctx context.Context, id uuid.UUID) error
- func (s *MemoryStore) List(ctx context.Context, hiveshareID uuid.UUID, f ListMemoryFilter) ([]*models.MemoryEntry, error)
- func (s *MemoryStore) SearchFullText(ctx context.Context, hiveshareID uuid.UUID, query, sourceType string, ...) ([]*models.MemoryEntry, error)
- func (s *MemoryStore) SearchVector(ctx context.Context, hiveshareID uuid.UUID, embedding []float32, ...) ([]*models.MemoryEntry, error)
- func (s *MemoryStore) Update(ctx context.Context, id, hiveshareID uuid.UUID, content, summary string, ...) (*models.MemoryEntry, error)
- type MetricsStore
- type UserStore
- func (s *UserStore) Create(ctx context.Context, email, name string) (*models.User, error)
- func (s *UserStore) GetByAPIKey(ctx context.Context, key string) (*models.User, error)
- func (s *UserStore) GetByEmail(ctx context.Context, email string) (*models.User, error)
- func (s *UserStore) GetByID(ctx context.Context, id uuid.UUID) (*models.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HiveshareStore ¶
type HiveshareStore struct {
// contains filtered or unexported fields
}
func NewHiveshareStore ¶
func NewHiveshareStore(db *pgxpool.Pool) *HiveshareStore
func (*HiveshareStore) AcceptInvitation ¶
func (s *HiveshareStore) AcceptInvitation(ctx context.Context, token string) error
func (*HiveshareStore) CreateInvitation ¶
func (s *HiveshareStore) CreateInvitation(ctx context.Context, inv *models.Invitation) error
CreateInvitation creates a pending invitation.
func (*HiveshareStore) GetInvitation ¶
func (s *HiveshareStore) GetInvitation(ctx context.Context, token string) (*models.Invitation, error)
func (*HiveshareStore) ListForUser ¶
func (*HiveshareStore) ListMembers ¶
func (*HiveshareStore) RemoveMember ¶
type ListMemoryFilter ¶
type MemoryStore ¶
type MemoryStore struct {
// contains filtered or unexported fields
}
func NewMemoryStore ¶
func NewMemoryStore(db *pgxpool.Pool) *MemoryStore
func (*MemoryStore) Create ¶
func (s *MemoryStore) Create(ctx context.Context, e *models.MemoryEntry, embedding []float32) (*models.MemoryEntry, error)
func (*MemoryStore) Get ¶
func (s *MemoryStore) Get(ctx context.Context, id, hiveshareID uuid.UUID) (*models.MemoryEntry, error)
func (*MemoryStore) IncrementReuse ¶
func (*MemoryStore) List ¶
func (s *MemoryStore) List(ctx context.Context, hiveshareID uuid.UUID, f ListMemoryFilter) ([]*models.MemoryEntry, error)
func (*MemoryStore) SearchFullText ¶
func (s *MemoryStore) SearchFullText(ctx context.Context, hiveshareID uuid.UUID, query, sourceType string, limit int) ([]*models.MemoryEntry, error)
SearchFullText performs PostgreSQL full-text search.
func (*MemoryStore) SearchVector ¶
func (s *MemoryStore) SearchVector(ctx context.Context, hiveshareID uuid.UUID, embedding []float32, sourceType string, limit int) ([]*models.MemoryEntry, error)
SearchVector performs cosine similarity search.
type MetricsStore ¶
type MetricsStore struct {
// contains filtered or unexported fields
}
func NewMetricsStore ¶
func NewMetricsStore(db *pgxpool.Pool) *MetricsStore
func (*MetricsStore) HiveshareMetrics ¶
func (s *MetricsStore) HiveshareMetrics(ctx context.Context, hsID uuid.UUID) (*models.HiveshareMetrics, error)
func (*MetricsStore) RecordEvent ¶
func (s *MetricsStore) RecordEvent(ctx context.Context, ev *models.UsageEvent) error
func (*MetricsStore) UserMetrics ¶
func (s *MetricsStore) UserMetrics(ctx context.Context, userID uuid.UUID) (*models.UserMetrics, error)
type UserStore ¶
type UserStore struct {
// contains filtered or unexported fields
}
func NewUserStore ¶
func (*UserStore) GetByAPIKey ¶
func (*UserStore) GetByEmail ¶
Click to show internal directories.
Click to hide internal directories.