a6s-chassis-minio
TypeScript icon, indicating that this package has built-in type declarations

0.3.7 • Public • Published

A6S: s3/minio File API

It's implemented as a microservice that maps URL sub-paths to s3/minio objects.

The config/default.yaml is used to configure the chassis, specificially the 's3' plugin.

The built-in "openapi" plugin is used to map requests to the 's3' operation.

Options

The "s3" options can be specified as a global config or within relevent the "openapi" definition.

    s3:
      enabled: true
      endPoint: play.minio.io
      port: 9000
      useSSL: true
      accessKey: abc
      secretKey: xyz
      buckets:
        example-01:
        example-02:

openapi plugin

The chassis is configured by an OpenAPI definition. The "operationId" fields must be mapped to a valid plugin.

The "operationId" can be used in more than one path - which is different from the Swagger/Open API specification.

openapi:
  paths:
    /s3/healthz:
      get:
        operationId: s3
        chassis:
          operation: healthz

    "/s3/:Bucket/:Key":
      get:
        operationId: s3
      post:
        operationId: s3
      put:
        operationId: s3
      delete:
        operationId: s3

For example:

    npm install && npm start
    curl -v http://localhost:7002/s3/healthz

Docker Demo

docker run -p 9000:9000 --name minio1 \
  -e "MINIO_ACCESS_KEY=example" \
  -e "MINIO_SECRET_KEY=example1234" \
  minio/minio server /data

Readme

Keywords

none

Package Sidebar

Install

npm i a6s-chassis-minio

Weekly Downloads

1

Version

0.3.7

License

ISC

Unpacked Size

60.4 kB

Total Files

24

Last publish

Collaborators

  • troven