Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Connect ¶
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.
Click to show internal directories.
Click to hide internal directories.