records

package
v0.0.0-...-2c97fc3 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

Create - Insert page

func CreateProcess

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

CreateProcess - Insert

func DeleteBook

func DeleteBook(r *http.Request) error

DeleteBook Delete record

func DeleteProcess

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

DeleteProcess will delete one record, and return to items page

func Index

Index Show all

func OldDesign

func OldDesign(w http.ResponseWriter, r *http.Request, _ httprouter.Params)

OldDesign is old HTML template used by PHP

func Show

Show - View one

func Update

Update page

func UpdateProcess

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

UpdateProcess - Update

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"`
}

Book Record fields

func AllBooks

func AllBooks() ([]Book, error)

AllBooks finds all records

func OneBook

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

OneBook Find one record

func PutBook

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

PutBook - Insert

func UpdateBook

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

UpdateBook - Update record

type Prod

type Prod struct {
	// add ID and tags if you need them
	// ID     bson.ObjectId // `json:"id" bson:"_id"`
	Pline    string  // `json:"isbn" bson:"isbn"`
	Bline    string  // `json:"title" bson:"title"`
	Category string  // `json:"author" bson:"author"`
	Price    float32 // `json:"price" bson:"price"`
}

Prod Record fields

func SomeProducts

func SomeProducts() ([]Prod, error)

SomeProducts records from produts3 collection

Jump to

Keyboard shortcuts

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