diff options
author | HimbeerserverDE <himbeerserverde@gmail.com> | 2023-07-18 18:53:58 +0200 |
---|---|---|
committer | HimbeerserverDE <himbeerserverde@gmail.com> | 2023-07-18 18:53:58 +0200 |
commit | 71bd6ac930c392aabe9a8518c2b2b625e642d6cb (patch) | |
tree | d2b746cdaf638e900dffd203231cb89a5bf60d43 /cmd | |
parent | edcab78dd4b5fcf06e27c3d0d00c57567d68f66a (diff) |
add mtpostgresql support to mt-auth-convert
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/mt-auth-convert/convert.go | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/cmd/mt-auth-convert/convert.go b/cmd/mt-auth-convert/convert.go index 588f49b..28e44e9 100644 --- a/cmd/mt-auth-convert/convert.go +++ b/cmd/mt-auth-convert/convert.go @@ -3,10 +3,12 @@ mt-auth-convert converts between authentication backends. Usage: - mt-auth-convert from to + mt-auth-convert from to inconn outconn where from is the format to convert from and to is the format to convert to +and inconn is the postgres connection string for the source database +and outconn is the postgres connection string for the destination database. */ package main @@ -18,8 +20,8 @@ import ( ) func main() { - if len(os.Args) != 3 { - log.Fatal("usage: mt-auth-convert from to") + if len(os.Args) != 5 { + log.Fatal("usage: mt-auth-convert from to inconn outconn") } var inBackend proxy.AuthBackend @@ -32,6 +34,12 @@ func main() { if err != nil { log.Fatal(err) } + case "mtpostgresql": + var err error + inBackend, err = proxy.NewAuthMTPostgreSQL(os.Args[3]) + if err != nil { + log.Fatal(err) + } default: log.Fatal("invalid input auth backend") } @@ -46,6 +54,12 @@ func main() { if err != nil { log.Fatal(err) } + case "mtpostgresql": + var err error + outBackend, err = proxy.NewAuthMTPostgreSQL(os.Args[4]) + if err != nil { + log.Fatal(err) + } default: log.Fatal("invalid output auth backend") } |