Documentation ¶
Index ¶
- func DeleteAuth(id string) error
- func DeletePhoto(id string) error
- func DeleteUser(id string) error
- func GetAllPhotosByOwnerID(ownerID string) ([]models.Photo, error)
- func GetAllUsers() ([]models.User, error)
- func GetAllUsersSubscribedTo(id string) ([]models.User, error)
- func GetAuthByEmail(email string) (*models.UserAuth, error)
- func GetPhotoByID(id string) (*models.Photo, error)
- func GetPhotoByName(name string) (*models.Photo, error)
- func GetUserById(id string) (*models.User, error)
- func IsEmailUsed(email string) (bool, error)
- func SaveAuth(auth *models.UserAuth) (string, error)
- func SaveMultiplePhotos(photos []models.Photo) ([]string, error)
- func SavePhoto(photo *models.Photo) (string, error)
- func SaveUser(user models.User) (string, error)
- func SearchPhotosByNameContaining(name string, ownerID string) ([]models.Photo, error)
- func UpdateAuth(id string, auth *models.UserAuth) (bool, error)
- func UpdateUser(id string, newUser *models.User) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAllPhotosByOwnerID ¶
GetAllPhotosByOwnerID returns all the photos from a user by its ID from MongoDB
func GetAllUsers ¶
GetAllUsers returns all the user registered from MongoDB
func GetAllUsersSubscribedTo ¶
GetAllUsersSubscribedTo Gets all the users subscribed to another user from MongoDB
func GetAuthByEmail ¶
GetAuthByEmail returns a UserAuth by its email from MongoDB
func GetPhotoByID ¶
GetPhotoByID returns a Photo by its id from MongoDB
func GetPhotoByName ¶
GetPhotoByID returns a Photo by its name from MongoDB
func GetUserById ¶
GetUserById returns a user by its ID from MongoDB
func IsEmailUsed ¶
IsEmailUsed checks if a given email is used by another user in MongoDB
func SaveMultiplePhotos ¶
SaveMultiplePhotos saves multiple photos to MongoDB
func SearchPhotosByNameContaining ¶
SearchPhotosByNameContaining returns all the photos from a user where the name partially matches the provided name
func UpdateAuth ¶
UpdateAuth updates a UserAuth in MongoDB
Types ¶
This section is empty.