db

package
v0.0.0-...-009e516 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MongoConnection = connection()

Functions

func CheckConnection

func CheckConnection() int

func CheckUserExist

func CheckUserExist(email string) (models.User, bool, string)

func CreateTweet

func CreateTweet(t models.CreateTweet) (string, bool, error)

func DeleteRelation

func DeleteRelation(t models.Relation) (bool, error)

func DeleteTweet

func DeleteTweet(ID string, UserID string) error

func EncryptPassword

func EncryptPassword(password string) (string, error)

func FindProfile

func FindProfile(id string) (models.User, error)

func GetAllUsers

func GetAllUsers(ID string, page int64, search string, userType string) ([]*models.User, bool)

func GetRelation

func GetRelation(t models.Relation) (bool, error)

func GetTweets

func GetTweets(ID string, page int64) ([]*models.GetTwets, bool)

func GetTweetsFollowers

func GetTweetsFollowers(ID string, page int) ([]models.TweetsFollowers, bool)

func InsertIntoDatabase

func InsertIntoDatabase(u models.User) (string, bool, error)

func InsertRelation

func InsertRelation(r models.Relation) (bool, error)

func Login

func Login(email string, password string) (models.User, bool)

func UpdateProfile

func UpdateProfile(u models.User, ID string) (bool, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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