Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BookController ¶
type BookController struct {
BookService *book_service.BookService `autowire:""`
}
func (*BookController) DeleteBook ¶
func (c *BookController) DeleteBook(w http.ResponseWriter, r *http.Request)
DeleteBook handles the HTTP request to delete a book by ISBN.
func (*BookController) GetBook ¶
func (c *BookController) GetBook(w http.ResponseWriter, r *http.Request)
GetBook handles the HTTP request to get details of a specific book by ISBN.
func (*BookController) ListBooks ¶
func (c *BookController) ListBooks(w http.ResponseWriter, r *http.Request)
ListBooks handles the HTTP request to list all books.
func (*BookController) SaveBook ¶
func (c *BookController) SaveBook(w http.ResponseWriter, r *http.Request)
SaveBook handles the HTTP request to save a new book.
type Controller ¶
type Controller struct {
BookController
}
Controller implements the controller interface defined in the idl package. In practice, controller methods can be grouped into different controllers. Each sub-controller can have its own dependencies and be tested independently, making the codebase more modular and maintainable.
Click to show internal directories.
Click to hide internal directories.