package main import ( "fmt" "math/rand" "testing" "github.com/cagnosolutions/dbdb" ) var ds *dbdb.DataStore = dbdb.NewDataStore() var stores = []string{ "items", "clients", "quotes", "orders", "invoices", } type Item struct { Sku int64 Name, Desc string Price float32 Count int64 Restock bool } type Client struct { Name []string Email, Phone, Gender string
func main() { ds := dbdb.NewDataStore() dbdb.Serve(ds, "0.0.0.0:31337", auth) }
"sort" "strconv" "strings" "github.com/cagnosolutions/dbdb" "github.com/cagnosolutions/web" ) const ( USERNAME = "******" PASSWORD = "******" ) var mux = web.NewMux() var tmpl *web.TmplCache var db = dbdb.NewDataStore() func init() { web.Funcs["split"] = func(s, sep string, i int) string { return strings.Split(s, sep)[i] } web.Funcs["title"] = strings.Title tmpl = web.NewTmplCache() db.AddStore("image") db.AddStore("listing") } func main() { mux.AddRoutes(home, gallery, about, contact, services, listings, floorPlans, login, logout)