sqldb

package
v0.0.0-...-a5bf202 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Token string

Functions

func AddLead

func AddLead(newLead Mlead)

Inserts leads without id's, updates one's with ids.

func DeleteLead

func DeleteLead(id int)

func Login

func Login(name, pword string) bool

Wrapper function for checkAdminCreds.

func Run

func Run(pk, dbn string)

Recieves the public key for use in authentication. insertLeads and printData are test/dev function to be removed prior to production.

func RunTest

func RunTest(dbn string)

Types

type Mlead

type Mlead struct {
	Id          int
	FirstName   string
	LastName    string
	Email       string
	Company     string
	Postcode    string
	AcceptTerms bool
	DateCreated string
}

Customer data model record/lead structure

func AllLeads

func AllLeads() []Mlead

func CreateStubLeads

func CreateStubLeads() []Mlead

Stub customer/lead data to pre-poulate db with for test and dev.

func LeadById

func LeadById(id int) []Mlead

Retrieves lead by id.

Jump to

Keyboard shortcuts

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