tickets-lambda-basket-service

module
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: GPL-3.0

README

tickets-lambda-basket-service

A lambda function responsible for taking purchase details from frontend form, checking stock, calcuating the balance and starting the payment process

Install dependencies

make deps

Build

To build the source, targetting AWS Lambda architecture, run

make

Deploy

To deploy to AWS, run

make deploy

This assumes the following:

  • AWS CLI is installed and client is authenticated with AWS
  • The ARN for the lambda function where the binary is to be deployed is set as an environment variable like so:
export ARN=<ARN_GOES_HERE>

Clean

To clean the build directory run

make clean

Test

To run all unit tests, run

make test

N.B. Testing will fail is code coverage is too low. Currently coverage needs to be at least 90%

Code coverage report

This will produce a code coverage report and serve it using python3's http.server library on localhost port 8000 This assumes python3 is already installed

make cover

Go vet

make vet

Go fmt

make fmt

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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