books

package
v0.0.0-...-6d7316e Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(w http.ResponseWriter, r *http.Request)

func CreateProcess

func CreateProcess(w http.ResponseWriter, r *http.Request)

func DeleteBook

func DeleteBook(r *http.Request) error

func DeleteProcess

func DeleteProcess(w http.ResponseWriter, r *http.Request)

func Index

func Index(w http.ResponseWriter, r *http.Request)

func Show

func Show(w http.ResponseWriter, r *http.Request)

func Update

func Update(w http.ResponseWriter, r *http.Request)

func UpdateProcess

func UpdateProcess(w http.ResponseWriter, r *http.Request)

Types

type Book

type Book struct {
	// add ID and tags if you need them
	// ID     bson.ObjectId // `json:"id" bson:"_id"`
	Isbn   string  // `json:"isbn" bson:"isbn"`
	Title  string  // `json:"title" bson:"title"`
	Author string  // `json:"author" bson:"author"`
	Price  float32 // `json:"price" bson:"price"`
}

func AllBooks

func AllBooks() ([]Book, error)

func OneBook

func OneBook(r *http.Request) (Book, error)

func PutBook

func PutBook(r *http.Request) (Book, error)

func UpdateBook

func UpdateBook(r *http.Request) (Book, error)

Jump to

Keyboard shortcuts

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