Skip to content

Instantly share code, notes, and snippets.

View SeanChao's full-sized avatar

Sean Chao SeanChao

  • Cambridge, UK
  • 16:12 (UTC +01:00)
View GitHub Profile
@SeanChao
SeanChao / .stignore
Created January 18, 2021 15:04
Syncthing ignore list
/node_modules
/.build
// Android
app/build
app/libs
target
build
// permission error
qaq-docker/mongo-data/journal
@SeanChao
SeanChao / smart_pointer.cc
Created March 21, 2021 09:57
A simple smart pointer implementation
template <typename T>
class shared {
public:
shared(T* ptr) : ptr(ptr) {
ref_cnt = new size_t(1);
};
shared& operator=(const shared& rhs) {
if (*(this->ref_cnt) == 1) {
delete ref_cnt;
@SeanChao
SeanChao / README.md
Last active June 8, 2021 13:08
Preliminary Plan for go-storage-ipfs

技术方案

背景

go-storage 是用 Golang 实现的抽象存储模块,支持各种存储服务。本方案的目的是为实现 go-storage 对 IPFS 的适配。go-storage 已经支持了较多的存储服务,例如 azblob, cos, dropbox 等。

go-service-example 是扩展 go-storage 的模板仓库,可以在此基础上进行修改以适配 IPFS。

go-ipfs 是 IPFS 的官方 Go 实现,可以作为依赖库集成到其它 Go 项目中。