You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cmd/gonic/gonic.go
+21-8Lines changed: 21 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,7 @@ package main
3
3
4
4
import (
5
5
"context"
6
+
"encoding/base64"
6
7
"errors"
7
8
"expvar"
8
9
"flag"
@@ -26,6 +27,7 @@ import (
26
27
27
28
"github.com/google/shlex"
28
29
"github.com/gorilla/securecookie"
30
+
_ "github.com/jinzhu/gorm/dialects/postgres"
29
31
_ "github.com/jinzhu/gorm/dialects/sqlite"
30
32
"github.com/sentriz/gormstore"
31
33
"golang.org/x/sync/errgroup"
@@ -66,7 +68,12 @@ func main() {
66
68
67
69
confPlaylistsPath:=flag.String("playlists-path", "", "path to your list of new or existing m3u playlists that gonic can manage")
68
70
69
-
confDBPath:=flag.String("db-path", "gonic.db", "path to database (optional)")
71
+
confSqlitePath:=flag.String("db-path", "gonic.db", "path to database (optional, default: gonic.db)")
72
+
confPostgresHost:=flag.String("postgres-host", "", "name of the PostgreSQL gonicServer (optional)")
73
+
confPostgresPort:=flag.Int("postgres-port", 5432, "port to use for PostgreSQL connection (optional, default: 5432)")
74
+
confPostgresName:=flag.String("postgres-db", "gonic", "name of the PostgreSQL database (optional, default: gonic)")
75
+
confPostgresUser:=flag.String("postgres-user", "gonic", "name of the PostgreSQL user (optional, default: gonic)")
76
+
confPostgresSslModel:=flag.String("postgres-ssl-mode", "verify-full", "the ssl mode used for connecting to the PostreSQL instance (optional, default: verify-full)")
70
77
71
78
confScanIntervalMins:=flag.Uint("scan-interval", 0, "interval (in minutes) to automatically scan music (optional)")
72
79
confScanAtStart:=flag.Bool("scan-at-start-enabled", false, "whether to perform an initial scan at startup (optional)")
0 commit comments