Documentation
¶
Index ¶
- Variables
- func CloseDB()
- func DeletePost(postID int) error
- func FindPostByID(postID string) (*models.Post, error)
- func FindPostsByCategory(categoria string) ([]*models.Post, error)
- func GetAllPosts() ([]*models.Post, error)
- func GetUserByUsername(username string) (*models.User, error)
- func InitDB()
- func InsertPost(post *models.Post) error
- func InsertUser(user *models.User) error
- func UpdatePost(postID int, post *models.Post) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Db es una variable global que mantendrá la conexión a la base de datos Db *sql.DB )
Functions ¶
func DeletePost ¶
func GetAllPosts ¶
func InsertPost ¶
func InsertUser ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.