Remove unused methods in storage interfaces, improve logs

This commit is contained in:
lash 2025-01-04 21:13:39 +00:00
parent cc9760125a
commit 51b6fc0dde
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
7 changed files with 7 additions and 7 deletions

View File

@ -47,7 +47,7 @@ func main() {
var err error
flag.StringVar(&resourceDir, "resourcedir", path.Join("services", "registration"), "resource dir")
flag.StringVar(&connStr, "c", ".state", "connection string")
flag.StringVar(&connStr, "c", "", "connection string")
flag.BoolVar(&engineDebug, "d", false, "use engine debug output")
flag.UintVar(&size, "s", 160, "max size of output")
flag.StringVar(&host, "h", initializers.GetEnv("HOST", "127.0.0.1"), "http host")
@ -63,7 +63,7 @@ func main() {
os.Exit(1)
}
logg.Infof("start command", "build", build, "dbdir", connStr, "resourcedir", resourceDir, "outputsize", size)
logg.Infof("start command", "build", build, "conn", connData, "resourcedir", resourceDir, "outputsize", size)
ctx := context.Background()
ctx = context.WithValue(ctx, "Database", database)

View File

@ -74,7 +74,7 @@ func main() {
os.Exit(1)
}
logg.Infof("start command", "connstr", connStr, "resourcedir", resourceDir, "outputsize", size, "sessionId", sessionId)
logg.Infof("start command", "conn", connData, "resourcedir", resourceDir, "outputsize", size, "sessionId", sessionId)
ctx := context.Background()
ctx = context.WithValue(ctx, "Database", database)

View File

@ -62,7 +62,7 @@ func main() {
os.Exit(1)
}
logg.Infof("start command", "connstr", connStr, "resourcedir", resourceDir, "outputsize", size)
logg.Infof("start command", "conn", connData, "resourcedir", resourceDir, "outputsize", size)
ctx := context.Background()
ctx = context.WithValue(ctx, "Database", database)

View File

@ -52,7 +52,7 @@ func main() {
os.Exit(1)
}
logg.Infof("start command", "connstr", connStr, "outputsize", size)
logg.Infof("start command", "conn", connData, "outputsize", size)
ctx := context.Background()
ctx = context.WithValue(ctx, "SessionId", sessionId)

View File

@ -23,7 +23,6 @@ type StorageServices interface {
GetPersister(ctx context.Context) (*persist.Persister, error)
GetUserdataDb(ctx context.Context) (db.Db, error)
GetResource(ctx context.Context) (resource.Resource, error)
SetConn(conn storage.ConnData)
}
type StorageService struct {

View File

@ -48,6 +48,8 @@ func main() {
os.Exit(1)
}
logg.Infof("start command", "conn", connData)
ctx := context.Background()
ctx = context.WithValue(ctx, "SessionId", sessionId)
ctx = context.WithValue(ctx, "Database", database)

View File

@ -23,7 +23,6 @@ type StorageService interface {
GetPersister(ctx context.Context) (*persist.Persister, error)
GetUserdataDb(ctx context.Context) db.Db
GetResource(ctx context.Context) (resource.Resource, error)
SetConn(connStr string) error
}
type MenuStorageService struct {