Documentation
¶
Overview ¶
Package proto defines the interfaces and route registrations generated from IDL files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterRouter ¶
RegisterRouter registers the HTTP routes for the Controller interface. It maps each method to its corresponding HTTP endpoint, and applies the given middleware (wrap) to each handler.
Types ¶
type Book ¶
type Book struct {
Title string `json:"title"`
Author string `json:"author"`
ISBN string `json:"isbn"`
Publisher string `json:"publisher"`
Price string `json:"price"`
RefreshTime string `json:"refreshTime"`
}
Book represents the structure of a book entity.
type Controller ¶
type Controller interface {
ListBooks(w http.ResponseWriter, r *http.Request)
GetBook(w http.ResponseWriter, r *http.Request)
SaveBook(w http.ResponseWriter, r *http.Request)
DeleteBook(w http.ResponseWriter, r *http.Request)
}
Controller defines the service interface for book-related operations.
Click to show internal directories.
Click to hide internal directories.