Documentation ¶
Index ¶
- func New() (interface{}, error)
- type MongoDB
- func (c MongoDB) Close() error
- func (c MongoDB) Connection(ctx context.Context) (*mongo.Client, error)
- func (m *MongoDB) DeleteUser(ctx context.Context, req dbplugin.DeleteUserRequest) (dbplugin.DeleteUserResponse, error)
- func (m *MongoDB) Initialize(ctx context.Context, req dbplugin.InitializeRequest) (dbplugin.InitializeResponse, error)
- func (m *MongoDB) NewUser(ctx context.Context, req dbplugin.NewUserRequest) (dbplugin.NewUserResponse, error)
- func (m *MongoDB) Type() (string, error)
- func (m *MongoDB) UpdateUser(ctx context.Context, req dbplugin.UpdateUserRequest) (dbplugin.UpdateUserResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MongoDB ¶
type MongoDB struct {
// contains filtered or unexported fields
}
MongoDB is an implementation of Database interface
func (MongoDB) Close ¶ added in v0.10.0
func (c MongoDB) Close() error
Close terminates the database connection.
func (MongoDB) Connection ¶ added in v0.10.0
Connection creates or returns an existing a database connection. If the session fails on a ping check, the session will be closed and then re-created. This method does locks the mutex on its own.
func (*MongoDB) DeleteUser ¶ added in v1.6.0
func (m *MongoDB) DeleteUser(ctx context.Context, req dbplugin.DeleteUserRequest) (dbplugin.DeleteUserResponse, error)
func (*MongoDB) Initialize ¶ added in v0.10.0
func (m *MongoDB) Initialize(ctx context.Context, req dbplugin.InitializeRequest) (dbplugin.InitializeResponse, error)
func (*MongoDB) NewUser ¶ added in v1.6.0
func (m *MongoDB) NewUser(ctx context.Context, req dbplugin.NewUserRequest) (dbplugin.NewUserResponse, error)
func (*MongoDB) UpdateUser ¶ added in v1.6.0
func (m *MongoDB) UpdateUser(ctx context.Context, req dbplugin.UpdateUserRequest) (dbplugin.UpdateUserResponse, error)
Click to show internal directories.
Click to hide internal directories.