[GODRIVER-2726] Merge the "gridfs" package into the "mongo" package Created: 30/Dec/22  Updated: 18/Jan/24  Resolved: 18/Jan/24

Status: Closed
Project: Go Driver
Component/s: GridFS
Affects Version/s: None
Fix Version/s: 2.0.0

Type: Improvement Priority: Unknown
Reporter: Matt Dale Assignee: Preston Vasquez
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on GODRIVER-2520 Simplify GridFS timeout API Closed
Documented
Epic Link: Go Driver 2.0: Driver
Backwards Compatibility: Major Change
Documentation Changes: Needed
Documentation Changes Summary:

1. What would you like to communicate to the user about this feature?
There is no longer a gridfs package in v2, the gridfs methods were moved to the mongo package. So all examples for gridfs will need to be updated to be sourced from mongo.
2. Would you like the user to see examples of the syntax and/or executable code and its output?
NA
3. Which versions of the driver/connector does this apply to?
v2


 Description   

Keeping the GridFS API in a separate package deviates from the existing pattern of having all MongoDB API operations in the mongo package and creates visibility issues for code in the gridfs package that needs to access configurations from a mongo.Client. Merge the gridfs package into the mongo package to resolve those issues.

Definition of done:

  • Merge all code from the gridfs package into the mongo package.
  • Rename type gridfs.Bucket to mongo.GridFSBucket
  • Add a function to *mongo.Database that creates a *mongo.GridFSBucket for that database (e.g. .Bucket() or .GridFS()).
  • (Optional) Consider removing the Client.Timeout function, which was added to allow accessing the timeoutMS value from the gridfs package.


 Comments   
Comment by Githook User [ 18/Jan/24 ]

Author:

{'name': 'Preston Vasquez', 'email': 'prestonvasquez@icloud.com', 'username': 'prestonvasquez'}

Message: GODRIVER-2726 Merge the gridfs into the mongo package (#1497)
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/8acba08824115850acd64a02f4c69c32b5d78265

Generated at Thu Feb 08 08:39:14 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.