Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnectWithFields ¶
func ConnectWithFields( host string, port uint16, username string, password string, options *ConnectionOptions, ) (*mongo.Client, error)
ConnectWithFields makes a client out of the given input arguments.
func ConnectWithURL ¶
func ConnectWithURL(url string, options *ConnectionOptions) (*mongo.Client, error)
ConnectWithURL makes a client out of the given input URL.
func Disconnect ¶
func Disconnect(client *mongo.Client, options *ConnectionOptions) error
Disconnect disconnect.
Types ¶
type ConnectionOptions ¶
type ConnectionOptions struct {
// contains filtered or unexported fields
}
ConnectionOptions stands for the options related to the connection (either to connect, disconnect or interact).
func WithClientOptions ¶
func WithClientOptions() *ConnectionOptions
WithClientOptions creates a connection options.
func (*ConnectionOptions) SetTimeout ¶
func (options *ConnectionOptions) SetTimeout(timeout int64) *ConnectionOptions
SetTimeout sets the timeout for the connection options.
Click to show internal directories.
Click to hide internal directories.