Microservice on IPv4: 3000 port without database. Upon request, returns the source JSON in the desired format

📜 Этапы

V1.0

  • Микросервис на IPv4:3000 порту без базы данных. По запросу возвращает JSON источника в нужном формате.
  • Без тестов и бенчмаринга

V2.0

Тестовое задание

Нужно разработать веб-сервер, который по обращении к нему отдает данные в указанном формате. Данные берутся из внешнего источника и сохраняются в БД раз в 30 секунд, а ответ на запрос должен формироваться на основе данных в БД. В качестве СУБД рекомендуется использовать Postgres, MongoDB, либо SQLite. Опционально рекомендуется сделать конфиг docker-compose, который запускает сервер вместе с сервером базы данных (для встраиваемых СУБД не нужно).

Структура данных

Источник: https://api.blockchain.com/v3/exchange/tickers

На входе будет следущая структура:

[{symbol: [string], price_24h: [float64], volume_24h: [float64], last_trade_price: [float64]}...]

На выходе список должен иметь следующий вид:

{<symbol>: {price: <price_24h>, volume: <volume_24h>, last_trade: <last_trade>}...}

Пример

Входные данные:

[

{

"symbol":"XLM-EUR",

"price_24h":0.25685,

"volume_24h":49644.7076291,

"last_trade_price":0.24

}

]

Выходные данные:

{

"XLM-EUR": {

"price": 0.25685,

"volume": 49644.7076291,

"last_trade":0.24

}

}

Дополнительно

Залить код на гит-репозиторий

Similar Resources

Open-source platform to request any SSP like Bidswitch or Xandr.

The project goal is to provide an unique program to contact every SSP without know the differences between all of them.

Apr 7, 2022

This small service will pong the headers provided in the request as json response

This small service will pong the headers provided in the request as json response server will run on port 5000 content will be served at path /request

Dec 9, 2021

IPIP.net officially supported IP database ipdb format parsing library

IPIP.net officially supported IP database ipdb format parsing library

Dec 27, 2022

Jswhois - Whois lookup results in json format

jswhois -- whois lookup results in json format jswhois(1) is a tool to look up a

Nov 30, 2022

go-jsonc provides a way to work with commented json by converting it to plain json.

JSON with comments for GO Decodes a "commented json" to "json". Provided, the input must be a valid jsonc document. Supports io.Reader With this, we c

Apr 6, 2022

A simple tool for retrieving a request's IP address on the server.

reqip A simple tool for retrieving a request's IP address on the server. Inspired from request-ip Installation Via go get go get github.com/mo7zayed/r

Oct 26, 2022

Uses the Finger user information protocol to open a TCP connection that makes a request to a Finger server

Finger Client This client uses the Finger user information protocol to open a TCP connection that makes a request to a Finger server. Build and Run Ru

Oct 7, 2021

a tcp framework which support pub/sub and request/reply

支持 事件订阅/请求回应 的的TCP通讯框架 源于 zinx 的业务定制版本 TCP 通讯框架 特点 服务端/客户端均支持订阅事件通讯. 服务端支持 Broadcast 方式发送信息到客户端. 客户端均支持 Request/Reply 方式与服务端通讯 服务端用多个worker去处理客户端的请求 目

Oct 9, 2021

parse-curl.js golang version. Parse curl commands, returning an object representing the request.

parse-curl.js golang version. Parse curl commands, returning an object representing the request.

Nov 1, 2022
SOCKS Protocol Version 5 Library in Go. Full TCP/UDP and IPv4/IPv6 support

socks5 中文 SOCKS Protocol Version 5 Library. Full TCP/UDP and IPv4/IPv6 support. Goals: KISS, less is more, small API, code is like the original protoc

Jan 8, 2023
🖨️ This is a simple IPv4 subnet calculator.
🖨️ This is a simple IPv4 subnet calculator.

IPv4 Subnet Calculator Quick Start Linux & Mac: git clone https://github.com/0l1v3rr/subnet-calculator.git cd subnet-calculator make run Windows: (Onl

Dec 20, 2022
Quickly find all IPv6 and IPv4 hosts in a LAN.

invaentory Quickly find all IPv6 and IPv4 hosts in a LAN. Overview ?? This project is a work-in-progress! Instructions will be added as soon as it is

May 17, 2022
Request: a HTTP request library for Go with interfaces and mocks for unit tests

Requester Request is a HTTP request library for Go with interfaces and mocks for

Jan 10, 2022
Capture packet request/response pairs for a port and/or IP to aid in Network protocol based Nuclei Templates creation.

network-fingerprint Capture packet request/response pairs for a port and/or IP to aid in Network protocol based Nuclei Templates creation. Resources I

Nov 15, 2022
Port-proxy - Temporary expose port for remote connections

Port proxy util Temporary expose port for remote connections. E.g. database/wind

Jan 27, 2022
rconn is a multiplatform program for creating generic reverse connections. Lets you consume services that are behind firewall or NAT without opening ports or port-forwarding.
rconn is a multiplatform program for creating generic reverse connections. Lets you consume services that are behind firewall or NAT without opening ports or port-forwarding.

rconn (r[everse] conn[ection]) is a multiplatform program for creating reverse connections. It lets you consume services that are behind NAT and/or fi

Jan 1, 2023
viagh.NewHTTPClient returns a *http.Client that makes API requests via the gh command.

viagh viagh.NewHTTPClient returns a *http.Client that makes API requests via the gh command. Why viagh? When writing a GitHub CLI extension, the exten

Dec 24, 2021
Passwordstrength - Returns the strength of the password

passwordstrength service returns the strength of the password. Developer Setup A

Dec 30, 2021
Takes an integer array, returns the array sorted and the number of inversions in the array

Takes an integer slice, returns the slice sorted and the number of inversions in the slice

Jan 25, 2022