GetDefaultDatabaseCollectionWithUser will return the default collection if the default collection is supplied in the database config.
()
| 2237 | |
| 2238 | // GetDefaultDatabaseCollectionWithUser will return the default collection if the default collection is supplied in the database config. |
| 2239 | func (dbc *Database) GetDefaultDatabaseCollectionWithUser() (*DatabaseCollectionWithUser, error) { |
| 2240 | col, err := dbc.GetDefaultDatabaseCollection() |
| 2241 | if err != nil { |
| 2242 | return nil, err |
| 2243 | } |
| 2244 | return &DatabaseCollectionWithUser{ |
| 2245 | DatabaseCollection: col, |
| 2246 | user: dbc.user, |
| 2247 | }, nil |
| 2248 | } |
| 2249 | |
| 2250 | func (dbc *DatabaseContext) AuthenticatorOptions(ctx context.Context) auth.AuthenticatorOptions { |
| 2251 | defaultOptions := auth.DefaultAuthenticatorOptions(ctx) |