New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gitlab.com/ionehouten/evermostest

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitlab.com/ionehouten/evermostest

  • v0.0.0-20220110165037-8798c9ecf316
  • Source
  • Go
  • Socket score

Version published
Created
Source

GOLANG EVERMOS TEST

Iwan Setiawan - ione.thea27@gmail.com


Contents


Task 1

From the description explained, that the stock error can be caused by accessing the same transaction at the same time, it is clear that the backend service cannot handle this so there is overlap between transactions.

In this test I use 2 techniques to deal with this

  1. Using the table locking if you use this method, if there are overlapping transactions then other transactions will be immediately aborted, this method will not damage the transaction data but will disturb the user

  2. Using the queuing technique with a message broker this method is very good to use, because transactions are queued, transactions will not overlap, the process will be faster because the user does not have to wait until the process is complete, but the system must provide additional notification to the user that a transaction has been successful or not

Requirements

  • Golang 1.17 or newer: https://golang.org/doc/install

  • VS Code Extension : Go

  • Install Requirement Package (CLI)

    • GO Env : go install github.com/joho/godotenv/cmd/godotenv
    • GIN Gonic Framework : go install github.com/codegangsta/gin
    • Swagger : go install github.com/swaggo/swag/cmd/swag@latest
  • Download Package

    • go mod download
  • MySql/MariaDb Database

  • RabbitMq

Config

Environment

ConfigFilePathDesciption
Environmentshop/.envDatabase, App & Security Config
Environmentshop-consumer/.envDatabase, App & Security Config

OAuth2 - Grant Type = Password

UsernamePasswordClientIdClientSecret
iwanadminEVERMOS-SHOP923753F2317FC1EE5B52DF23951B1

Development

NameUrl
Base Urlhttp://localhost:3000
Base Api Urlhttp://localhost:3000/evermos-api/v1
Swaggerhttp://localhost:3000/swagger/index.html

Files

NameFile
Postman CollectionEvermos - Shop.postman_collection.json
Postman EnvironmentEvermos - Shop.postman_environment.json
ERDERD.png
SQL Databasedump*.sql

Task 2

the source code for treasure hunt is in the treasure-hunt folder

Don't hesitate to contact if you have any questions

FAQs

Package last updated on 10 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc