Skip to content

Commit

Permalink
postgres config values imported from path variables + shell script; g…
Browse files Browse the repository at this point in the history
…x release 0.4.20
  • Loading branch information
i-norden committed Dec 13, 2018
1 parent 3c1e801 commit a0db370
Show file tree
Hide file tree
Showing 33 changed files with 101 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .gx/lastpubver
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.19: QmNMTmQFTwGUzwCDhsXRSYUS5ZZ3GJrWbsy1nEmUErjQ97
0.4.20: QmNVba6esWZegye6kfURL5YnQapDYqfiemCUGhstMSFTpj
2 changes: 1 addition & 1 deletion cmd/ipfs/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
fsrepo "github.com/ipfs/go-ipfs/repo/fsrepo"

"gx/ipfs/Qma6uuSyjkecGhMFFLfzyJDPyoDtNJSHJNweDccZhaWkgU/go-ipfs-cmds"
"gx/ipfs/QmdJceoZvjZMmVeZQqcPq2BT44x44Kq88DY1PRpNZtCagF/go-ipfs-config"
"gx/ipfs/QmbZ4DPNi99YQwzFSKsdU7pLmieiWs7ajGkPrfvpGjfAFN/go-ipfs-config"
"gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/ipfs/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ import (
"gx/ipfs/Qma6uuSyjkecGhMFFLfzyJDPyoDtNJSHJNweDccZhaWkgU/go-ipfs-cmds"
"gx/ipfs/Qma6uuSyjkecGhMFFLfzyJDPyoDtNJSHJNweDccZhaWkgU/go-ipfs-cmds/cli"
"gx/ipfs/Qma6uuSyjkecGhMFFLfzyJDPyoDtNJSHJNweDccZhaWkgU/go-ipfs-cmds/http"
"gx/ipfs/QmbZ4DPNi99YQwzFSKsdU7pLmieiWs7ajGkPrfvpGjfAFN/go-ipfs-config"
logging "gx/ipfs/QmcuXC5cxs79ro2cUuHs4HQ2bkDLJUYokwL8aivcX6HW3C/go-log"
"gx/ipfs/QmdJceoZvjZMmVeZQqcPq2BT44x44Kq88DY1PRpNZtCagF/go-ipfs-config"
)

// log is the command logger
Expand Down
2 changes: 1 addition & 1 deletion cmd/ipfswatch/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
fsrepo "github.com/ipfs/go-ipfs/repo/fsrepo"

process "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess"
config "gx/ipfs/QmdJceoZvjZMmVeZQqcPq2BT44x44Kq88DY1PRpNZtCagF/go-ipfs-config"
config "gx/ipfs/QmbZ4DPNi99YQwzFSKsdU7pLmieiWs7ajGkPrfvpGjfAFN/go-ipfs-config"
homedir "gx/ipfs/QmdcULN1WCzgoQmcCaUAmEhwcxHYsDrbZ2LvRJKCL8dMrK/go-homedir"
fsnotify "gx/ipfs/QmfNjggF4Pt6erqg3NDafD3MdvDHk1qqCVr8pL5hnPucS8/fsnotify"
)
Expand Down
2 changes: 1 addition & 1 deletion commands/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface"

"gx/ipfs/Qma6uuSyjkecGhMFFLfzyJDPyoDtNJSHJNweDccZhaWkgU/go-ipfs-cmds"
config "gx/ipfs/QmbZ4DPNi99YQwzFSKsdU7pLmieiWs7ajGkPrfvpGjfAFN/go-ipfs-config"
logging "gx/ipfs/QmcuXC5cxs79ro2cUuHs4HQ2bkDLJUYokwL8aivcX6HW3C/go-log"
config "gx/ipfs/QmdJceoZvjZMmVeZQqcPq2BT44x44Kq88DY1PRpNZtCagF/go-ipfs-config"
)

var log = logging.Logger("command")
Expand Down
2 changes: 1 addition & 1 deletion core/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
periodicproc "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/periodic"
peer "gx/ipfs/QmY5Grm8pJdiSSVsYxx4uNRgweY72EmYwuSDbRnbFok3iY/go-libp2p-peer"
pstore "gx/ipfs/QmZ9zH2FnLcxv1xyzFeUpDUeo55xEhZQHgveZijcxr7TLj/go-libp2p-peerstore"
config "gx/ipfs/QmdJceoZvjZMmVeZQqcPq2BT44x44Kq88DY1PRpNZtCagF/go-ipfs-config"
config "gx/ipfs/QmbZ4DPNi99YQwzFSKsdU7pLmieiWs7ajGkPrfvpGjfAFN/go-ipfs-config"
host "gx/ipfs/QmfD51tKgJiTMnW9JEiDiPwsCY4mqUoxkhKhBfyW12spTC/go-libp2p-host"
)

Expand Down
2 changes: 1 addition & 1 deletion core/bootstrap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

testutil "gx/ipfs/QmPuhRE325DR8ChNcFtgd6F1eANCHy1oohXZPpYop4xsK6/go-testutil"
pstore "gx/ipfs/QmZ9zH2FnLcxv1xyzFeUpDUeo55xEhZQHgveZijcxr7TLj/go-libp2p-peerstore"
config "gx/ipfs/QmdJceoZvjZMmVeZQqcPq2BT44x44Kq88DY1PRpNZtCagF/go-ipfs-config"
config "gx/ipfs/QmbZ4DPNi99YQwzFSKsdU7pLmieiWs7ajGkPrfvpGjfAFN/go-ipfs-config"
)

func TestSubsetWhenMaxIsGreaterThanLengthOfSlice(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion core/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
offline "gx/ipfs/QmYZwey1thDTynSrvd6qQkX24UpTka6TFhQ2v569UpoqxD/go-ipfs-exchange-offline"
pstore "gx/ipfs/QmZ9zH2FnLcxv1xyzFeUpDUeo55xEhZQHgveZijcxr7TLj/go-libp2p-peerstore"
pstoremem "gx/ipfs/QmZ9zH2FnLcxv1xyzFeUpDUeo55xEhZQHgveZijcxr7TLj/go-libp2p-peerstore/pstoremem"
cfg "gx/ipfs/QmdJceoZvjZMmVeZQqcPq2BT44x44Kq88DY1PRpNZtCagF/go-ipfs-config"
cfg "gx/ipfs/QmbZ4DPNi99YQwzFSKsdU7pLmieiWs7ajGkPrfvpGjfAFN/go-ipfs-config"
metrics "gx/ipfs/QmekzFM3hPZjTjUFGTABdQkEnQ3PTiMstY198PwSFr5w1Q/go-metrics-interface"
ds "gx/ipfs/Qmf4xQhNomPNhrtZc67qSnfJSjxjXs9LWvknJtSXwimPrM/go-datastore"
retry "gx/ipfs/Qmf4xQhNomPNhrtZc67qSnfJSjxjXs9LWvknJtSXwimPrM/go-datastore/retrystore"
Expand Down
2 changes: 1 addition & 1 deletion core/commands/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
fsrepo "github.com/ipfs/go-ipfs/repo/fsrepo"

cmds "gx/ipfs/Qma6uuSyjkecGhMFFLfzyJDPyoDtNJSHJNweDccZhaWkgU/go-ipfs-cmds"
config "gx/ipfs/QmdJceoZvjZMmVeZQqcPq2BT44x44Kq88DY1PRpNZtCagF/go-ipfs-config"
config "gx/ipfs/QmbZ4DPNi99YQwzFSKsdU7pLmieiWs7ajGkPrfvpGjfAFN/go-ipfs-config"
cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit"
)

Expand Down
2 changes: 1 addition & 1 deletion core/commands/cmdenv/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface"

cmds "gx/ipfs/Qma6uuSyjkecGhMFFLfzyJDPyoDtNJSHJNweDccZhaWkgU/go-ipfs-cmds"
config "gx/ipfs/QmdJceoZvjZMmVeZQqcPq2BT44x44Kq88DY1PRpNZtCagF/go-ipfs-config"
config "gx/ipfs/QmbZ4DPNi99YQwzFSKsdU7pLmieiWs7ajGkPrfvpGjfAFN/go-ipfs-config"
)

// GetNode extracts the node from the environment.
Expand Down
2 changes: 1 addition & 1 deletion core/commands/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (

"gx/ipfs/QmP2i47tnU23ijdshrZtuvrSkQPtf9HhsMb9fwGVe8owj2/jsondiff"
cmds "gx/ipfs/Qma6uuSyjkecGhMFFLfzyJDPyoDtNJSHJNweDccZhaWkgU/go-ipfs-cmds"
config "gx/ipfs/QmdJceoZvjZMmVeZQqcPq2BT44x44Kq88DY1PRpNZtCagF/go-ipfs-config"
config "gx/ipfs/QmbZ4DPNi99YQwzFSKsdU7pLmieiWs7ajGkPrfvpGjfAFN/go-ipfs-config"
cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit"
)

Expand Down
2 changes: 1 addition & 1 deletion core/commands/mount_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
nodeMount "github.com/ipfs/go-ipfs/fuse/node"

cmds "gx/ipfs/Qma6uuSyjkecGhMFFLfzyJDPyoDtNJSHJNweDccZhaWkgU/go-ipfs-cmds"
config "gx/ipfs/QmdJceoZvjZMmVeZQqcPq2BT44x44Kq88DY1PRpNZtCagF/go-ipfs-config"
config "gx/ipfs/QmbZ4DPNi99YQwzFSKsdU7pLmieiWs7ajGkPrfvpGjfAFN/go-ipfs-config"
cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit"
)

Expand Down
2 changes: 1 addition & 1 deletion core/commands/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
cid "gx/ipfs/QmR8BauakNcBa3RbE4nbQu76PDiJgoQgz8AJdhJuiU4TAw/go-cid"
bstore "gx/ipfs/QmS2aqUZLJp8kF1ihE5rvDGE5LvmKDPnx32w9Z1BW9xLV5/go-ipfs-blockstore"
cmds "gx/ipfs/Qma6uuSyjkecGhMFFLfzyJDPyoDtNJSHJNweDccZhaWkgU/go-ipfs-cmds"
config "gx/ipfs/QmdJceoZvjZMmVeZQqcPq2BT44x44Kq88DY1PRpNZtCagF/go-ipfs-config"
config "gx/ipfs/QmbZ4DPNi99YQwzFSKsdU7pLmieiWs7ajGkPrfvpGjfAFN/go-ipfs-config"
cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit"
)

Expand Down
2 changes: 1 addition & 1 deletion core/commands/swarm.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
peer "gx/ipfs/QmY5Grm8pJdiSSVsYxx4uNRgweY72EmYwuSDbRnbFok3iY/go-libp2p-peer"
pstore "gx/ipfs/QmZ9zH2FnLcxv1xyzFeUpDUeo55xEhZQHgveZijcxr7TLj/go-libp2p-peerstore"
cmds "gx/ipfs/Qma6uuSyjkecGhMFFLfzyJDPyoDtNJSHJNweDccZhaWkgU/go-ipfs-cmds"
config "gx/ipfs/QmdJceoZvjZMmVeZQqcPq2BT44x44Kq88DY1PRpNZtCagF/go-ipfs-config"
config "gx/ipfs/QmbZ4DPNi99YQwzFSKsdU7pLmieiWs7ajGkPrfvpGjfAFN/go-ipfs-config"
cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit"
)

Expand Down
2 changes: 1 addition & 1 deletion core/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ import (
mplex "gx/ipfs/QmZsejKNkeFSQe5TcmYXJ8iq6qPL1FpsP4eAA8j7RfE7xg/go-smux-multiplex"
pubsub "gx/ipfs/QmaTfHazBrintpyALv8MzmCvGyGg3XWY7vDrsVfGVnpd1j/go-libp2p-pubsub"
metrics "gx/ipfs/QmbYN6UmTJn5UUQdi5CTsU86TXVBSrTcRk5UmyA36Qx2J6/go-libp2p-metrics"
config "gx/ipfs/QmbZ4DPNi99YQwzFSKsdU7pLmieiWs7ajGkPrfvpGjfAFN/go-ipfs-config"
ipld "gx/ipfs/QmcKKBwfz6FyQdHR2jsXrrF6XeSBXYL86anmWNewpFpoF5/go-ipld-format"
logging "gx/ipfs/QmcuXC5cxs79ro2cUuHs4HQ2bkDLJUYokwL8aivcX6HW3C/go-log"
config "gx/ipfs/QmdJceoZvjZMmVeZQqcPq2BT44x44Kq88DY1PRpNZtCagF/go-ipfs-config"
merkledag "gx/ipfs/QmdV35UHnL1FM52baPkeUo6u7Fxm2CRUkPTLRPxeF8a4Ap/go-merkledag"
ft "gx/ipfs/QmdYvDbHp7qAhZ7GsCj6e1cMo55ND6y2mjWVzwdvcv4f12/go-unixfs"
nilrouting "gx/ipfs/QmdmWkx54g7VfVyxeG8ic84uf4G6Eq1GohuyKA3XDuJ8oC/go-ipfs-routing/none"
Expand Down
2 changes: 1 addition & 1 deletion core/core_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/ipfs/go-ipfs/repo"

config "gx/ipfs/QmdJceoZvjZMmVeZQqcPq2BT44x44Kq88DY1PRpNZtCagF/go-ipfs-config"
config "gx/ipfs/QmbZ4DPNi99YQwzFSKsdU7pLmieiWs7ajGkPrfvpGjfAFN/go-ipfs-config"
datastore "gx/ipfs/Qmf4xQhNomPNhrtZc67qSnfJSjxjXs9LWvknJtSXwimPrM/go-datastore"
syncds "gx/ipfs/Qmf4xQhNomPNhrtZc67qSnfJSjxjXs9LWvknJtSXwimPrM/go-datastore/sync"
)
Expand Down
2 changes: 1 addition & 1 deletion core/coreapi/unixfs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
peer "gx/ipfs/QmY5Grm8pJdiSSVsYxx4uNRgweY72EmYwuSDbRnbFok3iY/go-libp2p-peer"
pstore "gx/ipfs/QmZ9zH2FnLcxv1xyzFeUpDUeo55xEhZQHgveZijcxr7TLj/go-libp2p-peerstore"
files "gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files"
config "gx/ipfs/QmdJceoZvjZMmVeZQqcPq2BT44x44Kq88DY1PRpNZtCagF/go-ipfs-config"
config "gx/ipfs/QmbZ4DPNi99YQwzFSKsdU7pLmieiWs7ajGkPrfvpGjfAFN/go-ipfs-config"
mdag "gx/ipfs/QmdV35UHnL1FM52baPkeUo6u7Fxm2CRUkPTLRPxeF8a4Ap/go-merkledag"
unixfs "gx/ipfs/QmdYvDbHp7qAhZ7GsCj6e1cMo55ND6y2mjWVzwdvcv4f12/go-unixfs"
mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash"
Expand Down
2 changes: 1 addition & 1 deletion core/corehttp/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
path "gx/ipfs/QmZErC2Ay6WuGi96CPg316PwitdwgLo6RxZRqVjJjRj2MR/go-path"
cmds "gx/ipfs/Qma6uuSyjkecGhMFFLfzyJDPyoDtNJSHJNweDccZhaWkgU/go-ipfs-cmds"
cmdsHttp "gx/ipfs/Qma6uuSyjkecGhMFFLfzyJDPyoDtNJSHJNweDccZhaWkgU/go-ipfs-cmds/http"
config "gx/ipfs/QmdJceoZvjZMmVeZQqcPq2BT44x44Kq88DY1PRpNZtCagF/go-ipfs-config"
config "gx/ipfs/QmbZ4DPNi99YQwzFSKsdU7pLmieiWs7ajGkPrfvpGjfAFN/go-ipfs-config"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion core/corehttp/gateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
ci "gx/ipfs/QmNiJiXwWE3kRhZrC5ej3kSjWHm337pYfhjLGSCDNKJP2s/go-libp2p-crypto"
id "gx/ipfs/QmRBaUEQEeFWywfrZJ64QgsmvcqgLSK3VbvGMR2NM2Edpf/go-libp2p/p2p/protocol/identify"
path "gx/ipfs/QmZErC2Ay6WuGi96CPg316PwitdwgLo6RxZRqVjJjRj2MR/go-path"
config "gx/ipfs/QmdJceoZvjZMmVeZQqcPq2BT44x44Kq88DY1PRpNZtCagF/go-ipfs-config"
config "gx/ipfs/QmbZ4DPNi99YQwzFSKsdU7pLmieiWs7ajGkPrfvpGjfAFN/go-ipfs-config"
dag "gx/ipfs/QmdV35UHnL1FM52baPkeUo6u7Fxm2CRUkPTLRPxeF8a4Ap/go-merkledag"
datastore "gx/ipfs/Qmf4xQhNomPNhrtZc67qSnfJSjxjXs9LWvknJtSXwimPrM/go-datastore"
syncds "gx/ipfs/Qmf4xQhNomPNhrtZc67qSnfJSjxjXs9LWvknJtSXwimPrM/go-datastore/sync"
Expand Down
2 changes: 1 addition & 1 deletion core/coreunix/add_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
blockstore "gx/ipfs/QmS2aqUZLJp8kF1ihE5rvDGE5LvmKDPnx32w9Z1BW9xLV5/go-ipfs-blockstore"
blocks "gx/ipfs/QmWoXtvgC8inqFkAATB7cp2Dax7XBi9VDvSg9RCCZufmRk/go-block-format"
files "gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files"
config "gx/ipfs/QmdJceoZvjZMmVeZQqcPq2BT44x44Kq88DY1PRpNZtCagF/go-ipfs-config"
config "gx/ipfs/QmbZ4DPNi99YQwzFSKsdU7pLmieiWs7ajGkPrfvpGjfAFN/go-ipfs-config"
dag "gx/ipfs/QmdV35UHnL1FM52baPkeUo6u7Fxm2CRUkPTLRPxeF8a4Ap/go-merkledag"
datastore "gx/ipfs/Qmf4xQhNomPNhrtZc67qSnfJSjxjXs9LWvknJtSXwimPrM/go-datastore"
syncds "gx/ipfs/Qmf4xQhNomPNhrtZc67qSnfJSjxjXs9LWvknJtSXwimPrM/go-datastore/sync"
Expand Down
2 changes: 1 addition & 1 deletion core/mock/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
mocknet "gx/ipfs/QmRBaUEQEeFWywfrZJ64QgsmvcqgLSK3VbvGMR2NM2Edpf/go-libp2p/p2p/net/mock"
peer "gx/ipfs/QmY5Grm8pJdiSSVsYxx4uNRgweY72EmYwuSDbRnbFok3iY/go-libp2p-peer"
pstore "gx/ipfs/QmZ9zH2FnLcxv1xyzFeUpDUeo55xEhZQHgveZijcxr7TLj/go-libp2p-peerstore"
config "gx/ipfs/QmdJceoZvjZMmVeZQqcPq2BT44x44Kq88DY1PRpNZtCagF/go-ipfs-config"
config "gx/ipfs/QmbZ4DPNi99YQwzFSKsdU7pLmieiWs7ajGkPrfvpGjfAFN/go-ipfs-config"
datastore "gx/ipfs/Qmf4xQhNomPNhrtZc67qSnfJSjxjXs9LWvknJtSXwimPrM/go-datastore"
syncds "gx/ipfs/Qmf4xQhNomPNhrtZc67qSnfJSjxjXs9LWvknJtSXwimPrM/go-datastore/sync"
host "gx/ipfs/QmfD51tKgJiTMnW9JEiDiPwsCY4mqUoxkhKhBfyW12spTC/go-libp2p-host"
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -518,9 +518,9 @@
},
{
"author": "magik6k",
"hash": "QmdJceoZvjZMmVeZQqcPq2BT44x44Kq88DY1PRpNZtCagF",
"hash": "QmbZ4DPNi99YQwzFSKsdU7pLmieiWs7ajGkPrfvpGjfAFN",
"name": "go-ipfs-config",
"version": "0.2.21"
"version": "0.2.22"
},
{
"author": "why",
Expand Down Expand Up @@ -589,7 +589,7 @@
},
{
"author": "travisperson",
"hash": "QmULSUh7EQDxtjZHvUDLrpa7J9KK97of3y3cDmPmbJjQbD",
"hash": "Qme2p7yKLjaYMQ89HYt5P4N7AkNHhdBydjAiWogeYqEK4a",
"name": "iptb-plugins",
"version": "1.0.7"
},
Expand All @@ -601,15 +601,15 @@
},
{
"author": "whyrusleeping",
"hash": "QmbLqXFhmZW9kib7eh2nQWuE5d5sjdsG2VivpNgAY4XhsX",
"hash": "QmXyfyKbv3EkZUtN5oxL2c32HNPaJKYsCQhxPufMPxKwzi",
"name": "sql-datastore",
"version": "1.0.0"
"version": "1.0.1"
}
],
"gxVersion": "0.10.0",
"language": "go",
"license": "MIT",
"name": "go-ipfs",
"version": "0.4.19"
"version": "0.4.20"
}

51 changes: 45 additions & 6 deletions plugin/plugins/postgresds/postgresds.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ package postgresds

import (
"fmt"
"io/ioutil"
"strings"

postgresdb "gx/whyrusleeping/QmbLqXFhmZW9kib7eh2nQWuE5d5sjdsG2VivpNgAY4XhsX/sql-datastore/postgres"
postgresdb "gx/whyrusleeping/QmXyfyKbv3EkZUtN5oxL2c32HNPaJKYsCQhxPufMPxKwzi/sql-datastore/postgres"

"github.com/ipfs/go-ipfs/plugin"
"github.com/ipfs/go-ipfs/repo"
Expand Down Expand Up @@ -36,7 +38,11 @@ func (*postgresdsPlugin) DatastoreTypeName() string {
}

type datastoreConfig struct {
path string
host string
user string
passfile string
password string
dbname string
}

// BadgerdsDatastoreConfig returns a configuration stub for a badger datastore
Expand All @@ -45,23 +51,56 @@ func (*postgresdsPlugin) DatastoreConfigParser() fsrepo.ConfigFromMap {
return func(params map[string]interface{}) (fsrepo.DatastoreConfig, error) {
var c datastoreConfig
var ok bool
c.path, ok = params["path"].(string)
c.host, ok = params["host"].(string)
if !ok {
return nil, fmt.Errorf("'path' field was not a string")
}
c.user, ok = params["user"].(string)
if !ok {
return nil, fmt.Errorf("'user' field was not a string")
}
c.passfile, ok = params["passfile"].(string)
if !ok {
return nil, fmt.Errorf("'passfile' field was not a string")
}
c.dbname, ok = params["dbname"].(string)
if !ok {
return nil, fmt.Errorf("'dbname' field was not a string")
}
c.password, ok = params["password"].(string)
if !ok {
return nil, fmt.Errorf("'password' field was not a string")
}
return &c, nil
}
}

func (c *datastoreConfig) DiskSpec() fsrepo.DiskSpec {
return map[string]interface{}{
"type": "postgres",
"path": c.path,
"type": "postgres",
"user": c.user,
"database": c.dbname,
}
}

func (c *datastoreConfig) Create(path string) (repo.Datastore, error) {
pg := postgresdb.Options{}
if c.passfile != "" {
info, err := ioutil.ReadFile(c.passfile)
if err != nil {
return nil, err
}
envVars := strings.Split(string(info), ":")
c.host = envVars[0]
c.dbname = envVars[2]
c.user = envVars[3]
c.password = envVars[4]
}
pg := postgresdb.Options{
Host: c.host,
User: c.user,
Database: c.dbname,
Password: c.password,
}
ds, err := pg.Create()
if err != nil {
fmt.Println("error loading pg: ", err)
Expand Down
2 changes: 1 addition & 1 deletion repo/fsrepo/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/ipfs/go-ipfs/plugin/loader"
"github.com/ipfs/go-ipfs/repo/fsrepo"

"gx/ipfs/QmdJceoZvjZMmVeZQqcPq2BT44x44Kq88DY1PRpNZtCagF/go-ipfs-config"
"gx/ipfs/QmbZ4DPNi99YQwzFSKsdU7pLmieiWs7ajGkPrfvpGjfAFN/go-ipfs-config"
)

// note: to test sorting of the mountpoints in the disk spec they are
Expand Down
4 changes: 2 additions & 2 deletions repo/fsrepo/fsrepo.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ import (

util "gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util"
ma "gx/ipfs/QmRKLtwMw131aK7ugC3G7ybpumMz78YrJe5dzneyindvG1/go-multiaddr"
config "gx/ipfs/QmbZ4DPNi99YQwzFSKsdU7pLmieiWs7ajGkPrfvpGjfAFN/go-ipfs-config"
serialize "gx/ipfs/QmbZ4DPNi99YQwzFSKsdU7pLmieiWs7ajGkPrfvpGjfAFN/go-ipfs-config/serialize"
lockfile "gx/ipfs/QmcWjZkQxyPMkgZRpda4hqWwaD6E1yqCvcxZfxbt98CEAK/go-fs-lock"
logging "gx/ipfs/QmcuXC5cxs79ro2cUuHs4HQ2bkDLJUYokwL8aivcX6HW3C/go-log"
measure "gx/ipfs/QmdCQgMgoMjur6D15ZB3z1LodiSP3L6EBHMyVx4ekqzRWA/go-ds-measure"
config "gx/ipfs/QmdJceoZvjZMmVeZQqcPq2BT44x44Kq88DY1PRpNZtCagF/go-ipfs-config"
serialize "gx/ipfs/QmdJceoZvjZMmVeZQqcPq2BT44x44Kq88DY1PRpNZtCagF/go-ipfs-config/serialize"
homedir "gx/ipfs/QmdcULN1WCzgoQmcCaUAmEhwcxHYsDrbZ2LvRJKCL8dMrK/go-homedir"
ds "gx/ipfs/Qmf4xQhNomPNhrtZc67qSnfJSjxjXs9LWvknJtSXwimPrM/go-datastore"
)
Expand Down
2 changes: 1 addition & 1 deletion repo/fsrepo/fsrepo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/ipfs/go-ipfs/thirdparty/assert"

config "gx/ipfs/QmdJceoZvjZMmVeZQqcPq2BT44x44Kq88DY1PRpNZtCagF/go-ipfs-config"
config "gx/ipfs/QmbZ4DPNi99YQwzFSKsdU7pLmieiWs7ajGkPrfvpGjfAFN/go-ipfs-config"
datastore "gx/ipfs/Qmf4xQhNomPNhrtZc67qSnfJSjxjXs9LWvknJtSXwimPrM/go-datastore"
)

Expand Down
2 changes: 1 addition & 1 deletion repo/fsrepo/misc.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package fsrepo
import (
"os"

config "gx/ipfs/QmdJceoZvjZMmVeZQqcPq2BT44x44Kq88DY1PRpNZtCagF/go-ipfs-config"
config "gx/ipfs/QmbZ4DPNi99YQwzFSKsdU7pLmieiWs7ajGkPrfvpGjfAFN/go-ipfs-config"
homedir "gx/ipfs/QmdcULN1WCzgoQmcCaUAmEhwcxHYsDrbZ2LvRJKCL8dMrK/go-homedir"
)

Expand Down
2 changes: 1 addition & 1 deletion repo/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
keystore "github.com/ipfs/go-ipfs/keystore"

ma "gx/ipfs/QmRKLtwMw131aK7ugC3G7ybpumMz78YrJe5dzneyindvG1/go-multiaddr"
config "gx/ipfs/QmdJceoZvjZMmVeZQqcPq2BT44x44Kq88DY1PRpNZtCagF/go-ipfs-config"
config "gx/ipfs/QmbZ4DPNi99YQwzFSKsdU7pLmieiWs7ajGkPrfvpGjfAFN/go-ipfs-config"
)

var errTODO = errors.New("TODO: mock repo")
Expand Down
2 changes: 1 addition & 1 deletion repo/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
keystore "github.com/ipfs/go-ipfs/keystore"

ma "gx/ipfs/QmRKLtwMw131aK7ugC3G7ybpumMz78YrJe5dzneyindvG1/go-multiaddr"
config "gx/ipfs/QmdJceoZvjZMmVeZQqcPq2BT44x44Kq88DY1PRpNZtCagF/go-ipfs-config"
config "gx/ipfs/QmbZ4DPNi99YQwzFSKsdU7pLmieiWs7ajGkPrfvpGjfAFN/go-ipfs-config"
ds "gx/ipfs/Qmf4xQhNomPNhrtZc67qSnfJSjxjXs9LWvknJtSXwimPrM/go-datastore"
)

Expand Down
19 changes: 19 additions & 0 deletions scripts/ipfs_postgres.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/sh

if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]
then
echo "Env variables not provided"
echo "Usage: ./ipfs_postgres.sh <IPFS_PGHOST> <IPFS_PGUSER> <IPFS_PGDATABASE>"
exit 1
fi

export IPFS_PGHOST=$1
export IPFS_PGUSER=$2
export IPFS_PGDATABASE=$3
printf "${IPFS_PGUSER}@${IPFS_PGHOST} password:"
stty -echo
read IPFS_PGPASSWORD
stty echo
export IPFS_PGPASSWORD

ipfs init --profile=postgresds
Loading

1 comment on commit a0db370

@GitCop
Copy link

@GitCop GitCop commented on a0db370 Dec 13, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were the following issues with your Pull Request

We ask for a few features in the commit message for Open Source licensing hygiene and commit message clarity.
git commit --amend can often help you quickly improve the commit message.
Guidelines and a script are available to help in the long run.
Your feedback on GitCop is welcome on this issue.


This message was auto-generated by https://gitcop.com

Please sign in to comment.