go-ipfs-config: add remote pinning services config
Adin Schmahmann committed
Dec 4, 2020 at 15:51 UTC
06fe9679550d1cb5b5e19cca2b87ede7aa1e9a91
2 files changed
+21
config/config.go
+1
@@ -33,6 +33,7 @@ type Config struct {
33
Reprovider Reprovider
34
Experimental Experiments
35
Plugins Plugins
36
+ Pinning Pinning
37
}
38
39
const (
config/remotepin.go
new
+20
@@ -0,0 +1,20 @@
1
+package config
2
+
3
+const (
4
+ PinningTag = "Pinning"
5
+ RemoteServicesTag = "RemoteServices"
6
+ RemoteServicesSelector = PinningTag + "." + RemoteServicesTag
7
+)
8
+
9
+type Pinning struct {
10
+ RemoteServices map[string]RemotePinningService
11
+}
12
+
13
+type RemotePinningService struct {
14
+ Api RemotePinningServiceApi
15
+}
16
+
17
+type RemotePinningServiceApi struct {
18
+ Endpoint string
19
+ Key string
20
+}