postgres

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 38 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 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) AdminAcquireCheckpointLease added in v0.3.0

func (s *PostgresStore) AdminAcquireCheckpointLease(ctx context.Context, clientID, token string, ttl time.Duration) (*registrystore.ClientCheckpointLease, 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) AdminGetCheckpoint

func (s *PostgresStore) AdminGetCheckpoint(ctx context.Context, clientID string) (*registrystore.ClientCheckpoint, error)

func (*PostgresStore) AdminGetConversation

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

func (*PostgresStore) AdminGetEntries

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

func (*PostgresStore) AdminGetEntryByID

func (s *PostgresStore) AdminGetEntryByID(ctx context.Context, entryID uuid.UUID) (*model.Entry, error)

func (*PostgresStore) AdminListAttachments

func (*PostgresStore) AdminListChildConversations

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

func (*PostgresStore) AdminListConversations

func (*PostgresStore) AdminListEventSnapshotEntries added in v0.3.0

func (*PostgresStore) AdminListForks

func (s *PostgresStore) AdminListForks(ctx context.Context, conversationID string) (*registrystore.ConversationForkNavigation, error)

func (*PostgresStore) AdminListMemberships

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

func (*PostgresStore) AdminPutCheckpoint

func (*PostgresStore) AdminPutCheckpointCAS added in v0.3.0

func (*PostgresStore) AdminReleaseCheckpointLease added in v0.3.0

func (s *PostgresStore) AdminReleaseCheckpointLease(ctx context.Context, clientID, token string) error

func (*PostgresStore) AdminRenewCheckpointLease added in v0.3.0

func (s *PostgresStore) AdminRenewCheckpointLease(ctx context.Context, clientID, token string, ttl time.Duration) (*registrystore.ClientCheckpointLease, error)

func (*PostgresStore) AdminSearchEntries

func (*PostgresStore) AdminSetConversationArchived

func (s *PostgresStore) AdminSetConversationArchived(ctx context.Context, conversationID string, 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 string, entries []registrystore.CreateEntryRequest, clientID *string, agentID *string, epoch *int64) ([]model.Entry, error)

func (*PostgresStore) AppendEntriesBeforeUnarchive added in v0.2.0

func (s *PostgresStore) AppendEntriesBeforeUnarchive(ctx context.Context, userID string, conversationID string, 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 string) error

func (*PostgresStore) ArchiveConversationIfNeeded added in v0.2.0

func (s *PostgresStore) ArchiveConversationIfNeeded(ctx context.Context, userID string, conversationID string) (registrystore.ArchiveConversationResult, 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 string, 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 *string, forkedAtEntryID *uuid.UUID) (*registrystore.ConversationDetail, error)

func (*PostgresStore) CreateConversationWithID

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

func (*PostgresStore) CreateOwnershipTransfer

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

func (*PostgresStore) CreateTask

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

func (*PostgresStore) CurrentOutboxCursor added in v0.3.0

func (s *PostgresStore) CurrentOutboxCursor(ctx context.Context) (string, error)

func (*PostgresStore) DeleteAttachment

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

func (*PostgresStore) DeleteMembership

func (s *PostgresStore) DeleteMembership(ctx context.Context, userID string, conversationID string, 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 string, attachmentID uuid.UUID) (*model.Attachment, error)

func (*PostgresStore) GetConversation

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

func (*PostgresStore) GetEntries

func (s *PostgresStore) GetEntries(ctx context.Context, userID string, conversationID string, query registrystore.EntryListQuery) (*registrystore.PagedEntries, error)

func (*PostgresStore) GetEntriesBySequence added in v0.2.0

func (s *PostgresStore) GetEntriesBySequence(ctx context.Context, userID string, conversationID string, sequences []uint32) ([]model.Entry, 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) LinkAttachmentToEntry added in v0.2.0

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

func (*PostgresStore) ListChildConversations

func (s *PostgresStore) ListChildConversations(ctx context.Context, userID string, conversationID string, 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 (*PostgresStore) ListForks

func (s *PostgresStore) ListForks(ctx context.Context, userID string, conversationID string, clientID *string) (*registrystore.ConversationForkNavigation, error)

func (*PostgresStore) ListMemberships

func (s *PostgresStore) ListMemberships(ctx context.Context, userID string, conversationID string, 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) RecoverAppendBatch added in v0.4.0

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 string, 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 string, entry registrystore.CreateEntryRequest, clientID string, agentID *string) (*registrystore.SyncResult, error)

func (*PostgresStore) UnarchiveConversation

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

func (*PostgresStore) UnarchiveConversationIfNeeded added in v0.2.0

func (s *PostgresStore) UnarchiveConversationIfNeeded(ctx context.Context, userID string, conversationID string) (registrystore.UnarchiveConversationResult, 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 string, title *string, metadata registrystore.MetadataPatch) (*registrystore.ConversationDetail, error)

func (*PostgresStore) UpdateMembership

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

Jump to

Keyboard shortcuts

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