kuncie-cart

module
v0.0.0-...-7abf632 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2022 License: MIT

README

Kuncie Cart

Description

This is an implementation of Kuncie cart in Go (Golang) projects.

How To Run This Project

Make Sure you have run the database/20220121081800_cart.sql in your mysql

Since the project already use Go Module, I recommend to put the source code in any folder but GOPATH.

Run the Testing
$ make test
Run the Applications

Here is the steps to run it with docker-compose

#move to directory
$ cd workspace

# Clone into YOUR $GOPATH/src
$ git clone https://github.com/williamchand/kuncie-cart.git

#move to project
$ cd kuncie-cart

# Build the docker image first
$ make docker

# Run the application
$ make run

# check if the containers are running
$ docker ps

# Execute the call
$ curl localhost:9090/kuncie-cart

# Stop
$ make stop

## Query add cart

mutation AddCart($sku: String, $quantity: Int) { AddCart(sku: $sku, quantity: $quantity) { id items_id quantity } }

### Query variables

{ "quantity": 1, "sku": "120P90" }

## Query order items at cart

mutation ConfirmOrder($placeholder: String) { ConfirmOrder(placeholder: $placeholder) { id total_price } }


### Query variables

{ "placeholder": "" }

Directories

Path Synopsis
mocks
Code generated by mockery v1.0.0 Code generated by mockery v1.0.0
Code generated by mockery v1.0.0 Code generated by mockery v1.0.0

Jump to

Keyboard shortcuts

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