From f0612c64227e435ff1deacc045434f2982f8608d Mon Sep 17 00:00:00 2001 From: Christian Claus Date: Sat, 14 Apr 2018 20:41:40 +0200 Subject: [PATCH] Rename and enhance example config --- examples/config-sample.yaml | 54 +++++++++++++++++++++++++++++++++++++ examples/config.yaml | 9 ------- magefile.go | 2 +- 3 files changed, 55 insertions(+), 10 deletions(-) create mode 100644 examples/config-sample.yaml delete mode 100644 examples/config.yaml diff --git a/examples/config-sample.yaml b/examples/config-sample.yaml new file mode 100644 index 0000000..e041b89 --- /dev/null +++ b/examples/config-sample.yaml @@ -0,0 +1,54 @@ +# ---------------------------------- Network ----------------------------------- +# +# The bind address to use +# +address: "0.0.0.0" +# +# The listening port +# +port: "8000" + + +# ---------------------------- Transport security ------------------------------ +#tls: +# keyFile: key.pem +# certFile: cert.pem +# ------------------------ + + +# ---------------------------------- Content ----------------------------------- +# +# The provided base dir +# +dir: "/tmp" + + +# ----------------------------------- Users ------------------------------------ +# +# A list of user definitions +# +users: + # + # user with username 'user', password 'foo' and jailed access to '/tmp/user' + # + user: + password: "$2a$10$yITzSSNJZAdDZs8iVBQzkuZCzZ49PyjTiPIrmBUKUpB0pwX7eySvW" + subdir: "/user" + + # + # user with username 'admin', password 'foo' and access to '/tmp' + # + admin: + password: "$2a$10$yITzSSNJZAdDZs8iVBQzkuZCzZ49PyjTiPIrmBUKUpB0pwX7eySvW" + + +# ---------------------------------- Logging ----------------------------------- +# +# Seperated loglevels for file / directory operations. All set to false per +# default. +# +#log: +# create: true +# read: true +# update: true +# delete: true diff --git a/examples/config.yaml b/examples/config.yaml deleted file mode 100644 index b9378c7..0000000 --- a/examples/config.yaml +++ /dev/null @@ -1,9 +0,0 @@ -address: "0.0.0.0" # the bind address -port: "8000" # the listening port -dir: "/home/webdav" # the provided base dir -users: - user: # with password 'foo' and jailed access to '/home/webdav/user' - password: "$2a$10$yITzSSNJZAdDZs8iVBQzkuZCzZ49PyjTiPIrmBUKUpB0pwX7eySvW" - subdir: "/user" - admin: # with password 'foo' and access to '/home/webdav' - password: "$2a$10$DaWhagZaxWnWAOXY0a55.eaYccgtMOL3lGlqI3spqIBGyM0MD.EN6" diff --git a/magefile.go b/magefile.go index d901de3..9212af5 100644 --- a/magefile.go +++ b/magefile.go @@ -67,7 +67,7 @@ func BuildReleases() error { swd, swdCli, "Readme.md", - filepath.Join("examples", "config.yaml"), + filepath.Join("examples", "config-sample.yaml"), } archiveName := fmt.Sprintf("swd-%s-%s.zip", t.goos, t.goarch)