New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

github.com/cloudsftp/ResourceBlockerBackend

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/cloudsftp/ResourceBlockerBackend

  • v0.1.3
  • Source
  • Go
  • Socket score

Version published
Created
Source

Resource Blocker Backend version

Build Develop

Usage

go run main/main.go

Config

Copy config.example.json to config.json. The example has the following content:

{
    "port": 5000,
    "resources": {
        "test": {
            "name": "Test Resource",
            "min": 0,
            "max": 3
        }
    }
}

The server will listen on port 5000.

There is only one resource configured. It has the id test. When requesting the status over the API, use this id. It's name is Test Resource and it's status has to be in the range between 0 and 3.

For Developers

gow run main/main.go

Adds automatic reloads. If gow is not installed:

go install github.com/mitranim/gow@latest

API

/

GET

Returns all registered resources. For example:

{
    "resources": [
        "bikebox1",
        "garage1"
    ]
}

/{resource}/

GET

Returns the status of the resource. For example:

{
    "name": "Test Resource",
    "num": 1
}
POST

To request an update of the resource status. The request must be in the following format:

{
    "delta": -1
}

It then returns the updated status of the resource (see above)

FAQs

Package last updated on 25 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc