controllers

package
v0.0.0-...-d4a52ae Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2020 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	DB     *gorm.DB
	Router *gin.Engine
}

Server : Struct

func (*Server) CreateComment

func (server *Server) CreateComment(c *gin.Context)

CreateComment : function to create a comment

func (*Server) CreateTrip

func (server *Server) CreateTrip(c *gin.Context)

CreateTrip : function to create a trip

func (*Server) CreateUser

func (server *Server) CreateUser(c *gin.Context)

CreateUser : function Post for User

func (*Server) DeleteComment

func (server *Server) DeleteComment(c *gin.Context)

DeleteComment : function to delete a comment

func (*Server) DeleteTrip

func (server *Server) DeleteTrip(c *gin.Context)

DeleteTrip : function to delete a trip

func (*Server) DeleteUser

func (server *Server) DeleteUser(c *gin.Context)

DeleteUser : function to delete a specific user

func (*Server) ForgotPassword

func (server *Server) ForgotPassword(c *gin.Context)

ForgotPassword : funtion forgot password

func (*Server) GetComments

func (server *Server) GetComments(c *gin.Context)

GetComments : funtion to get the comments

func (*Server) GetLikes

func (server *Server) GetLikes(c *gin.Context)

GetLikes : funtion to get the likes

func (*Server) GetTrip

func (server *Server) GetTrip(c *gin.Context)

GetTrip : function to get a trip

func (*Server) GetTrips

func (server *Server) GetTrips(c *gin.Context)

GetTrips : function to get all trips

func (*Server) GetUser

func (server *Server) GetUser(c *gin.Context)

GetUser : function to get a specific user

func (*Server) GetUserTrips

func (server *Server) GetUserTrips(c *gin.Context)

GetUserTrips : function to get the trips of a user

func (*Server) GetUsers

func (server *Server) GetUsers(c *gin.Context)

GetUsers : function to get all users

func (*Server) Home

func (server *Server) Home(w http.ResponseWriter, r *http.Request)

Home : server response

func (*Server) Initialize

func (server *Server) Initialize(Dbdriver, DbUser, DbPassword, DbPort, DbHost, DbName string)

Initialize : connection to our database

func (*Server) LikeTrip

func (server *Server) LikeTrip(c *gin.Context)

LikeTrip : function to like a trip

func (*Server) Login

func (server *Server) Login(c *gin.Context)

Login : function login with gin framework

func (*Server) ResetPassword

func (server *Server) ResetPassword(c *gin.Context)

ResetPassword : funtion to reset a password

func (*Server) Run

func (server *Server) Run(addr string)

Run : Status

func (*Server) SignIn

func (server *Server) SignIn(email, password string) (map[string]interface{}, error)

SignIn : function SignIn with gin framework

func (*Server) UnLikeTrip

func (server *Server) UnLikeTrip(c *gin.Context)

UnLikeTrip : funtion to unlike a trip

func (*Server) UpdateAvatar

func (server *Server) UpdateAvatar(c *gin.Context)

UpdateAvatar : connect to DigitalOcean to change avatar of an user

func (*Server) UpdateComment

func (server *Server) UpdateComment(c *gin.Context)

UpdateComment : function to update a comment

func (*Server) UpdateTrip

func (server *Server) UpdateTrip(c *gin.Context)

UpdateTrip : function to update a trip

func (*Server) UpdateUser

func (server *Server) UpdateUser(c *gin.Context)

UpdateUser : function to update a user

Jump to

Keyboard shortcuts

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