skipper-openstack-v2

1.2.0 • Public • Published

skipper emblem - face of a ship's captain adapter for OpenStack Swift

NPM version     Dependencies

Skipper is a piece of middleware for Express that allows you to pipe/stream multipart form uploads for various storage endpoints. This project implements an OpenStack Swift adapter for Skipper.

This adapter is a new version of skipper-openstack that is up-to-date, actually working and more feature complete. It's written in ES6.

Examples

// api/controllers/UploadController.js
const crypto = require('crypto');
const skipperSwift = require('skipper-openstack-v2');
 
const algorithm = 'aes-256-ctr';
 
module.exports = {
  download: (req, res) => {
    const password = 'my-encryption-password';
 
    skipperSwift.read({
      container: 'my-container',
      credentials: {
        username: 'my-user@example.com',
        password: 'MySecretPasswordHere1337',
        authUrl: 'https://auth.my.openstack.url.com:5000',
        tenantId: '<tenant id (md5 hash)>',
        region: 'regionOne',
      },
      fileEncryption: {
        enabled: true,
        algorithm: 'aes-256-ctr',
        password: 'super-secret-pw',
      },
      getFilename: (newFile) => newFile.fd,
    }, req.params.filename, res);
  },
};

Configuration options

TODO

  • Write tests

Package Sidebar

Install

npm i skipper-openstack-v2

Weekly Downloads

0

Version

1.2.0

License

APSL-2.0

Unpacked Size

106 kB

Total Files

9

Last publish

Collaborators

  • olibre01
  • unnat.agarwal
  • mayankdpo
  • bazze
  • a.pirozhkov