Documentation ¶ Index ¶ func CloseConn(client *mongo.Client, ctx context.Context, cancel context.CancelFunc) func OpenConn(uri string) (*mongo.Client, context.Context, context.CancelFunc, error) func PingConn(client *mongo.Client, ctx context.Context) error Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func CloseConn ¶ func CloseConn(client *mongo.Client, ctx context.Context, cancel context.CancelFunc) This is a user defined method to close resources. This method closes mongoDB connection and cancel context. func OpenConn ¶ func OpenConn(uri string) (*mongo.Client, context.Context, context.CancelFunc, error) func PingConn ¶ func PingConn(client *mongo.Client, ctx context.Context) error Types ¶ This section is empty. Source Files ¶ View all Source files connection.go Click to show internal directories. Click to hide internal directories.