Download the PHP package cactus-io/mammillaria without Composer

On this page you can find all versions of the php package cactus-io/mammillaria. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package mammillaria

Mammillaria

Mammillaria is light, fast, and stateless file download micro-service that servered contents to be download by 3th partis.

Mammillaria uses JWT to protect contents from anonymous access while providing a direct link to contents.

Download API

The REST API to download a file is:

GET: {host}/api/v2/cactus/files/{token}/content

Where {host} is the full path of the server and {token} is a JWT token.

Token

Information of the file, access control, and other metadata are placed in the JWT token. There are several fields in the token to control Mammillaria. For more information about field in the token see document/token.md

Quick Start

Create a directory

mkdir mammillaria
cd mammillaria

Create a test file:

touch README.md
echo "#Hello world">>README.md
cd ..

First of all generate a token by executing the following command:

docker run -it \
    cactusio/mammillaria:latest \
    ../bin/generate-token

Fill all required attribute to generate a new token:

Mammillaria
File Path:/README.md
Access (r, rw, w):r
Expire at (ex. 2021-01-01 00:00:00):2021-01-01 00:00:00
Key:321

-------------------------------------------
Token:
-------------------------------------------
 File     |/README.md
 Access   |r
 Expiry   |2021-01-01 00:00:00
-------------------------------------------
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJwYXRoIjoiXC9SRUFETUUubWQiLCJhY2Nlc3MiOiJyIiwiZXhwaXJ5IjoiMjAyMS0wMS0wMSAwMDowMDowMCIsImhvc3QiOm51bGwsImFjY291bnQiOm51bGx9.7ayp1qlry4F_3yTJ1RkG9lYGgBowHVhXZoXYINjuyj8

To run a new instance of the server:

docker run \
    -p "80:80" \
    -e "MAMMILLARIA_JWT_KEY=321" \
    -v ./mammillaria:/mnt/storage \
    cactusio/mammillaria:latest

Open a browser to download the file

http://localhost:80/api/v2/{token}/content

example:

http://localhost:80/api/v2/cactus/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJwYXRoIjoiXC9SRUFETUUubWQiLCJhY2Nlc3MiOiJyIiwiZXhwaXJ5IjoiMjAyMS0wMS0wMSAwMDowMDowMCIsImhvc3QiOm51bGwsImFjY291bnQiOm51bGx9.7ayp1qlry4F_3yTJ1RkG9lYGgBowHVhXZoXYINjuyj8/content

Contributing

If you would like to contribute to the project, please read our contributor documentation and the CONTRIBUTING.md. The CONTRIBUTING.md file explains how to set up a development installation, how to run the test suite, and how to contribute to documentation.

For a high-level view of the vision and next directions of the project, see the Cactus community roadmap.


All versions of mammillaria with dependencies

PHP Build Version
Package Version
Requires firebase/php-jwt Version 5.x
pluf/scion Version 7.0.x
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package cactus-io/mammillaria contains the following files

Loading the files please wait ....