Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@opuscapita/blob-client

Package Overview
Dependencies
Maintainers
29
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opuscapita/blob-client

Client for OpusCapita Business Network file storage service.

  • 2.0.11
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
36
decreased by-12.2%
Maintainers
29
Weekly downloads
 
Created
Source

@opuscapita/blob-client

This module provides simple and easy server side access to the blob storage service. For further details of how to use this module, please have a look at the wiki of this module and the blob service wiki.


Minimum setup

First got to your local code directory and run:

npm install @opuscapita/blob-client

In order to run BlobClient, you'll need a setup consisting of a running blob service and a working consul service registry with the blob service being registered under the name blob.

Since version 2.0, @opuscapita/blob-client defines multiple classes depending on which part of blob service one wants to access. Currently there are multiple classes which directly inherit BlobClient and therefor are interface compatible.

  • BlobClient
  • TempFileClient
  • DataFileClient
const { BlobClient, TempFileClient, DataFileClient } = require('@opuscapita/blob-client');

const blobClient = new BlobClient();
blobClient.getFileInfo('c_tenant', '/public/myFile.ext').then(info => console.log(info)).catch(err => console.log(err));

const tempFileClient = new TempFileClient();
tempFileClient.getFileInfo('c_tenant', '/public/myFile.ext').then(info => console.log(info)).catch(err => console.log(err));

const dataFileClient = new DataFileClient();
dataFileClient.getFileInfo('c_tenant', '/public/myFile.ext').then(info => console.log(info)).catch(err => console.log(err));

If an error occurs (HTTP status code >= 400), a result promise gets rejected as defined by the rules of ServiceClient.


Default configuration

The default configuration object provides hints about what the module's standard behavior is like and which configuration options are available. For further details about the API, please have a look at the wiki.

{
    consul : {
        host : 'consul'
    },
    serviceClient : null,
    forceServiceToken : false,
    clientType : 'files'
}

FAQs

Package last updated on 17 Sep 2019

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