aboutsummaryrefslogtreecommitdiff
path: root/server/wkfs
diff options
context:
space:
mode:
Diffstat (limited to 'server/wkfs')
-rw-r--r--server/wkfs/s3fs/s3.go4
-rw-r--r--server/wkfs/vaultfs/vault.go4
2 files changed, 8 insertions, 0 deletions
diff --git a/server/wkfs/s3fs/s3.go b/server/wkfs/s3fs/s3.go
index a71d874..331b55f 100644
--- a/server/wkfs/s3fs/s3.go
+++ b/server/wkfs/s3fs/s3.go
@@ -21,6 +21,10 @@ import (
// Register the /s3/ filesystem as a well-known filesystem.
func Register(config *config.AWS) {
+ if config == nil {
+ registerBrokenFS(errors.New("aws credentials not found"))
+ return
+ }
ac := &aws.Config{}
// If region is unset the SDK will attempt to read the region from the environment.
if config.Region != "" {
diff --git a/server/wkfs/vaultfs/vault.go b/server/wkfs/vaultfs/vault.go
index 6f11057..f7c1360 100644
--- a/server/wkfs/vaultfs/vault.go
+++ b/server/wkfs/vaultfs/vault.go
@@ -14,6 +14,10 @@ import (
// Register the /vault/ filesystem as a well-known filesystem.
func Register(vc *config.Vault) {
+ if vc == nil {
+ registerBrokenFS(errors.New("no vault configuration found"))
+ return
+ }
client, err := vault.NewClient(vc.Address, vc.Token)
if err != nil {
registerBrokenFS(err)