handlers

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeletePhoto

func DeletePhoto(c *gin.Context)

DeletePhoto deletes a photo from a user's repository

func DeleteUser added in v0.1.2

func DeleteUser(c *gin.Context)

DeleteUser deletes the current user

func GetAllUsers

func GetAllUsers(c *gin.Context)

GetAllUsers handles any request to get all the users registered

func GetCurrentUser

func GetCurrentUser(c *gin.Context)

Returns the current authenticated user. This information is taken from the context (provided by the auth middleware)

func GetPhotoByID

func GetPhotoByID(c *gin.Context)

GetPhotoByID handles any request to get a photo by its ID

func GetPhotosByOwnerID

func GetPhotosByOwnerID(c *gin.Context)

GetAllPhotosByOwnerID handles requests where the user wants all the photos from a given user

This function can perform text search on the name when providing a query parameter called "name"

func GetUserByID

func GetUserByID(c *gin.Context)

GetUserByID handles any requests to get a user by its ID

func HandleMonthlyPayments

func HandleMonthlyPayments()

HandleMonthlyPayments handles the payments of all users registered. (It is recommended to call this function in a CRON job)

func Login

func Login(c *gin.Context)

Login handles login requests

func Ping

func Ping(c *gin.Context)

Ping responds to a ping request. Useful to obtain the health of the system

func SignUp

func SignUp(c *gin.Context)

SignUp handles sign up requests to create new users.

func SubscribeTo

func SubscribeTo(c *gin.Context)

SubscribeTo handles requests to subscribe the currently authenticated user to another user

func UnsubscribeFrom

func UnsubscribeFrom(c *gin.Context)

UnsubscribeFrom handles requests to unsubscribe the currently authenticated user from another user

func UpdateUser

func UpdateUser(c *gin.Context)

UpdateUser handles any request to update a user. The authenticated user must be the owner of this account

func UploadMultiplePhotos

func UploadMultiplePhotos(c *gin.Context)

UploadMultiplePhotos handles any request to upload multiple photos in a single request

func UploadPhoto

func UploadPhoto(c *gin.Context)

UploadPhoto Handles any request to upload a photo. The user must be authenticated for the photo to be persisted.

Types

This section is empty.

Jump to

Keyboard shortcuts

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