Documentation ¶
Index ¶
- Variables
- func CreatePostsHandler(w http.ResponseWriter, r *http.Request)
- func CreateUsersHandler(w http.ResponseWriter, r *http.Request)
- func ErrorHandler(w http.ResponseWriter, r *http.Request)
- func GetPostsByUserHandler(w http.ResponseWriter, r *http.Request)
- func GetPostsHandler(w http.ResponseWriter, r *http.Request)
- func GetUsersHandler(w http.ResponseWriter, r *http.Request)
- func HomePageHandler(w http.ResponseWriter, r *http.Request)
- func InitMongoConnection()
- type Post
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MONGOURL = "mongodb://localhost:27017" DATABASE = "appointy" )
Functions ¶
func CreatePostsHandler ¶
func CreatePostsHandler(w http.ResponseWriter, r *http.Request)
func CreateUsersHandler ¶
func CreateUsersHandler(w http.ResponseWriter, r *http.Request)
func ErrorHandler ¶
func ErrorHandler(w http.ResponseWriter, r *http.Request)
func GetPostsByUserHandler ¶
func GetPostsByUserHandler(w http.ResponseWriter, r *http.Request)
func GetPostsHandler ¶
func GetPostsHandler(w http.ResponseWriter, r *http.Request)
func GetUsersHandler ¶
func GetUsersHandler(w http.ResponseWriter, r *http.Request)
func HomePageHandler ¶
func HomePageHandler(w http.ResponseWriter, r *http.Request)
func InitMongoConnection ¶
func InitMongoConnection()
Types ¶
type Post ¶
type Post struct { ID primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"` Caption string `json:"caption,omitempty" bson:"caption,omitempty"` ImageUrl string `json:"imageUrl,omitempty" bson:"imageUrl,omitempty"` Time string `json:"time,omitempty" bson:"time,omitempty"` UserId string `json:"userId,omitempty" bson:"userId"` }
Click to show internal directories.
Click to hide internal directories.