Documentation ¶
Index ¶
- func BookHandleFunc(w http.ResponseWriter, r *http.Request)
- func BooksHandleFunc(w http.ResponseWriter, r *http.Request)
- func CreateBook(book Book) (string, bool)
- func DeleteBook(isbn string)
- func EchoHandleFunc(w http.ResponseWriter, r *http.Request)
- func HelloHandleFunc(w http.ResponseWriter, r *http.Request)
- func StartApi(string)
- func UpdateBook(isbn string, book Book) bool
- func UserHandleFunc(w http.ResponseWriter, r *http.Request)
- type Book
- type ErrResponse
- type Hello
- type Login
- type Response
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BookHandleFunc ¶
func BookHandleFunc(w http.ResponseWriter, r *http.Request)
BookHandleFunc to be used as http.HandleFunc for Book API
func BooksHandleFunc ¶
func BooksHandleFunc(w http.ResponseWriter, r *http.Request)
BooksHandleFunc to be used as http.HandleFunc for Book API
func CreateBook ¶
CreateBook creates a new Book if it does not exist
func EchoHandleFunc ¶
func EchoHandleFunc(w http.ResponseWriter, r *http.Request)
EchoHandleFunc to be used as http.HandleFunc for ECHO API
func HelloHandleFunc ¶
func HelloHandleFunc(w http.ResponseWriter, r *http.Request)
HelloHandleFunc to be used as http.HandleFunc for Hello API
func UserHandleFunc ¶
func UserHandleFunc(w http.ResponseWriter, r *http.Request)
Types ¶
type Book ¶
type Book struct { Title string `json:"title"` Author string `json:"author"` ISBN string `json:"isbn"` Description string `json:"description,omitempty"` }
Book type with Name, Author and ISBN
type ErrResponse ¶
type ErrResponse struct {
Message string
}
type Response ¶
type Response struct {
Data []vulnerableDB.User
}
Click to show internal directories.
Click to hide internal directories.