Sant470 / grep-api

Enables grep like feature to search log files stored in remote location through Rest API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Grep like API

The service has the following responsibilities

  1. Enables client to search the log files stored at s3

Run Locally

Clone the project

  git clone git@github.com:Sant470/grep-api.git

Go to the project directory

  cd grep-api
  add credential in config.yaml

Install dependencies

  go mod tidy

Start the server

  go run main.go

Use the below curl to test it

  curl --location 'http://localhost:8000/api/v1/search' \
--header 'Content-Type: application/json' \
--data '{
    "search_keyword": "hello, world",
    "from": 1704516560,
    "to": 1708636658
}'

Dependency && Installation

It requires go version 1.21.5, you can download it following the guide mentioned below

   https://go.dev/dl/

About

Enables grep like feature to search log files stored in remote location through Rest API


Languages

Language:Go 100.0%