Documentation ¶
Index ¶
- type PostsController
- func (postsController PostsController) CreatePost(w http.ResponseWriter, r *http.Request)
- func (postsController PostsController) DeletePost(w http.ResponseWriter, r *http.Request)
- func (postsController PostsController) GetPostByID(w http.ResponseWriter, r *http.Request)
- func (postsController PostsController) GetPosts(w http.ResponseWriter, r *http.Request)
- func (postsController PostsController) UpdatePost(w http.ResponseWriter, r *http.Request)
- type UsersController
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostsController ¶
type PostsController struct {
PostsRepository *repositories.PostsRepository
}
func NewPostsController ¶
func NewPostsController(postsRepository *repositories.PostsRepository) *PostsController
func (PostsController) CreatePost ¶
func (postsController PostsController) CreatePost(w http.ResponseWriter, r *http.Request)
func (PostsController) DeletePost ¶
func (postsController PostsController) DeletePost(w http.ResponseWriter, r *http.Request)
func (PostsController) GetPostByID ¶
func (postsController PostsController) GetPostByID(w http.ResponseWriter, r *http.Request)
func (PostsController) GetPosts ¶
func (postsController PostsController) GetPosts(w http.ResponseWriter, r *http.Request)
func (PostsController) UpdatePost ¶
func (postsController PostsController) UpdatePost(w http.ResponseWriter, r *http.Request)
type UsersController ¶
type UsersController struct {
PostsRepository *repositories.PostsRepository
}
func NewUsersController ¶
func NewUsersController(postsRepository *repositories.PostsRepository) *UsersController
func (UsersController) GetPosts ¶
func (usersController UsersController) GetPosts(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.