This repo represents an auction system which can auction bids and select the winning bid such that it always responds before a specific time interval.
- Docker, Docker Compose
- Golang
git clone https://github.com/NoSkillGirl/greedy_bidders.git
cd greedy_bidders
docker-compose rm -f && docker-compose up --remove-orphans --build
This repo is having 4 public endpoints:
- New Auction
- RegisterBidder
- GetActiveRegisteredBidders
- BidderRequest
- Type: JSON
- PARMAS: auction_id
Example:
{
"auction_id": "PEN656"
}
- Type: JSON
- Response Structure
{
"bidder_id": "id of the bidder",
"price": "bid bidded by the bidder"
}
Example:
{
"bidder_id": "0905b10e-5e28-11ea-9aa1-0242ac130004",
"price": 75.65
}
- Type: JSON
- PARMAS: bidder_id, host
Example:
{
"bidder_id": "0905b10e-5e28-11ea-9aa1-0242ac130004",
"host": "http://localhost:8090"
}
- Type: JSON
- Response Structure
{}
- Type: JSON
- PARMAS: Empty JSON
Example:
{}
- Type: JSON
- Response Structure
{
"bidder_ids": [
"id of bidder1"
"id of bidder2"
"id of bidder3"
]
}
Example:
{
"bidder_ids": [
"0905b10e-5e28-11ea-9aa1-0242ac130004"
"8f392adc-5dff-11ea-bb7c-a683e76d0373"
"9a4ff752-5dff-11ea-ab32-a683e76d0373"
]
}
- Type: JSON
- PARMAS: auction_id
Example:
{
"auction_id": "test"
}
- Type: JSON
- Response Structure
{
"bidder_id": "id of the bidder",
"price": "bid bidded by the bidder"
}
Example:
{
"bidder_id": "0905b10e-5e28-11ea-9aa1-0242ac130004",
"price": 75.65
}