customer

package
Version: v0.0.0-...-86d22a7 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

T contains the set of cached templates for use.

Functions

func Delete

func Delete(c Customer) error

Delete removes the customer from the database.

func Save

func Save(c Customer) (int, error)

Save stores a customer document in the database.

func Update

func Update(c Customer) error

Update updates the customer in the database.

Types

type Customer

type Customer struct {
	ID   int
	Name string `form:"name"`
}

Customer represents a customer document we store in our database.

func All

func All() []Customer

All returns the full database of customers.

func Find

func Find(id int) (Customer, error)

Find locates a customer by id in the database.

Jump to

Keyboard shortcuts

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