gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-taldir] branch master updated (c2835b6 -> 7d5fbe5)


From: gnunet
Subject: [taler-taldir] branch master updated (c2835b6 -> 7d5fbe5)
Date: Mon, 11 Jul 2022 21:05:16 +0200

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a change to branch master
in repository taldir.

    from c2835b6  update config and readme
     new 93affe6  remove debug functionality
     new 7d5fbe5  move taldir config file

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 README.md                                 |  1 +
 cmd/taldir-cli/main.go                    | 36 -------------------------------
 cmd/taldir-server/main.go                 | 11 +++++-----
 taldir.conf => config/taldir-example.conf |  0
 4 files changed, 7 insertions(+), 41 deletions(-)
 rename taldir.conf => config/taldir-example.conf (100%)

diff --git a/README.md b/README.md
index e0ee3f8..a5c89c2 100644
--- a/README.md
+++ b/README.md
@@ -8,6 +8,7 @@ Compile and run:
 
 ```
 $ make
+$ cp config/taldir-example.conf taldir.conf
 $ ./taldir-server
 ```
 
diff --git a/cmd/taldir-cli/main.go b/cmd/taldir-cli/main.go
index f35b6fd..eef9ece 100644
--- a/cmd/taldir-cli/main.go
+++ b/cmd/taldir-cli/main.go
@@ -23,8 +23,6 @@ import (
   "os"
   "fmt"
   "flag"
-  "bufio"
-  "log"
   "taler.net/taldir/pkg/rest"
   "taler.net/taldir/pkg/util"
   "crypto/sha512"
@@ -44,16 +42,8 @@ func main() {
   var challengeFlag = flag.String("c", "", "Activation challenge")
   var pubkeyFlag = flag.String("p", "", "Public key")
   var addressFlag = flag.String("a", "", "Address")
-  var delEntryFlag = flag.Bool("d", false, "Delete Entry for the specificied 
address")
-  var delValidationFlag = flag.Bool("V", false, "Delete validation for the 
specificied address")
-
-  var dropFlag = flag.Bool("D", false, "Drop all data in table (DANGEROUS!)")
-  var cfgFlag = flag.String("C", "", "Configuration file to use")
   flag.Parse()
   cfgfile := "taldir.conf"
-  if len(*cfgFlag) != 0 {
-    cfgfile = *cfgFlag
-  }
   t := taldir.Taldir{}
   t.Initialize(cfgfile)
   host := t.Cfg.Section("taldir").Key("host").MustString("http://localhost";)
@@ -73,30 +63,4 @@ func main() {
     fmt.Println(generateLink(host, *addressFlag, *challengeFlag))
     os.Exit(0)
   }
-  if *dropFlag {
-    fmt.Println("Really delete all data in database? [y/N]:")
-    reader := bufio.NewReader(os.Stdin)
-    char, _, err := reader.ReadRune()
-
-    if err == nil {
-      fmt.Println(char)
-      if char == 'y' {
-        t.ClearDatabase()
-      }
-      os.Exit(0)
-    }
-    os.Exit(1)
-  }
-  if *delEntryFlag {
-    if len(*addressFlag) == 0 {
-      log.Fatal("No address provided!")
-    }
-    t.DeleteEntry(*addressFlag)
-  }
-  if *delValidationFlag {
-    if len(*addressFlag) == 0 {
-      log.Fatal("No address provided!")
-    }
-    t.DeleteValidation(*addressFlag)
-  }
 }
diff --git a/cmd/taldir-server/main.go b/cmd/taldir-server/main.go
index ca2269a..205a7e6 100644
--- a/cmd/taldir-server/main.go
+++ b/cmd/taldir-server/main.go
@@ -20,11 +20,11 @@
 package main
 
 /* TODO
- - ToS API (terms, privacy) with localizations
- - Prettify QR code landing page
- - Base32: Use gnunet-go module? (currently copied)
- - OrderId processing
- - Maintenance of database: When to delete expired validations?
+- ToS API (terms, privacy) with localizations
+- Prettify QR code landing page
+- Base32: Use gnunet-go module? (currently copied)
+- OrderId processing
+- Maintenance of database: When to delete expired validations?
 */
 
 import (
@@ -34,6 +34,7 @@ import (
 
 func main() {
   var cfgFlag = flag.String("c", "", "Configuration file to use")
+
   flag.Parse()
   cfgfile := "taldir.conf"
   if len(*cfgFlag) != 0 {
diff --git a/taldir.conf b/config/taldir-example.conf
similarity index 100%
rename from taldir.conf
rename to config/taldir-example.conf

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]