SMarket

command module
v0.0.0-...-e9fbfd2 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2023 License: MIT Imports: 14 Imported by: 0

README

SMarket E-Commerce API


Table of Contents

Introduction

SMarket: Is an E-Commerce REST API. It can be used to perform all CRUD operations on a product.

Features

Here are some of the features:

  • Create Product
  • Get Product(s)
  • Update Product
  • Delete Product
  • Authenticate Users

Technology Used

  • Golang

Running the App

Perform the following steps to run the application:

1- Clone the App

$ git clone https://github.com/Surdy-A/SMarket.git

2- Setup the environment variables and database

$ source .env

3- Change directory into the SMarket and run

$ go run main.go

Server is listening on localhost:8010

Test

$ go test -v
=== RUN   TestEmptyTable
--- PASS: TestEmptyTable (0.00s)
=== RUN   TestGetNonExistentProduct
--- PASS: TestGetNonExistentProduct (0.00s)
=== RUN   TestCreateProduct
--- PASS: TestCreateProduct (0.00s)
=== RUN   TestGetProduct
--- PASS: TestGetProduct (0.00s)
=== RUN   TestUpdateProduct
--- PASS: TestUpdateProduct (0.01s)
=== RUN   TestDeleteProduct
--- PASS: TestDeleteProduct (0.01s)
PASS
ok      _/home/tom/r/go-mux-api 0.034s

License

Copyright (c) 2023 Rendered Text

Distributed under the MIT License. See the file LICENSE.

Documentation

Overview

main.go

Directories

Path Synopsis
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag

Jump to

Keyboard shortcuts

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