database

package
v0.0.0-...-9047515 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func CheckUserEmail

func CheckUserEmail(email string, ctx context.Context) (err error, exist bool)

func GetAllUserEmails

func GetAllUserEmails(allUsers *[]User, ctx context.Context) (err error)

func InitializeMongoConnection

func InitializeMongoConnection(username string, password string, host string, port int, dbname string) *mongoDb.Database

func InsertUserDetail

func InsertUserDetail(user *User, ctx context.Context) (err error)

func UnsubscribeEmailWithEmailId

func UnsubscribeEmailWithEmailId(email string, updateData map[string]interface{}, ctx context.Context) (err error)

Types

type User

type User struct {
	Email     string `json:"email" bson:"email"`
	Tag       string `json:"tag" bson:"tag"`
	Subscribe bool   `json:"subscribe" bson:"subscribe"`
}

func (*User) CollectionName

func (user *User) CollectionName() string

Jump to

Keyboard shortcuts

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