Documentation ¶
Index ¶
- type App
- func (a *App) CreateComment(c *gin.Context)
- func (a *App) CreatePhoto(c *gin.Context)
- func (a *App) CreateSocialMedia(c *gin.Context)
- func (a *App) DeleteComment(c *gin.Context)
- func (a *App) DeleteCurrentUser(c *gin.Context)
- func (a *App) DeletePhoto(c *gin.Context)
- func (a *App) DeleteSocialMedia(c *gin.Context)
- func (a *App) GetComments(c *gin.Context)
- func (a *App) GetPhotos(c *gin.Context)
- func (a *App) GetSocialMedias(c *gin.Context)
- func (a *App) LoginUser(c *gin.Context)
- func (a *App) RegisterUser(c *gin.Context)
- func (a *App) UpdateComment(c *gin.Context)
- func (a *App) UpdatePhoto(c *gin.Context)
- func (a *App) UpdateSocialMedia(c *gin.Context)
- func (a *App) UpdateUser(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
Main api application that contains database struct
func NewApp ¶
func NewApp(db *sqlx.DB, repos *repository.Repository) *App
func (*App) CreateComment ¶
CreateComment creates new comment for the current user
func (*App) CreatePhoto ¶
CreatePhoto creates new photo for the current user
func (*App) CreateSocialMedia ¶
CreateSocialMedia creates new socialMedia for the current user
func (*App) DeleteComment ¶
DeleteComment deletes a current user's comment based on its ID
func (*App) DeleteCurrentUser ¶
DeleteCurrentUser will delete user data based on currently logged in data
func (*App) DeletePhoto ¶
DeletePhoto deletes a current user's photo based on its ID
func (*App) DeleteSocialMedia ¶
DeleteSocialMedia deletes a current user's socialMedia based on its ID
func (*App) GetComments ¶
GetComments fetches all comments of the current user
func (*App) GetSocialMedias ¶
GetSocialMedias fetches all socialMedias of the current user
func (*App) LoginUser ¶
LoginUser will check the given email and password, and return JWT if successful
func (*App) RegisterUser ¶
RegisterUser will create a new user
func (*App) UpdateComment ¶
UpdateComment updates a current user's comment based on its ID
func (*App) UpdatePhoto ¶
UpdatePhoto updates a current user's photo based on its ID
func (*App) UpdateSocialMedia ¶
UpdateSocialMedia updates a current user's socialMedia based on its ID
func (*App) UpdateUser ¶
UpdateUser will update user data based on User ID