Skip to content

brkyozdemir/yemekSepeti

Repository files navigation

Go

yemekSepeti

golang in-memory

To build and run

go build
./yemekSepeti

After build, to run the tests

go test ./internal/handlers/commands
go test ./internal/handlers/queries

To run with dynamic interval

TIME_INTERVAL_IN_MINUTES=30 go run main.go

API DOC

Set Key

Request

POST /api/keys

{
    "testKey": "testValue"
}

Response

{
    "testKey": "testValue"
}

Get Key

Request

GET /api/keys/:key

Response

{
    "testKey": "testValue"
}

Flush Memory

Request

DELETE /api/keys

Response

{
    "message": "Store flushed successfully!"
}

Get List (Not requested)

Request

GET /api/keys

Response

[
    {
        "key0": "value0"
    },
    {
        "key1": "value1"
    }
]

Heroku base url

yemek-sepeti

Docker

docker pull berkay94/yemek-sepeti:latest