infernalmedia / flysystem-gitea-storage
Flysystem适配Gitea仓库文件API v1
v0.0.1
2023-11-17 16:47 UTC
Requires
- php: ^8.0
- ext-json: *
- guzzlehttp/guzzle: ^7.0
- league/flysystem: ^2.0 || ^3.0
Requires (Dev)
- phpunit/phpunit: ^9.2
This package is auto-updated.
Last update: 2024-09-17 19:08:32 UTC
README
为Flysystem提供的Gitea存储文件系统。
此包包含一个用于Gitea的Flysystem适配器。底层使用Gitea的API v1。
这是一个从卓越的RoyVoetman/flysystem-gitlab-storage包分叉的版本,已适配Gitea的API。
安装
composer require infernalmedia/flysystem-gitea-storage
用法
// Create a Gitea Client to talk with the API $client = new Client('username', 'repository', 'branch', 'base-url', 'personal-access-token'); // Create the Adapter that implements Flysystems AdapterInterface $adapter = new GiteaAdapter( // Gitea API Client $client, // Optional path prefix 'path/prefix', ); // The FilesystemOperator $filesystem = new League\Flysystem\Filesystem($adapter); // see http://flysystem.thephpleague.com/api/ for full list of available functionality
用户名
这是存储仓库的用户名或组织名称。
仓库
仓库的名称。
基本URL
这将是你托管Gitea服务器的URL(例如 https://gitea.com)
访问令牌(私有项目必须提供)
Gitea支持使用个人访问令牌进行服务器端API身份验证
个人访问令牌可以创建于用户账户的设置页面。
变更日志
请参阅CHANGELOG以获取更多关于最近更改的信息。
贡献
贡献是欢迎的,并且将得到完全的认可。我们接受通过Github的Pull Requests提交的贡献。
Pull Requests
- PSR-2编码规范 - 应用这些规范最简单的方法是安装PHP Code Sniffer。
- 记录任何行为变更 - 确保更新
README.md和其他相关文档。 - 创建功能分支 - 不要要求我们从你的master分支中拉取。
- 每个功能一个pull request - 如果你想做更多的事情,请发送多个pull requests。
许可证
MIT许可证(MIT)。请参阅许可证文件以获取更多信息。