customer

package
v0.0.0-...-671933c Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LambdaFunctions

func LambdaFunctions(api *sparta.API) []*sparta.LambdaAWSInfo

Types

type Contact

type Contact struct {
	FirstName string
	LastName  string
	Address   string
	City      string
	State     string
	Zip       string
}

type Customer

type Customer struct {
	PK         string
	SK         string
	GSI2PK     string
	Phone      string // Customer's unique key.
	StorePhone string // Foreign key to customer's store.
	Contact    Contact
}

func FromJSON

func FromJSON(jsonSrc string) (cus *Customer, err error)

func Get

func Get(phone string) (cus Customer, err error)

func (*Customer) Init

func (c *Customer) Init()

func (*Customer) MakeGSI2PK

func (c *Customer) MakeGSI2PK() string

func (*Customer) MakePK

func (c *Customer) MakePK() string

func (*Customer) MakeSK

func (c *Customer) MakeSK() string

func (Customer) Put

func (c Customer) Put() error

func (Customer) PutRental

func (c Customer) PutRental() (CustomerRental, error)

type CustomerRental

type CustomerRental struct {
	PK    string
	SK    string
	Phone string
	Date  time.Time
}

CustomerRental represents an occasion when the customer rented movies.

func (*CustomerRental) Init

func (cr *CustomerRental) Init()

func (*CustomerRental) MakePK

func (cr *CustomerRental) MakePK() string

func (*CustomerRental) MakeSK

func (cr *CustomerRental) MakeSK() string

Jump to

Keyboard shortcuts

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