Documentation
¶
Overview ¶
Package server implements the Creel gRPC server.
Index ¶
- type AdminServer
- func (s *AdminServer) CreateSystemAccount(ctx context.Context, req *pb.CreateSystemAccountRequest) (*pb.CreateSystemAccountResponse, error)
- func (s *AdminServer) DeleteSystemAccount(ctx context.Context, req *pb.DeleteSystemAccountRequest) (*pb.DeleteSystemAccountResponse, error)
- func (s *AdminServer) GetStats(ctx context.Context, _ *pb.GetStatsRequest) (*pb.GetStatsResponse, error)
- func (s *AdminServer) Health(ctx context.Context, _ *pb.HealthRequest) (*pb.HealthResponse, error)
- func (s *AdminServer) ListSystemAccounts(ctx context.Context, _ *pb.ListSystemAccountsRequest) (*pb.ListSystemAccountsResponse, error)
- func (s *AdminServer) RevokeKey(ctx context.Context, req *pb.RevokeKeyRequest) (*pb.RevokeKeyResponse, error)
- func (s *AdminServer) RotateKey(ctx context.Context, req *pb.RotateKeyRequest) (*pb.RotateKeyResponse, error)
- type ChunkServer
- func (s *ChunkServer) DeleteChunk(ctx context.Context, req *pb.DeleteChunkRequest) (*pb.DeleteChunkResponse, error)
- func (s *ChunkServer) GetChunk(ctx context.Context, req *pb.GetChunkRequest) (*pb.Chunk, error)
- func (s *ChunkServer) IngestChunks(ctx context.Context, req *pb.IngestChunksRequest) (*pb.IngestChunksResponse, error)
- type CompactionServer
- func (s *CompactionServer) Compact(ctx context.Context, req *pb.CompactRequest) (*pb.CompactResponse, error)
- func (s *CompactionServer) GetCompactionHistory(ctx context.Context, req *pb.GetCompactionHistoryRequest) (*pb.GetCompactionHistoryResponse, error)
- func (s *CompactionServer) RequestCompaction(ctx context.Context, req *pb.RequestCompactionRequest) (*pb.RequestCompactionResponse, error)
- func (s *CompactionServer) Uncompact(ctx context.Context, req *pb.UncompactRequest) (*pb.UncompactResponse, error)
- type ConfigServer
- func (s *ConfigServer) CreateAPIKeyConfig(ctx context.Context, req *pb.CreateAPIKeyConfigRequest) (*pb.APIKeyConfig, error)
- func (s *ConfigServer) CreateEmbeddingConfig(ctx context.Context, req *pb.CreateEmbeddingConfigRequest) (*pb.EmbeddingConfig, error)
- func (s *ConfigServer) CreateExtractionPromptConfig(ctx context.Context, req *pb.CreateExtractionPromptConfigRequest) (*pb.ExtractionPromptConfig, error)
- func (s *ConfigServer) CreateLLMConfig(ctx context.Context, req *pb.CreateLLMConfigRequest) (*pb.LLMConfig, error)
- func (s *ConfigServer) CreateVectorBackendConfig(ctx context.Context, req *pb.CreateVectorBackendConfigRequest) (*pb.VectorBackendConfig, error)
- func (s *ConfigServer) DeleteAPIKeyConfig(ctx context.Context, req *pb.DeleteAPIKeyConfigRequest) (*pb.DeleteAPIKeyConfigResponse, error)
- func (s *ConfigServer) DeleteEmbeddingConfig(ctx context.Context, req *pb.DeleteEmbeddingConfigRequest) (*pb.DeleteEmbeddingConfigResponse, error)
- func (s *ConfigServer) DeleteExtractionPromptConfig(ctx context.Context, req *pb.DeleteExtractionPromptConfigRequest) (*pb.DeleteExtractionPromptConfigResponse, error)
- func (s *ConfigServer) DeleteLLMConfig(ctx context.Context, req *pb.DeleteLLMConfigRequest) (*pb.DeleteLLMConfigResponse, error)
- func (s *ConfigServer) DeleteVectorBackendConfig(ctx context.Context, req *pb.DeleteVectorBackendConfigRequest) (*pb.DeleteVectorBackendConfigResponse, error)
- func (s *ConfigServer) GetAPIKeyConfig(ctx context.Context, req *pb.GetAPIKeyConfigRequest) (*pb.APIKeyConfig, error)
- func (s *ConfigServer) GetEmbeddingConfig(ctx context.Context, req *pb.GetEmbeddingConfigRequest) (*pb.EmbeddingConfig, error)
- func (s *ConfigServer) GetExtractionPromptConfig(ctx context.Context, req *pb.GetExtractionPromptConfigRequest) (*pb.ExtractionPromptConfig, error)
- func (s *ConfigServer) GetLLMConfig(ctx context.Context, req *pb.GetLLMConfigRequest) (*pb.LLMConfig, error)
- func (s *ConfigServer) GetVectorBackendConfig(ctx context.Context, req *pb.GetVectorBackendConfigRequest) (*pb.VectorBackendConfig, error)
- func (s *ConfigServer) ListAPIKeyConfigs(ctx context.Context, _ *pb.ListAPIKeyConfigsRequest) (*pb.ListAPIKeyConfigsResponse, error)
- func (s *ConfigServer) ListEmbeddingConfigs(ctx context.Context, _ *pb.ListEmbeddingConfigsRequest) (*pb.ListEmbeddingConfigsResponse, error)
- func (s *ConfigServer) ListExtractionPromptConfigs(ctx context.Context, _ *pb.ListExtractionPromptConfigsRequest) (*pb.ListExtractionPromptConfigsResponse, error)
- func (s *ConfigServer) ListLLMConfigs(ctx context.Context, _ *pb.ListLLMConfigsRequest) (*pb.ListLLMConfigsResponse, error)
- func (s *ConfigServer) ListVectorBackendConfigs(ctx context.Context, _ *pb.ListVectorBackendConfigsRequest) (*pb.ListVectorBackendConfigsResponse, error)
- func (s *ConfigServer) SetDefaultAPIKeyConfig(ctx context.Context, req *pb.SetDefaultAPIKeyConfigRequest) (*pb.APIKeyConfig, error)
- func (s *ConfigServer) SetDefaultEmbeddingConfig(ctx context.Context, req *pb.SetDefaultEmbeddingConfigRequest) (*pb.EmbeddingConfig, error)
- func (s *ConfigServer) SetDefaultExtractionPromptConfig(ctx context.Context, req *pb.SetDefaultExtractionPromptConfigRequest) (*pb.ExtractionPromptConfig, error)
- func (s *ConfigServer) SetDefaultLLMConfig(ctx context.Context, req *pb.SetDefaultLLMConfigRequest) (*pb.LLMConfig, error)
- func (s *ConfigServer) SetDefaultVectorBackendConfig(ctx context.Context, req *pb.SetDefaultVectorBackendConfigRequest) (*pb.VectorBackendConfig, error)
- func (s *ConfigServer) UpdateAPIKeyConfig(ctx context.Context, req *pb.UpdateAPIKeyConfigRequest) (*pb.APIKeyConfig, error)
- func (s *ConfigServer) UpdateEmbeddingConfig(ctx context.Context, req *pb.UpdateEmbeddingConfigRequest) (*pb.EmbeddingConfig, error)
- func (s *ConfigServer) UpdateExtractionPromptConfig(ctx context.Context, req *pb.UpdateExtractionPromptConfigRequest) (*pb.ExtractionPromptConfig, error)
- func (s *ConfigServer) UpdateLLMConfig(ctx context.Context, req *pb.UpdateLLMConfigRequest) (*pb.LLMConfig, error)
- func (s *ConfigServer) UpdateVectorBackendConfig(ctx context.Context, req *pb.UpdateVectorBackendConfigRequest) (*pb.VectorBackendConfig, error)
- type DocumentServer
- func (s *DocumentServer) CreateDocument(ctx context.Context, req *pb.CreateDocumentRequest) (*pb.Document, error)
- func (s *DocumentServer) DeleteDocument(ctx context.Context, req *pb.DeleteDocumentRequest) (*pb.DeleteDocumentResponse, error)
- func (s *DocumentServer) GetDocument(ctx context.Context, req *pb.GetDocumentRequest) (*pb.Document, error)
- func (s *DocumentServer) ListDocuments(ctx context.Context, req *pb.ListDocumentsRequest) (*pb.ListDocumentsResponse, error)
- func (s *DocumentServer) UpdateDocument(ctx context.Context, req *pb.UpdateDocumentRequest) (*pb.Document, error)
- func (s *DocumentServer) UploadDocument(ctx context.Context, req *pb.UploadDocumentRequest) (*pb.UploadDocumentResponse, error)
- type EmbeddingProvider
- type JobServer
- type LinkServer
- func (s *LinkServer) CreateLink(ctx context.Context, req *pb.CreateLinkRequest) (*pb.Link, error)
- func (s *LinkServer) DeleteLink(ctx context.Context, req *pb.DeleteLinkRequest) (*pb.DeleteLinkResponse, error)
- func (s *LinkServer) ListLinks(ctx context.Context, req *pb.ListLinksRequest) (*pb.ListLinksResponse, error)
- type MemoryServer
- func (s *MemoryServer) AddMemory(ctx context.Context, req *pb.AddMemoryRequest) (*pb.AddMemoryResponse, error)
- func (s *MemoryServer) AddMessages(ctx context.Context, req *pb.AddMessagesRequest) (*pb.AddMessagesResponse, error)
- func (s *MemoryServer) DeleteMemory(ctx context.Context, req *pb.DeleteMemoryRequest) (*pb.DeleteMemoryResponse, error)
- func (s *MemoryServer) GetMemories(ctx context.Context, req *pb.GetMemoriesRequest) (*pb.GetMemoriesResponse, error)
- func (s *MemoryServer) ListMemories(ctx context.Context, req *pb.ListMemoriesRequest) (*pb.ListMemoriesResponse, error)
- func (s *MemoryServer) ListScopes(ctx context.Context, _ *pb.ListScopesRequest) (*pb.ListScopesResponse, error)
- func (s *MemoryServer) UpdateMemory(ctx context.Context, req *pb.UpdateMemoryRequest) (*pb.Memory, error)
- type Pinger
- type RetrievalServer
- type Server
- type TopicServer
- func (s *TopicServer) CreateTopic(ctx context.Context, req *pb.CreateTopicRequest) (*pb.Topic, error)
- func (s *TopicServer) DeleteTopic(ctx context.Context, req *pb.DeleteTopicRequest) (*pb.DeleteTopicResponse, error)
- func (s *TopicServer) GetTopic(ctx context.Context, req *pb.GetTopicRequest) (*pb.Topic, error)
- func (s *TopicServer) GrantAccess(ctx context.Context, req *pb.GrantAccessRequest) (*pb.TopicGrant, error)
- func (s *TopicServer) ListGrants(ctx context.Context, req *pb.ListGrantsRequest) (*pb.ListGrantsResponse, error)
- func (s *TopicServer) ListTopics(ctx context.Context, _ *pb.ListTopicsRequest) (*pb.ListTopicsResponse, error)
- func (s *TopicServer) RevokeAccess(ctx context.Context, req *pb.RevokeAccessRequest) (*pb.RevokeAccessResponse, error)
- func (s *TopicServer) UpdateTopic(ctx context.Context, req *pb.UpdateTopicRequest) (*pb.Topic, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminServer ¶
type AdminServer struct {
pb.UnimplementedAdminServiceServer
// contains filtered or unexported fields
}
AdminServer implements the AdminService gRPC service.
func NewAdminServer ¶
func NewAdminServer(pinger Pinger, accountStore *store.SystemAccountStore, statsStore *store.StatsStore, version string) *AdminServer
NewAdminServer creates a new admin service.
func (*AdminServer) CreateSystemAccount ¶
func (s *AdminServer) CreateSystemAccount(ctx context.Context, req *pb.CreateSystemAccountRequest) (*pb.CreateSystemAccountResponse, error)
CreateSystemAccount creates a new system account and returns its initial API key.
func (*AdminServer) DeleteSystemAccount ¶
func (s *AdminServer) DeleteSystemAccount(ctx context.Context, req *pb.DeleteSystemAccountRequest) (*pb.DeleteSystemAccountResponse, error)
DeleteSystemAccount deletes a system account and its keys.
func (*AdminServer) GetStats ¶ added in v0.7.1
func (s *AdminServer) GetStats(ctx context.Context, _ *pb.GetStatsRequest) (*pb.GetStatsResponse, error)
GetStats returns row counts for all major entity tables.
func (*AdminServer) Health ¶
func (s *AdminServer) Health(ctx context.Context, _ *pb.HealthRequest) (*pb.HealthResponse, error)
Health checks database connectivity and returns server status.
func (*AdminServer) ListSystemAccounts ¶
func (s *AdminServer) ListSystemAccounts(ctx context.Context, _ *pb.ListSystemAccountsRequest) (*pb.ListSystemAccountsResponse, error)
ListSystemAccounts lists all system accounts.
func (*AdminServer) RevokeKey ¶
func (s *AdminServer) RevokeKey(ctx context.Context, req *pb.RevokeKeyRequest) (*pb.RevokeKeyResponse, error)
RevokeKey immediately revokes all active keys for the system account.
func (*AdminServer) RotateKey ¶
func (s *AdminServer) RotateKey(ctx context.Context, req *pb.RotateKeyRequest) (*pb.RotateKeyResponse, error)
RotateKey generates a new API key for the system account.
type ChunkServer ¶
type ChunkServer struct {
pb.UnimplementedChunkServiceServer
// contains filtered or unexported fields
}
ChunkServer implements the ChunkService gRPC service.
func NewChunkServer ¶
func NewChunkServer(chunkStore *store.ChunkStore, docStore *store.DocumentStore, jobStore *store.JobStore, backend vector.Backend, authorizer auth.Authorizer) *ChunkServer
NewChunkServer creates a new chunk service.
func (*ChunkServer) DeleteChunk ¶
func (s *ChunkServer) DeleteChunk(ctx context.Context, req *pb.DeleteChunkRequest) (*pb.DeleteChunkResponse, error)
DeleteChunk deletes a chunk and its embedding. Requires admin permission.
func (*ChunkServer) GetChunk ¶
func (s *ChunkServer) GetChunk(ctx context.Context, req *pb.GetChunkRequest) (*pb.Chunk, error)
GetChunk retrieves a chunk. Requires read permission on its topic.
func (*ChunkServer) IngestChunks ¶
func (s *ChunkServer) IngestChunks(ctx context.Context, req *pb.IngestChunksRequest) (*pb.IngestChunksResponse, error)
IngestChunks creates chunks and stores their embeddings. Requires write permission.
type CompactionServer ¶ added in v0.5.0
type CompactionServer struct {
pb.UnimplementedCompactionServiceServer
// contains filtered or unexported fields
}
CompactionServer implements the CompactionService gRPC service.
func NewCompactionServer ¶ added in v0.5.0
func NewCompactionServer( chunkStore *store.ChunkStore, linkStore *store.LinkStore, compactionStore *store.CompactionStore, docStore *store.DocumentStore, jobStore *store.JobStore, vectorBackend vector.Backend, authorizer auth.Authorizer, ) *CompactionServer
NewCompactionServer creates a new compaction service.
func (*CompactionServer) Compact ¶ added in v0.5.0
func (s *CompactionServer) Compact(ctx context.Context, req *pb.CompactRequest) (*pb.CompactResponse, error)
Compact performs synchronous, manual compaction. The caller supplies the summary content and optionally a pre-computed embedding.
func (*CompactionServer) GetCompactionHistory ¶ added in v0.5.0
func (s *CompactionServer) GetCompactionHistory(ctx context.Context, req *pb.GetCompactionHistoryRequest) (*pb.GetCompactionHistoryResponse, error)
GetCompactionHistory returns compaction records for a document.
func (*CompactionServer) RequestCompaction ¶ added in v0.5.0
func (s *CompactionServer) RequestCompaction(ctx context.Context, req *pb.RequestCompactionRequest) (*pb.RequestCompactionResponse, error)
RequestCompaction enqueues a background compaction job.
func (*CompactionServer) Uncompact ¶ added in v0.5.0
func (s *CompactionServer) Uncompact(ctx context.Context, req *pb.UncompactRequest) (*pb.UncompactResponse, error)
Uncompact reverses a compaction by restoring source chunks and removing the summary chunk.
type ConfigServer ¶ added in v0.1.5
type ConfigServer struct {
pb.UnimplementedConfigServiceServer
// contains filtered or unexported fields
}
ConfigServer implements the ConfigService gRPC service.
func NewConfigServer ¶ added in v0.1.5
func NewConfigServer( apiKeyStore *store.APIKeyConfigStore, llmStore *store.LLMConfigStore, embeddingStore *store.EmbeddingConfigStore, extractionPromptStore *store.ExtractionPromptConfigStore, vectorBackendStore *store.VectorBackendConfigStore, ) *ConfigServer
NewConfigServer creates a new config service.
func (*ConfigServer) CreateAPIKeyConfig ¶ added in v0.1.5
func (s *ConfigServer) CreateAPIKeyConfig(ctx context.Context, req *pb.CreateAPIKeyConfigRequest) (*pb.APIKeyConfig, error)
func (*ConfigServer) CreateEmbeddingConfig ¶ added in v0.1.5
func (s *ConfigServer) CreateEmbeddingConfig(ctx context.Context, req *pb.CreateEmbeddingConfigRequest) (*pb.EmbeddingConfig, error)
func (*ConfigServer) CreateExtractionPromptConfig ¶ added in v0.1.5
func (s *ConfigServer) CreateExtractionPromptConfig(ctx context.Context, req *pb.CreateExtractionPromptConfigRequest) (*pb.ExtractionPromptConfig, error)
func (*ConfigServer) CreateLLMConfig ¶ added in v0.1.5
func (s *ConfigServer) CreateLLMConfig(ctx context.Context, req *pb.CreateLLMConfigRequest) (*pb.LLMConfig, error)
func (*ConfigServer) CreateVectorBackendConfig ¶ added in v0.7.0
func (s *ConfigServer) CreateVectorBackendConfig(ctx context.Context, req *pb.CreateVectorBackendConfigRequest) (*pb.VectorBackendConfig, error)
func (*ConfigServer) DeleteAPIKeyConfig ¶ added in v0.1.5
func (s *ConfigServer) DeleteAPIKeyConfig(ctx context.Context, req *pb.DeleteAPIKeyConfigRequest) (*pb.DeleteAPIKeyConfigResponse, error)
func (*ConfigServer) DeleteEmbeddingConfig ¶ added in v0.1.5
func (s *ConfigServer) DeleteEmbeddingConfig(ctx context.Context, req *pb.DeleteEmbeddingConfigRequest) (*pb.DeleteEmbeddingConfigResponse, error)
func (*ConfigServer) DeleteExtractionPromptConfig ¶ added in v0.1.5
func (s *ConfigServer) DeleteExtractionPromptConfig(ctx context.Context, req *pb.DeleteExtractionPromptConfigRequest) (*pb.DeleteExtractionPromptConfigResponse, error)
func (*ConfigServer) DeleteLLMConfig ¶ added in v0.1.5
func (s *ConfigServer) DeleteLLMConfig(ctx context.Context, req *pb.DeleteLLMConfigRequest) (*pb.DeleteLLMConfigResponse, error)
func (*ConfigServer) DeleteVectorBackendConfig ¶ added in v0.7.0
func (s *ConfigServer) DeleteVectorBackendConfig(ctx context.Context, req *pb.DeleteVectorBackendConfigRequest) (*pb.DeleteVectorBackendConfigResponse, error)
func (*ConfigServer) GetAPIKeyConfig ¶ added in v0.1.5
func (s *ConfigServer) GetAPIKeyConfig(ctx context.Context, req *pb.GetAPIKeyConfigRequest) (*pb.APIKeyConfig, error)
func (*ConfigServer) GetEmbeddingConfig ¶ added in v0.1.5
func (s *ConfigServer) GetEmbeddingConfig(ctx context.Context, req *pb.GetEmbeddingConfigRequest) (*pb.EmbeddingConfig, error)
func (*ConfigServer) GetExtractionPromptConfig ¶ added in v0.1.5
func (s *ConfigServer) GetExtractionPromptConfig(ctx context.Context, req *pb.GetExtractionPromptConfigRequest) (*pb.ExtractionPromptConfig, error)
func (*ConfigServer) GetLLMConfig ¶ added in v0.1.5
func (s *ConfigServer) GetLLMConfig(ctx context.Context, req *pb.GetLLMConfigRequest) (*pb.LLMConfig, error)
func (*ConfigServer) GetVectorBackendConfig ¶ added in v0.7.0
func (s *ConfigServer) GetVectorBackendConfig(ctx context.Context, req *pb.GetVectorBackendConfigRequest) (*pb.VectorBackendConfig, error)
func (*ConfigServer) ListAPIKeyConfigs ¶ added in v0.1.5
func (s *ConfigServer) ListAPIKeyConfigs(ctx context.Context, _ *pb.ListAPIKeyConfigsRequest) (*pb.ListAPIKeyConfigsResponse, error)
func (*ConfigServer) ListEmbeddingConfigs ¶ added in v0.1.5
func (s *ConfigServer) ListEmbeddingConfigs(ctx context.Context, _ *pb.ListEmbeddingConfigsRequest) (*pb.ListEmbeddingConfigsResponse, error)
func (*ConfigServer) ListExtractionPromptConfigs ¶ added in v0.1.5
func (s *ConfigServer) ListExtractionPromptConfigs(ctx context.Context, _ *pb.ListExtractionPromptConfigsRequest) (*pb.ListExtractionPromptConfigsResponse, error)
func (*ConfigServer) ListLLMConfigs ¶ added in v0.1.5
func (s *ConfigServer) ListLLMConfigs(ctx context.Context, _ *pb.ListLLMConfigsRequest) (*pb.ListLLMConfigsResponse, error)
func (*ConfigServer) ListVectorBackendConfigs ¶ added in v0.7.0
func (s *ConfigServer) ListVectorBackendConfigs(ctx context.Context, _ *pb.ListVectorBackendConfigsRequest) (*pb.ListVectorBackendConfigsResponse, error)
func (*ConfigServer) SetDefaultAPIKeyConfig ¶ added in v0.1.5
func (s *ConfigServer) SetDefaultAPIKeyConfig(ctx context.Context, req *pb.SetDefaultAPIKeyConfigRequest) (*pb.APIKeyConfig, error)
func (*ConfigServer) SetDefaultEmbeddingConfig ¶ added in v0.1.5
func (s *ConfigServer) SetDefaultEmbeddingConfig(ctx context.Context, req *pb.SetDefaultEmbeddingConfigRequest) (*pb.EmbeddingConfig, error)
func (*ConfigServer) SetDefaultExtractionPromptConfig ¶ added in v0.1.5
func (s *ConfigServer) SetDefaultExtractionPromptConfig(ctx context.Context, req *pb.SetDefaultExtractionPromptConfigRequest) (*pb.ExtractionPromptConfig, error)
func (*ConfigServer) SetDefaultLLMConfig ¶ added in v0.1.5
func (s *ConfigServer) SetDefaultLLMConfig(ctx context.Context, req *pb.SetDefaultLLMConfigRequest) (*pb.LLMConfig, error)
func (*ConfigServer) SetDefaultVectorBackendConfig ¶ added in v0.7.0
func (s *ConfigServer) SetDefaultVectorBackendConfig(ctx context.Context, req *pb.SetDefaultVectorBackendConfigRequest) (*pb.VectorBackendConfig, error)
func (*ConfigServer) UpdateAPIKeyConfig ¶ added in v0.1.5
func (s *ConfigServer) UpdateAPIKeyConfig(ctx context.Context, req *pb.UpdateAPIKeyConfigRequest) (*pb.APIKeyConfig, error)
func (*ConfigServer) UpdateEmbeddingConfig ¶ added in v0.1.5
func (s *ConfigServer) UpdateEmbeddingConfig(ctx context.Context, req *pb.UpdateEmbeddingConfigRequest) (*pb.EmbeddingConfig, error)
func (*ConfigServer) UpdateExtractionPromptConfig ¶ added in v0.1.5
func (s *ConfigServer) UpdateExtractionPromptConfig(ctx context.Context, req *pb.UpdateExtractionPromptConfigRequest) (*pb.ExtractionPromptConfig, error)
func (*ConfigServer) UpdateLLMConfig ¶ added in v0.1.5
func (s *ConfigServer) UpdateLLMConfig(ctx context.Context, req *pb.UpdateLLMConfigRequest) (*pb.LLMConfig, error)
func (*ConfigServer) UpdateVectorBackendConfig ¶ added in v0.7.0
func (s *ConfigServer) UpdateVectorBackendConfig(ctx context.Context, req *pb.UpdateVectorBackendConfigRequest) (*pb.VectorBackendConfig, error)
type DocumentServer ¶
type DocumentServer struct {
pb.UnimplementedDocumentServiceServer
// contains filtered or unexported fields
}
DocumentServer implements the DocumentService gRPC service.
func NewDocumentServer ¶
func NewDocumentServer(docStore *store.DocumentStore, jobStore *store.JobStore, fetcher fetch.Fetcher, authorizer auth.Authorizer) *DocumentServer
NewDocumentServer creates a new document service.
func (*DocumentServer) CreateDocument ¶
func (s *DocumentServer) CreateDocument(ctx context.Context, req *pb.CreateDocumentRequest) (*pb.Document, error)
CreateDocument creates a new document. Requires write permission on the topic.
func (*DocumentServer) DeleteDocument ¶
func (s *DocumentServer) DeleteDocument(ctx context.Context, req *pb.DeleteDocumentRequest) (*pb.DeleteDocumentResponse, error)
DeleteDocument deletes a document. Requires admin permission on its topic.
func (*DocumentServer) GetDocument ¶
func (s *DocumentServer) GetDocument(ctx context.Context, req *pb.GetDocumentRequest) (*pb.Document, error)
GetDocument retrieves a document. Requires read permission on its topic.
func (*DocumentServer) ListDocuments ¶
func (s *DocumentServer) ListDocuments(ctx context.Context, req *pb.ListDocumentsRequest) (*pb.ListDocumentsResponse, error)
ListDocuments lists documents in a topic. Requires read permission.
func (*DocumentServer) UpdateDocument ¶
func (s *DocumentServer) UpdateDocument(ctx context.Context, req *pb.UpdateDocumentRequest) (*pb.Document, error)
UpdateDocument updates a document. Requires write permission on its topic.
func (*DocumentServer) UploadDocument ¶ added in v0.2.0
func (s *DocumentServer) UploadDocument(ctx context.Context, req *pb.UploadDocumentRequest) (*pb.UploadDocumentResponse, error)
UploadDocument creates a document from uploaded content or a source URL, then enqueues an extraction job. Requires write permission on the topic.
type EmbeddingProvider ¶ added in v0.2.0
EmbeddingProvider can embed a single text string into a vector.
type JobServer ¶ added in v0.2.0
type JobServer struct {
pb.UnimplementedJobServiceServer
// contains filtered or unexported fields
}
JobServer implements the JobService gRPC service.
func NewJobServer ¶ added in v0.2.0
func NewJobServer(jobStore *store.JobStore, docStore *store.DocumentStore, authorizer auth.Authorizer) *JobServer
NewJobServer creates a new job service.
func (*JobServer) GetJob ¶ added in v0.2.0
func (s *JobServer) GetJob(ctx context.Context, req *pb.GetJobRequest) (*pb.ProcessingJob, error)
GetJob retrieves a job by ID. Requires read access to the job's document's topic.
func (*JobServer) ListJobs ¶ added in v0.2.0
func (s *JobServer) ListJobs(ctx context.Context, req *pb.ListJobsRequest) (*pb.ListJobsResponse, error)
ListJobs lists jobs with optional filters. If topic_id is specified, requires read access to that topic. If document_id is specified, resolves the topic and requires read access. If neither, returns jobs across all accessible topics.
type LinkServer ¶ added in v0.4.0
type LinkServer struct {
pb.UnimplementedLinkServiceServer
// contains filtered or unexported fields
}
LinkServer implements the LinkService gRPC service.
func NewLinkServer ¶ added in v0.4.0
func NewLinkServer(linkStore *store.LinkStore, chunkStore *store.ChunkStore, authorizer auth.Authorizer) *LinkServer
NewLinkServer creates a new link service.
func (*LinkServer) CreateLink ¶ added in v0.4.0
func (s *LinkServer) CreateLink(ctx context.Context, req *pb.CreateLinkRequest) (*pb.Link, error)
CreateLink creates a new link between two chunks. Requires write permission on the source chunk's topic.
func (*LinkServer) DeleteLink ¶ added in v0.4.0
func (s *LinkServer) DeleteLink(ctx context.Context, req *pb.DeleteLinkRequest) (*pb.DeleteLinkResponse, error)
DeleteLink removes a link. Requires write permission on the source chunk's topic.
func (*LinkServer) ListLinks ¶ added in v0.4.0
func (s *LinkServer) ListLinks(ctx context.Context, req *pb.ListLinksRequest) (*pb.ListLinksResponse, error)
ListLinks returns links for a chunk. Requires read permission on the chunk's topic.
type MemoryServer ¶ added in v0.2.0
type MemoryServer struct {
pb.UnimplementedMemoryServiceServer
// contains filtered or unexported fields
}
MemoryServer implements the MemoryService gRPC service.
func NewMemoryServer ¶ added in v0.2.0
func NewMemoryServer(memStore *store.MemoryStore, jobStore *store.JobStore) *MemoryServer
NewMemoryServer creates a new memory service. The jobStore may be nil; when set, AddMemory routes through the maintenance worker.
func (*MemoryServer) AddMemory ¶ added in v0.2.0
func (s *MemoryServer) AddMemory(ctx context.Context, req *pb.AddMemoryRequest) (*pb.AddMemoryResponse, error)
AddMemory queues a memory for creation via the maintenance worker, which handles LLM-based deduplication (ADD/UPDATE/DELETE/NOOP). Returns a job ID.
func (*MemoryServer) AddMessages ¶ added in v0.8.0
func (s *MemoryServer) AddMessages(ctx context.Context, req *pb.AddMessagesRequest) (*pb.AddMessagesResponse, error)
AddMessages queues conversation messages for memory extraction via a worker. Returns a job ID for tracking.
func (*MemoryServer) DeleteMemory ¶ added in v0.2.0
func (s *MemoryServer) DeleteMemory(ctx context.Context, req *pb.DeleteMemoryRequest) (*pb.DeleteMemoryResponse, error)
DeleteMemory soft-deletes a memory by marking it as invalidated.
func (*MemoryServer) GetMemories ¶ added in v0.8.0
func (s *MemoryServer) GetMemories(ctx context.Context, req *pb.GetMemoriesRequest) (*pb.GetMemoriesResponse, error)
GetMemories returns all active memories for the calling principal, optionally filtered by scopes.
func (*MemoryServer) ListMemories ¶ added in v0.2.0
func (s *MemoryServer) ListMemories(ctx context.Context, req *pb.ListMemoriesRequest) (*pb.ListMemoriesResponse, error)
ListMemories returns memories for a scope, optionally including invalidated ones.
func (*MemoryServer) ListScopes ¶ added in v0.2.0
func (s *MemoryServer) ListScopes(ctx context.Context, _ *pb.ListScopesRequest) (*pb.ListScopesResponse, error)
ListScopes returns all scopes the calling principal has memories in.
func (*MemoryServer) UpdateMemory ¶ added in v0.2.0
func (s *MemoryServer) UpdateMemory(ctx context.Context, req *pb.UpdateMemoryRequest) (*pb.Memory, error)
UpdateMemory updates a memory's content and metadata.
type Pinger ¶ added in v0.1.3
Pinger checks database connectivity. *pgxpool.Pool satisfies this interface.
type RetrievalServer ¶
type RetrievalServer struct {
pb.UnimplementedRetrievalServiceServer
// contains filtered or unexported fields
}
RetrievalServer implements the RetrievalService gRPC service.
func NewRetrievalServer ¶
func NewRetrievalServer(searcher *retrieval.Searcher, contextFetcher *retrieval.ContextFetcher, embedder EmbeddingProvider, chunkStore *store.ChunkStore) *RetrievalServer
NewRetrievalServer creates a new retrieval service. The embedder is optional; if nil, query_text is not supported and clients must provide query_embedding directly. The chunkStore is optional; if non-nil, chunk responses are enriched with embedding model info from chunk_embeddings metadata.
func (*RetrievalServer) GetContext ¶
func (s *RetrievalServer) GetContext(ctx context.Context, req *pb.GetContextRequest) (*pb.GetContextResponse, error)
GetContext returns chunks from a single document in sequence order.
func (*RetrievalServer) Search ¶
func (s *RetrievalServer) Search(ctx context.Context, req *pb.SearchRequest) (*pb.SearchResponse, error)
Search performs ACL-filtered similarity search.
type Server ¶
type Server struct {
// Registry is a dedicated Prometheus registry for gRPC metrics.
// Using a custom registry avoids conflicts with the default metrics
// that go-grpc-prometheus registers in init().
Registry *prometheus.Registry
// contains filtered or unexported fields
}
Server wraps a gRPC server with Creel services.
func New ¶
func New(port int, apiKeyValidator *auth.APIKeyValidator, oidcValidator *auth.OIDCValidator) *Server
New creates a new Server with auth and Prometheus interceptors.
func (*Server) GRPCServer ¶
GRPCServer returns the underlying gRPC server for registering services.
func (*Server) GracefulStop ¶
func (s *Server) GracefulStop()
GracefulStop gracefully shuts down the gRPC server.
type TopicServer ¶
type TopicServer struct {
pb.UnimplementedTopicServiceServer
// contains filtered or unexported fields
}
TopicServer implements the TopicService gRPC service.
func NewTopicServer ¶
func NewTopicServer(topicStore *store.TopicStore, authorizer auth.Authorizer, embeddingStore *store.EmbeddingConfigStore) *TopicServer
NewTopicServer creates a new topic service.
func (*TopicServer) CreateTopic ¶
func (s *TopicServer) CreateTopic(ctx context.Context, req *pb.CreateTopicRequest) (*pb.Topic, error)
CreateTopic creates a new topic owned by the authenticated principal.
func (*TopicServer) DeleteTopic ¶
func (s *TopicServer) DeleteTopic(ctx context.Context, req *pb.DeleteTopicRequest) (*pb.DeleteTopicResponse, error)
DeleteTopic deletes a topic with admin ACL check. Cascades to all content.
func (*TopicServer) GetTopic ¶
func (s *TopicServer) GetTopic(ctx context.Context, req *pb.GetTopicRequest) (*pb.Topic, error)
GetTopic retrieves a topic by ID with ACL check.
func (*TopicServer) GrantAccess ¶
func (s *TopicServer) GrantAccess(ctx context.Context, req *pb.GrantAccessRequest) (*pb.TopicGrant, error)
GrantAccess grants a principal access to a topic. Requires admin permission.
func (*TopicServer) ListGrants ¶
func (s *TopicServer) ListGrants(ctx context.Context, req *pb.ListGrantsRequest) (*pb.ListGrantsResponse, error)
ListGrants lists all grants for a topic. Requires read permission.
func (*TopicServer) ListTopics ¶
func (s *TopicServer) ListTopics(ctx context.Context, _ *pb.ListTopicsRequest) (*pb.ListTopicsResponse, error)
ListTopics returns topics accessible to the authenticated principal.
func (*TopicServer) RevokeAccess ¶
func (s *TopicServer) RevokeAccess(ctx context.Context, req *pb.RevokeAccessRequest) (*pb.RevokeAccessResponse, error)
RevokeAccess revokes a principal's access to a topic. Requires admin permission.
func (*TopicServer) UpdateTopic ¶
func (s *TopicServer) UpdateTopic(ctx context.Context, req *pb.UpdateTopicRequest) (*pb.Topic, error)
UpdateTopic updates a topic with admin ACL check.