taldir

Directory service to resolve wallet mailboxes by messenger addresses
Log | Files | Refs | Submodules | README | LICENSE

commit c429407b0f020995a5bf0b2494192da36462b17c
parent 904e0e68a856895df5a5d2324aaf861ec07f6007
Author: Martin Schanzenbach <schanzen@gnunet.org>
Date:   Sat, 26 Apr 2025 13:37:35 +0200

add example config

Diffstat:
MMakefile.in | 11+++++++----
Adoc/man/taler-directory.1 | 59+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ataldir.conf.example | 34++++++++++++++++++++++++++++++++++
3 files changed, 100 insertions(+), 4 deletions(-)

diff --git a/Makefile.in b/Makefile.in @@ -1,14 +1,14 @@ all: server cli SCRIPT_TARGET:=$(shell dirname $(shell go list -f '{{.Target}}' ./cmd/taldir-server)) - +TALER_DIRECTORY_HOME=${datadir}/taler-directory VERSION=`git describe --tags` server: - ${GO} build -ldflags "-X main.version=${VERSION} -X main.taldirdatahome=${datadir}/taldir" ./cmd/taldir-server + ${GO} build -o taler-directory -ldflags "-X main.version=${VERSION} -X main.taldirdatahome=${TALER_DIRECTORY_HOME}" ./cmd/taldir-server cli: - ${GO} build -ldflags "-X main.version=${VERSION} -X main.taldirdatahome=${datadir}/taldir" ./cmd/taldir-cli + ${GO} build -ldflags "-X main.version=${VERSION} -X main.taldirdatahome=${TALER_DIRECTORY_HOME}" ./cmd/taldir-cli conf: sed taldir.conf.in @@ -20,10 +20,13 @@ install: server cli mkdir -p ${DESTDIR}${datadir}/taldir chmod +x scripts/validators/* cp scripts/validators/* ${DESTDIR}${bindir} + mkdir -p ${DESTDIR}${mandir}/man1 + install doc/man/taler-mailbox.1 ${DESTDIR}${mandir}/man1/ + install taldir.conf.example ${DESTDIR}${TALER_DIRECTORY_HOME} uninstall: ${RM} ${DESTDIR}${bindir}/taldir-* - ${RM} -r ${DESTDIR}${datadir}/taldir + ${RM} -r ${DESTDIR}${TALER_DIRECTORY_HOME} format: ${GO} fmt ./cmd/taldir-server/*.go diff --git a/doc/man/taler-directory.1 b/doc/man/taler-directory.1 @@ -0,0 +1,59 @@ +.\" This file is part of GNU Taler. +.\" Copyright (C) 2025 GNU Taler +.\" +.\" Permission is granted to copy, distribute and/or modify this document +.\" under the terms of the GNU Free Documentation License, Version 1.3 or +.\" any later version published by the Free Software Foundation; with no +.\" Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A +.\" copy of the license is included in the file +.\" FDL-1.3. +.\" +.\" A copy of the license is also available from the Free Software +.\" Foundation Web site at http://www.gnu.org/licenses/fdl.html}. +.\" +.\" Alternately, this document is also available under the General +.\" Public License, version 3 or later, as published by the Free Software +.\" Foundation. A copy of the license is included in the file +.\" GPL3. +.\" +.\" A copy of the license is also available from the Free Software +.\" Foundation Web site at http://www.gnu.org/licenses/gpl.html +.\" +.\" SPDX-License-Identifier: GPL3.0-or-later OR FDL1.3-or-later +.\" +.Dd April 26, 2025 +.Dt TALER-DIRECTORY 1 +.Os +.Sh NAME +.Nm taler-directory +.Nd The GNU Taler Directory Service +.Sh SYNOPSIS +.Nm +.Op Fl c Ar FILENAME | Fl -config= Ns Ar FILENAME +.Op Fl h | -help +.Op Fl L Ar LOGLEVEL | Fl -loglevel= Ns Ar LOGLEVEL +.Op Fl v | -version +.Sh DESCRIPTION +.Nm +is used to register and lookup mailbox URIs for P2P message delivery. +.Bl -tag -width indent +.It Fl c Ar FILENAME | Fl -config= Ns Ar FILENAME +Use the configuration file FILENAME. +.It Fl h | -help +Print short help on options. +.It Fl L Ar LOGLEVEL | Fl -loglevel= Ns Ar LOGLEVEL +Use LOGLEVEL for logging. +Valid values are DEBUG, INFO, WARNING and ERROR. +.It Fl v | -version +Print version number. +.El +.Sh DIAGNOSTICS +.Nm +will return 0 on success. +.\".Sh HISTORY +.\".Sh AUTHORS +.Sh BUGS +Report bugs by using +.Lk https://bugs.gnunet.org +or by sending electronic mail to +.Aq Mt gnunet-developers@gnu.org . diff --git a/taldir.conf.example b/taldir.conf.example @@ -0,0 +1,34 @@ +[taldir] +production = false +footer = web/templates/footer.html +base_url = http://localhost:11000 +challenge_bytes = 16 +validation_initiation_max = 3 +solution_attempt_max = 3 +validation_timeframe = 5m +solution_attempt_timeframe = 1h +monthly_fee = KUDOS:0 +purge_mappings_on_startup_dangerous = false +validation_expiration = 24h +validation_landing = web/templates/validation_landing.html +landing_page = web/templates/landing.html +lookup_result_page = web/templates/lookup_result.html +salt = ChangeMe + +[taldir-pq] +host = localhost +port = 5432 +user = taldir +password = secret +db_name = taldir + +[taldir-validator-email] +type = command +enabled = true +command = test +valid_alias_regex='^\S+@\S+\.\S+$' + +[taldir-validator-phone] +type = command +enabled = true +command = test