controller

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: May 10, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

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.

Jump to

Keyboard shortcuts

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