Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add doge driver #6201

Merged
merged 6 commits into from
Mar 25, 2024
Merged

feat: add doge driver #6201

merged 6 commits into from
Mar 25, 2024

Conversation

eryajf
Copy link
Contributor

@eryajf eryajf commented Mar 11, 2024

添加 多吉云 存储驱动 🎉

多吉云存储:https://www.dogecloud.com/product/oss

存储配置参数:多吉云存储配置参数与s3一模一样(因此前端只需要在下拉列表中增加多吉云选项即可),但因为官方针对秘钥做了一层封装,真正的s3对应sdk使用的秘钥,需要通过官方接口进行生成(这也是这次PR产生的背景),且时效为2小时(我没有阅读这个项目全部的代码,不知道当前这种生成秘钥的方式是否会失效,见:https://github.com/eryajf/alist/blob/bccd18f2c667770c28349bea66ecce163d850cf1/drivers/doge/util.go#L30 )。

目前测试创建文件夹,创建文件,上传文件等常用功能均正常,

关联issue:

其他补充:另外给项目增加了 .art.toml ,以便于后续开发者直接运行 air 命令就能把应用跑起来。

Copy link

welcome bot commented Mar 11, 2024

Thanks for opening this pull request! Please check out our contributing guidelines.

@xhofe
Copy link
Member

xhofe commented Mar 24, 2024

如果此driver大部分都与s3类似,最好是在s3上做hack,以便于统一维护。类似于https://github.com/alist-org/alist/tree/main/drivers/quark_uchttps://github.com/alist-org/alist/tree/main/drivers/lanzou

@eryajf
Copy link
Contributor Author

eryajf commented Mar 24, 2024

事实上也是完全拷贝的s3,只在 initSession 的地方兼容了doge的秘钥(这也是doge官方多加了一层封装的缘故)加载方式,然后其他的就一模一样了。

@eryajf
Copy link
Contributor Author

eryajf commented Mar 25, 2024

这个PR还有哪些需要测试,或者解决的问题吗,如有请告知我,我来调整。

这边打算把自己的obsidian从坚果云迁移到alist了,现在就等这个pr啦。🫡

@xhofe xhofe merged commit cf08aa3 into alist-org:main Mar 25, 2024
3 checks passed
Copy link

welcome bot commented Mar 25, 2024

Congrats on merging your first pull request! We here at behavior bot are proud of you!

@eryajf
Copy link
Contributor Author

eryajf commented Mar 26, 2024

@xhofe 我昨天配置上了,现在的确有问题,特来请教一下。我发现配置过程完全没问题了,但是过一段时间之后,再次访问alist的首页,多吉云的就会报403了,此时,我到管理后台,进到存储管理,然后编辑多吉云这个配置,重新点击保存,之后再来到首页,就又正常了。

基于这个情况,想请教一下,是不是代码逻辑那里需要加下什么,或者是我设置里需要加些什么,才能规避这个问题呢?

EtherealAO pushed a commit to EtherealAO/alist that referenced this pull request Apr 12, 2024
* feat: add doge driver

* doc: 补充readme文档

* fix: 对齐meta信息

* fix: 调整结构体名字,与driver保持一致

* perf: merge to s3

* Rename goge.go to doge.go

---------

Co-authored-by: Andy Hsu <i@nn.ci>
EtherealAO pushed a commit to EtherealAO/alist that referenced this pull request Apr 12, 2024
* feat: add doge driver

* doc: 补充readme文档

* fix: 对齐meta信息

* fix: 调整结构体名字,与driver保持一致

* perf: merge to s3

* Rename goge.go to doge.go

---------

Co-authored-by: Andy Hsu <i@nn.ci>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants