bd

package
v0.0.0-...-54a3255 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2025 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DatabaseName string
View Source
var MongoCN *mongo.Client

Functions

func AddPost

func AddPost(post models.AddPost) (string, bool, error)

func AddProduct

func AddProduct(product models.Product) (string, bool, error)

func AddRegistry

func AddRegistry(u models.Usuario) (string, bool, error)

func AddRelationship

func AddRelationship(t models.Relationship) (bool, error)

func CheckConnection

func CheckConnection() bool

func Connect

func Connect() error

func DeletePost

func DeletePost(id string, userId string) error

func DeleteRelationship

func DeleteRelationship(t models.Relationship) (bool, error)

func EncriptPassword

func EncriptPassword(pass string) (string, error)

func GetFriendsPosts

func GetFriendsPosts(id string, page int64) ([]models.GetFriendsPosts, bool)

func GetPosts

func GetPosts(id string, pag int64) ([]*models.GetPosts, bool)

func GetProducts

func GetProducts() ([]*models.GetProducts, bool)

func GetProfile

func GetProfile(id string) (models.Usuario, error)

func GetRelationship

func GetRelationship(t models.Relationship) bool

func GetUsers

func GetUsers(id string, page int64, search string, typeUser string) ([]*models.Usuario, bool)

func Login

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

func UpdateUser

func UpdateUser(u models.Usuario, id string) (models.Usuario, bool, error)

func UserExist

func UserExist(email string) (models.Usuario, bool, string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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