@@ -93,11 +93,15 @@ type FlatInterface interface {
93
93
// [ChangePassword] changes the password for the specific user.
94
94
ChangePassword (ctx context.Context , param ChangePasswordParams ) error
95
95
96
- UploadFile (ctx context.Context , databaseName , collectionName string , param UploadFileParams ) (result * UploadFileResult , err error )
96
+ // [UploadFile] uploads a file to the collection.
97
+ UploadFile (ctx context.Context , databaseName , collectionName string ,
98
+ param UploadFileParams ) (result * UploadFileResult , err error )
97
99
100
+ // [GetImageUrl] retrieves image URLs for the specified file and documents in the collection.
98
101
GetImageUrl (ctx context.Context , databaseName , collectionName string ,
99
102
param GetImageUrlParams ) (result * GetImageUrlResult , err error )
100
103
104
+ // [QueryFileDetails] queries file details from the collection.
101
105
QueryFileDetails (ctx context.Context , databaseName , collectionName string ,
102
106
param * QueryFileDetailsParams ) (result * QueryFileDetailsResult , err error )
103
107
}
@@ -528,15 +532,35 @@ func uploadFile(ctx context.Context, cli SdkClient, databaseName, collectionName
528
532
return result , nil
529
533
}
530
534
535
+ // [GetImageUrlParams] holds the parameters for getting image URLs.
536
+ //
537
+ // Fields:
538
+ // - FileName: The name of the file to get image URLs for.
539
+ // - DocumentIds: The list of document IDs to get image URLs for.
531
540
type GetImageUrlParams struct {
532
541
FileName string
533
542
DocumentIds []string
534
543
}
535
544
545
+ // [GetImageUrlResult] holds the results for getting image URLs.
546
+ //
547
+ // Fields:
548
+ // - Images: A two-dimensional array of image information, where each inner array contains image details for a document.
536
549
type GetImageUrlResult struct {
537
550
Images [][]document.ImageInfo
538
551
}
539
552
553
+ // [GetImageUrl] retrieves image URLs for the specified file and documents in the collection.
554
+ //
555
+ // Parameters:
556
+ // - ctx: A context.Context object controls the request's lifetime, allowing for the request
557
+ // to be canceled or to timeout according to the context's deadline.
558
+ // - databaseName: The name of the database.
559
+ // - collectionName: The name of the collection.
560
+ // - param: A [GetImageUrlParams] object that includes the other parameters for getting image URLs operation.
561
+ // See [GetImageUrlParams] for more information.
562
+ //
563
+ // Returns a pointer to a [GetImageUrlResult] object or an error.
540
564
func (i * implementerFlatDocument ) GetImageUrl (ctx context.Context , databaseName , collectionName string ,
541
565
param GetImageUrlParams ) (result * GetImageUrlResult , err error ) {
542
566
return getImageUrl (ctx , i .SdkClient , databaseName , collectionName , param )
@@ -561,6 +585,14 @@ func getImageUrl(ctx context.Context, cli SdkClient, databaseName, collectionNam
561
585
return result , nil
562
586
}
563
587
588
+ // [QueryFileDetailsParams] holds the parameters for querying file details.
589
+ //
590
+ // Fields:
591
+ // - FileNames: The list of file names to query details for.
592
+ // - Filter: A pointer to a Filter object for filtering the query results.
593
+ // - Limit: A pointer to the maximum number of results to return. If nil, default limit is 10.
594
+ // - Offset: The pagination offset to control the starting position of results returned by the paginated query.
595
+ // - OutputFields: The list of fields to include in the output results.
564
596
type QueryFileDetailsParams struct {
565
597
FileNames []string
566
598
Filter * Filter
@@ -569,11 +601,27 @@ type QueryFileDetailsParams struct {
569
601
OutputFields []string
570
602
}
571
603
604
+ // [QueryFileDetailsResult] holds the results for querying file details.
605
+ //
606
+ // Fields:
607
+ // - Documents: The list of documents that match the query conditions.
608
+ // - Count: The total number of documents that match the query conditions.
572
609
type QueryFileDetailsResult struct {
573
610
Documents []Document
574
611
Count uint64
575
612
}
576
613
614
+ // [QueryFileDetails] queries file details based on the specified query conditions from the collection.
615
+ //
616
+ // Parameters:
617
+ // - ctx: A context.Context object controls the request's lifetime, allowing for the request
618
+ // to be canceled or to timeout according to the context's deadline.
619
+ // - databaseName: The name of the database.
620
+ // - collectionName: The name of the collection.
621
+ // - param: A pointer to a [QueryFileDetailsParams] object that includes the other parameters for querying file details operation.
622
+ // See [QueryFileDetailsParams] for more information.
623
+ //
624
+ // Returns a pointer to a [QueryFileDetailsResult] object or an error.
577
625
func (i * implementerFlatDocument ) QueryFileDetails (ctx context.Context , databaseName , collectionName string ,
578
626
param * QueryFileDetailsParams ) (result * QueryFileDetailsResult , err error ) {
579
627
return queryFileDetails (ctx , i .SdkClient , databaseName , collectionName , param )
0 commit comments