postgres

package
v0.0.0-...-5bc5eca Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2026 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ForceImport = 0

ForceImport is a no-op variable that can be referenced to ensure this package's init() runs.

Functions

This section is empty.

Types

type ConflictError

type ConflictError = registrystore.ConflictError

type ForbiddenError

type ForbiddenError = registrystore.ForbiddenError

type NotFoundError

type NotFoundError = registrystore.NotFoundError

Re-export error types from registry/store for backward compatibility.

type PostgresStore

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

PostgresStore implements MemoryStore using GORM + PostgreSQL.

func (*PostgresStore) AcceptTransfer

func (s *PostgresStore) AcceptTransfer(ctx context.Context, userID string, transferID uuid.UUID) error

func (*PostgresStore) AdminDeleteAttachment

func (s *PostgresStore) AdminDeleteAttachment(ctx context.Context, attachmentID uuid.UUID) error

func (*PostgresStore) AdminGetAttachment

func (s *PostgresStore) AdminGetAttachment(ctx context.Context, attachmentID uuid.UUID) (*registrystore.AdminAttachment, error)

func (*PostgresStore) AdminGetAttachmentByStorageKey

func (s *PostgresStore) AdminGetAttachmentByStorageKey(ctx context.Context, storageKey string) (*registrystore.AdminAttachment, error)

func (*PostgresStore) AdminGetConversation

func (s *PostgresStore) AdminGetConversation(ctx context.Context, conversationID uuid.UUID) (*registrystore.ConversationDetail, error)

func (*PostgresStore) AdminGetEntries

func (s *PostgresStore) AdminGetEntries(ctx context.Context, conversationID uuid.UUID, query registrystore.AdminMessageQuery) (*registrystore.PagedEntries, error)

func (*PostgresStore) AdminListAttachments

func (*PostgresStore) AdminListChildConversations

func (s *PostgresStore) AdminListChildConversations(ctx context.Context, conversationID uuid.UUID, afterCursor *string, limit int) ([]registrystore.ConversationSummary, *string, error)

func (*PostgresStore) AdminListConversations

func (*PostgresStore) AdminListForks

func (s *PostgresStore) AdminListForks(ctx context.Context, conversationID uuid.UUID, afterCursor *string, limit int) ([]registrystore.ConversationForkSummary, *string, error)

func (*PostgresStore) AdminListMemberships

func (s *PostgresStore) AdminListMemberships(ctx context.Context, conversationID uuid.UUID, afterCursor *string, limit int) ([]model.ConversationMembership, *string, error)

func (*PostgresStore) AdminSearchEntries

func (*PostgresStore) AdminSetConversationArchived

func (s *PostgresStore) AdminSetConversationArchived(ctx context.Context, conversationID uuid.UUID, archived bool) error

func (*PostgresStore) AdminStatsSummary

func (s *PostgresStore) AdminStatsSummary(ctx context.Context) (*registrystore.AdminStatsSummary, error)

func (*PostgresStore) AppendEntries

func (s *PostgresStore) AppendEntries(ctx context.Context, userID string, conversationID uuid.UUID, entries []registrystore.CreateEntryRequest, clientID *string, agentID *string, epoch *int64) ([]model.Entry, error)

func (*PostgresStore) AppendOutboxEvents

func (s *PostgresStore) AppendOutboxEvents(ctx context.Context, events []registrystore.OutboxWrite) ([]registrystore.OutboxEvent, error)

func (*PostgresStore) ArchiveConversation

func (s *PostgresStore) ArchiveConversation(ctx context.Context, userID string, conversationID uuid.UUID) error

func (*PostgresStore) ClaimReadyTasks

func (s *PostgresStore) ClaimReadyTasks(ctx context.Context, limit int) ([]model.Task, error)

func (*PostgresStore) CountEvictableGroups

func (s *PostgresStore) CountEvictableGroups(ctx context.Context, cutoff time.Time) (int64, error)

func (*PostgresStore) CreateAttachment

func (s *PostgresStore) CreateAttachment(ctx context.Context, userID string, conversationID uuid.UUID, attachment model.Attachment) (*model.Attachment, error)

func (*PostgresStore) CreateConversation

func (s *PostgresStore) CreateConversation(ctx context.Context, userID string, clientID string, title string, metadata map[string]interface{}, agentID *string, forkedAtConversationID *uuid.UUID, forkedAtEntryID *uuid.UUID) (*registrystore.ConversationDetail, error)

func (*PostgresStore) CreateConversationWithID

func (s *PostgresStore) CreateConversationWithID(ctx context.Context, userID string, clientID string, convID uuid.UUID, title string, metadata map[string]interface{}, agentID *string, forkedAtConversationID *uuid.UUID, forkedAtEntryID *uuid.UUID) (*registrystore.ConversationDetail, error)

func (*PostgresStore) CreateOwnershipTransfer

func (s *PostgresStore) CreateOwnershipTransfer(ctx context.Context, userID string, conversationID uuid.UUID, toUserID string) (*registrystore.OwnershipTransferDto, error)

func (*PostgresStore) CreateTask

func (s *PostgresStore) CreateTask(ctx context.Context, taskType string, taskBody map[string]interface{}) error

func (*PostgresStore) DeleteAttachment

func (s *PostgresStore) DeleteAttachment(ctx context.Context, userID string, conversationID uuid.UUID, attachmentID uuid.UUID) error

func (*PostgresStore) DeleteMembership

func (s *PostgresStore) DeleteMembership(ctx context.Context, userID string, conversationID uuid.UUID, memberUserID string) error

func (*PostgresStore) DeleteTask

func (s *PostgresStore) DeleteTask(ctx context.Context, taskID uuid.UUID) error

func (*PostgresStore) DeleteTransfer

func (s *PostgresStore) DeleteTransfer(ctx context.Context, userID string, transferID uuid.UUID) error

func (*PostgresStore) EvictOutboxEventsBefore

func (s *PostgresStore) EvictOutboxEventsBefore(ctx context.Context, before time.Time, limit int) (int64, error)

func (*PostgresStore) FailTask

func (s *PostgresStore) FailTask(ctx context.Context, taskID uuid.UUID, errMsg string, retryDelay time.Duration) error

func (*PostgresStore) FetchSearchResultDetails

func (s *PostgresStore) FetchSearchResultDetails(ctx context.Context, userID string, entryIDs []uuid.UUID, includeEntry bool) ([]registrystore.SearchResult, error)

func (*PostgresStore) FindEntriesPendingVectorIndexing

func (s *PostgresStore) FindEntriesPendingVectorIndexing(ctx context.Context, limit int) ([]model.Entry, error)

func (*PostgresStore) FindEvictableGroupIDs

func (s *PostgresStore) FindEvictableGroupIDs(ctx context.Context, cutoff time.Time, limit int) ([]uuid.UUID, error)

func (*PostgresStore) GetAttachment

func (s *PostgresStore) GetAttachment(ctx context.Context, userID string, conversationID uuid.UUID, attachmentID uuid.UUID) (*model.Attachment, error)

func (*PostgresStore) GetConversation

func (s *PostgresStore) GetConversation(ctx context.Context, userID string, conversationID uuid.UUID) (*registrystore.ConversationDetail, error)

func (*PostgresStore) GetEntries

func (s *PostgresStore) GetEntries(ctx context.Context, userID string, conversationID uuid.UUID, afterEntryID *string, limit int, channel *model.Channel, epochFilter *registrystore.MemoryEpochFilter, clientID *string, agentID *string, allForks bool) (*registrystore.PagedEntries, error)

func (*PostgresStore) GetEntryGroupID

func (s *PostgresStore) GetEntryGroupID(ctx context.Context, entryID uuid.UUID) (uuid.UUID, error)

func (*PostgresStore) GetGroupMemberUserIDs

func (s *PostgresStore) GetGroupMemberUserIDs(ctx context.Context, conversationGroupID uuid.UUID) ([]string, error)

func (*PostgresStore) GetTransfer

func (s *PostgresStore) GetTransfer(ctx context.Context, userID string, transferID uuid.UUID) (*registrystore.OwnershipTransferDto, error)

func (*PostgresStore) HardDeleteConversationGroups

func (s *PostgresStore) HardDeleteConversationGroups(ctx context.Context, groupIDs []uuid.UUID) error

func (*PostgresStore) InReadTx

func (s *PostgresStore) InReadTx(ctx context.Context, fn func(context.Context) error) error

func (*PostgresStore) InWriteTx

func (s *PostgresStore) InWriteTx(ctx context.Context, fn func(context.Context) error) error

func (*PostgresStore) ListAttachments

func (s *PostgresStore) ListAttachments(ctx context.Context, userID string, conversationID uuid.UUID, afterCursor *string, limit int) ([]model.Attachment, *string, error)

func (*PostgresStore) ListChildConversations

func (s *PostgresStore) ListChildConversations(ctx context.Context, userID string, conversationID uuid.UUID, afterCursor *string, limit int) ([]registrystore.ConversationSummary, *string, error)

func (*PostgresStore) ListConversationGroupIDs

func (s *PostgresStore) ListConversationGroupIDs(ctx context.Context, userID string) ([]uuid.UUID, error)

func (*PostgresStore) ListConversations

func (s *PostgresStore) ListConversations(ctx context.Context, userID string, query *string, afterCursor *string, limit int, mode model.ConversationListMode, ancestry model.ConversationAncestryFilter, archived registrystore.ArchiveFilter) ([]registrystore.ConversationSummary, *string, error)

func (*PostgresStore) ListForks

func (s *PostgresStore) ListForks(ctx context.Context, userID string, conversationID uuid.UUID, afterCursor *string, limit int) ([]registrystore.ConversationForkSummary, *string, error)

func (*PostgresStore) ListMemberships

func (s *PostgresStore) ListMemberships(ctx context.Context, userID string, conversationID uuid.UUID, afterCursor *string, limit int) ([]model.ConversationMembership, *string, error)

func (*PostgresStore) ListOutboxEvents

func (*PostgresStore) ListPendingTransfers

func (s *PostgresStore) ListPendingTransfers(ctx context.Context, userID string, role string, afterCursor *string, limit int) ([]registrystore.OwnershipTransferDto, *string, error)

func (*PostgresStore) ListUnindexedEntries

func (s *PostgresStore) ListUnindexedEntries(ctx context.Context, limit int, afterCursor *string) ([]model.Entry, *string, error)

func (*PostgresStore) LoadDeletedConversationGroups

func (s *PostgresStore) LoadDeletedConversationGroups(ctx context.Context, groupIDs []uuid.UUID) ([]registrystore.DeletedConversationGroup, error)

func (*PostgresStore) OutboxEnabled

func (s *PostgresStore) OutboxEnabled() bool

func (*PostgresStore) RelayPublishesOutboxEvents

func (s *PostgresStore) RelayPublishesOutboxEvents() bool

func (*PostgresStore) SearchEntries

func (s *PostgresStore) SearchEntries(ctx context.Context, userID string, query string, afterCursor *string, limit int, includeEntry bool, groupByConversation bool) (*registrystore.SearchResults, error)

func (*PostgresStore) SetIndexedAt

func (s *PostgresStore) SetIndexedAt(ctx context.Context, entryID uuid.UUID, conversationGroupID uuid.UUID, indexedAt time.Time) error

func (*PostgresStore) ShareConversation

func (s *PostgresStore) ShareConversation(ctx context.Context, userID string, conversationID uuid.UUID, targetUserID string, accessLevel model.AccessLevel) (*model.ConversationMembership, error)

func (*PostgresStore) StartOutboxRelay

func (s *PostgresStore) StartOutboxRelay(ctx context.Context, bus registryeventbus.EventBus) error

func (*PostgresStore) SyncAgentEntry

func (s *PostgresStore) SyncAgentEntry(ctx context.Context, userID string, conversationID uuid.UUID, entry registrystore.CreateEntryRequest, clientID string, agentID *string) (*registrystore.SyncResult, error)

func (*PostgresStore) UnarchiveConversation

func (s *PostgresStore) UnarchiveConversation(ctx context.Context, userID string, conversationID uuid.UUID) error

func (*PostgresStore) UpdateAttachment

func (s *PostgresStore) UpdateAttachment(ctx context.Context, userID string, attachmentID uuid.UUID, update registrystore.AttachmentUpdate) (*model.Attachment, error)

func (*PostgresStore) UpdateConversation

func (s *PostgresStore) UpdateConversation(ctx context.Context, userID string, conversationID uuid.UUID, title *string, metadata map[string]interface{}) (*registrystore.ConversationDetail, error)

func (*PostgresStore) UpdateMembership

func (s *PostgresStore) UpdateMembership(ctx context.Context, userID string, conversationID uuid.UUID, memberUserID string, accessLevel model.AccessLevel) (*model.ConversationMembership, error)

type ValidationError

type ValidationError = registrystore.ValidationError

Jump to

Keyboard shortcuts

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