Skip to content

Commit

Permalink
Merge pull request #1 from uddugteam/ipfs-storage
Browse files Browse the repository at this point in the history
Ipfs storage
  • Loading branch information
andskur authored Feb 8, 2023
2 parents 1b5e8ec + f010eae commit 864db86
Show file tree
Hide file tree
Showing 16 changed files with 1,495 additions and 144 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@ __debug_bin

.repos/

gitsec-backend
gitsec-backend

local/

.fs.json
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ You can also clone the repository using the git clone command:
$ git clone http://localhost:8080/repos/repo.git
```


## Configuration
The following environment variables can be used to configure the server:

Expand All @@ -76,10 +75,13 @@ The following environment variables can be used to configure the server:
* `make lint`: Runs the linter to check

## Todo
- [ ] Add support for SSH protocol
- [x] Add support for IPFS storage
- [ ] Add support for onchain registry
- [ ] Add disaster recovery for repo storage
- [ ] Add performance optimisation for IPFS storage
- [ ] Add support for SSH protocols
- [ ] Add authentication
- [ ] Add SSL/TLS support
- [ ] Add repository management features
- [ ] Add Git hooks support

## Contributing
Expand Down
2 changes: 2 additions & 0 deletions config/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ func init() {
viper.SetDefault("http.port", 8080)

viper.SetDefault("git.path", ".repos/")

viper.SetDefault("ipfs.address", "http://127.0.0.1:5001")
}
9 changes: 9 additions & 0 deletions config/scheme.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ type Scheme struct {

// Git is the configuration for the Git server.
Git *Git

// Ipfs is the configuration for the Ipfs client.
Ipfs *Ipfs
}

// HTTP represents the HTTP server configuration scheme.
Expand All @@ -23,3 +26,9 @@ type Git struct {
// Path is the path to the Git repositories.
Path string
}

// Ipfs represent Ipfs client configuration scheme.
type Ipfs struct {
// Address of Ipfs node
Address string
}
23 changes: 23 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ require (
github.com/go-chi/chi/v5 v5.0.8
github.com/go-git/go-billy/v5 v5.3.1
github.com/go-git/go-git/v5 v5.4.2
github.com/ipfs/go-ipfs-api v0.3.0
github.com/misnaged/annales v0.0.4
github.com/spf13/cobra v1.5.0
github.com/spf13/pflag v1.0.5
Expand All @@ -17,29 +18,51 @@ require (
github.com/Microsoft/go-winio v0.6.0 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4 // indirect
github.com/acomagu/bufpipe v1.0.3 // indirect
github.com/btcsuite/btcd v0.20.1-beta // indirect
github.com/cloudflare/circl v1.3.1 // indirect
github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/go-git/gcfg v1.5.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/ipfs/go-cid v0.0.7 // indirect
github.com/ipfs/go-ipfs-files v0.0.9 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/libp2p/go-buffer-pool v0.0.2 // indirect
github.com/libp2p/go-flow-metrics v0.0.3 // indirect
github.com/libp2p/go-libp2p-core v0.6.1 // indirect
github.com/libp2p/go-openssl v0.0.7 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 // indirect
github.com/minio/sha256-simd v0.1.1 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mr-tron/base58 v1.2.0 // indirect
github.com/multiformats/go-base32 v0.0.3 // indirect
github.com/multiformats/go-base36 v0.1.0 // indirect
github.com/multiformats/go-multiaddr v0.3.0 // indirect
github.com/multiformats/go-multibase v0.0.3 // indirect
github.com/multiformats/go-multihash v0.0.14 // indirect
github.com/multiformats/go-varint v0.0.6 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.2 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/sergi/go-diff v1.2.0 // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/spf13/afero v1.9.2 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/subosito/gotenv v1.4.0 // indirect
github.com/whyrusleeping/tar-utils v0.0.0-20180509141711-8c6c8ba81d5c // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
go.opencensus.io v0.23.0 // indirect
golang.org/x/crypto v0.4.0 // indirect
golang.org/x/mod v0.7.0 // indirect
golang.org/x/net v0.4.0 // indirect
Expand Down
Loading

0 comments on commit 864db86

Please sign in to comment.