Namespace is a query param

This commit is contained in:
Bel LaPointe
2020-07-24 12:42:42 -06:00
parent 0e980b1128
commit 11e7d13cca
5 changed files with 76 additions and 31 deletions

View File

@@ -13,6 +13,7 @@ type Config struct {
DriverType string
FilePrefix string
FileRoot string
Auth bool
}
func New() Config {
@@ -30,6 +31,7 @@ func New() Config {
as.Append(args.STRING, "fileroot", "path to file hosting root", "/tmp/")
as.Append(args.STRING, "database", "database name to use", "db")
as.Append(args.STRING, "drivertype", "database driver to use", "boltdb")
as.Append(args.BOOL, "auth", "check for authorized access", false)
if err := as.Parse(); err != nil {
panic(err)
@@ -42,5 +44,6 @@ func New() Config {
FileRoot: as.GetString("fileroot"),
Database: as.GetString("database"),
DriverType: as.GetString("drivertype"),
Auth: as.GetBool("auth"),
}
}