mongodb

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect() (*mongo.Client, error)

Connect establishes a connection to the MongoDB database.

It takes no parameters. It returns a pointer to a mongo.Client and an error.

func GetDataMongo

func GetDataMongo(client *mongo.Client) ([]*domain.SMTPConfig, error)

GetDataMongo retrieves SMTP configurations from MongoDB.

client: the MongoDB client used to connect to the database. Returns a slice of SMTPConfig structs and an error, if any.

func InsertSMTPConfig

func InsertSMTPConfig(Client *mongo.Client, config domain.SMTPConfig) error

InsertSMTPConfig inserts a SMTP configuration into the database.

It takes a *mongo.Client and a domain.SMTPConfig as parameters. It returns an error.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL