feat(go-api): implement Go-side document PATCH API & align parsing/metadata sync behavior (#15975)

### What problem does this PR solve?

This PR implements the Go backend counterpart for the document partial
update API:
`PATCH /api/v1/datasets/:dataset_id/documents/:document_id`

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
- [x] Refactoring
This commit is contained in:
Hz_
2026-06-18 11:08:47 +08:00
committed by GitHub
parent 8ff6a21af9
commit f59332bc37
6 changed files with 977 additions and 15 deletions

View File

@@ -46,6 +46,10 @@ type fakeDocumentService struct {
metadataDocIDs []string
}
func (f *fakeDocumentService) UpdateDatasetDocument(userID, datasetID, documentID string, req *service.UpdateDatasetDocumentRequest, present map[string]bool) (*service.UpdateDatasetDocumentResponse, common.ErrorCode, error) {
return nil, common.CodeSuccess, nil
}
func (f *fakeDocumentService) GetDocumentArtifact(filename string) (*service.ArtifactResponse, error) {
if filename == "error.txt" {
return nil, service.ErrArtifactNotFound