cactus-io/mammillaria
Composer 安装命令:
composer create-project cactus-io/mammillaria
包简介
A simple fast and stateless download micro-service
关键字:
README 文档
README
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.
cactus-io/mammillaria 适用场景与选型建议
cactus-io/mammillaria 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 17 次下载、GitHub Stars 达 4, 最近一次更新时间为 2020 年 12 月 06 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「http」 「downloader」 「Cactus」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 cactus-io/mammillaria 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 cactus-io/mammillaria 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 cactus-io/mammillaria 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
repository php library
The NzoFileDownloaderBundle is a Symfony Bundle used to Download all types of files from servers and Web applications safely and with ease. You can also read/show the file content in the Web Browser.
PHP powered alternative for youtube-dl
Utility for downloading Microsoft Edge Driver binary with browser version detection
Downloader Library
selenium-server-standalone, ChromeDriver, geckodriver and IEDriverServer downloader.
统计信息
- 总下载量: 17
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-12-06