Socket
Book a DemoInstallSign in
Socket

github.com/shitpostingio/fingerprint-microservice

Package Overview
Dependencies
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/shitpostingio/fingerprint-microservice

Source
Go
Version
v0.0.0-20210103160849-e025a70be4e5
Version published
Created
Source

Fingerprint Microservice

REST-powered microservice for analyzing media and returning feature-based information. The repository also contains a client to perform requests to the service.

It is important to notice that this service provides no support for authentication or caching. It is also completely stateless, making it ideal to be used in the backend. A possible "frontend" implementation can be found in Analysis API.

Endpoints

  • Image endpoint: <bind-address>/fingerprinting/image
  • Video endpoint: <bind-address>/fingerprinting/video
  • Health check: <bind-address>/healthy

Returned data

The data returned by the server is in the form:

type Analysis struct {
    Fingerprint            FingerprintResponse
    NSFW                   NSFWResponse
    FingerprintErrorString string
    NSFWErrorString        string
}

The client trims off the unnecessary data and returns:

type FingerprintResponse struct {
    PHash     string
    Histogram []float64
}

Environment options

  • Service bind address and port: FP_BIND_ADDRESS (defaults to localhost:10000).
  • Max size for image files: FP_MAX_IMAGE_SIZE (defaults to 10 << 20, 10 MB).
  • Max size for video files: FP_MAX_VIDEO_SIZE (defaults to 20 << 20, 20 MB).

FAQs

Package last updated on 03 Jan 2021

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