Skip to content

peterahlstrom/go-getter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-getter

Prerequisites

Go version > 1.23.5

Usage

In root directory:

Build application binary

$ go build main.go

Specify endpoints in config.json

Run the application

$ ./main <port>

config.json example

{
  "logPath": "go-getter.log",
  "concurrentScriptsLimit": 3,
  "endpoints": {
    "/data1": {
      "scriptPath": "./script1.sh",
      "contentType": "application/json",
      "requireAuth": true,
      "apiKeys": {
        "abc123": "dev",
        "def456": "prod"
      }
    },
    "/data2": {
      "scriptPath": "./script2.sh",
      "contentType": "text/plain",
      "requireAuth": false
    }
  }
}

Query example

$ curl -H "Authorization: ApiKey abc123" localhost:7980/data1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published