use global vars

This commit is contained in:
Carlosokumu 2024-09-14 17:05:11 +03:00
parent 1d90cce51a
commit c79d3498cc
Signed by: carlos
GPG Key ID: 7BD6BC8160A5C953
2 changed files with 5 additions and 5 deletions

View File

@ -28,8 +28,8 @@ var (
logg = logging.NewVanilla().WithDomain("ussdmenuhandler") logg = logging.NewVanilla().WithDomain("ussdmenuhandler")
scriptDir = path.Join("services", "registration") scriptDir = path.Join("services", "registration")
translationDir = path.Join(scriptDir, "locale") translationDir = path.Join(scriptDir, "locale")
validPin = 4 validPin = 4
validYOB = 4 validYOB = 4
) )
type FSData struct { type FSData struct {

View File

@ -6,8 +6,8 @@ import (
) )
type Storage struct { type Storage struct {
Persister *persist.Persister Persister *persist.Persister
UserdataDb db.Db UserdataDb db.Db
} }
type StorageProvider interface { type StorageProvider interface {
@ -25,7 +25,7 @@ func NewSimpleStorageProvider(stateStore db.Db, userdataStore db.Db) StorageProv
pe = pe.WithFlush() pe = pe.WithFlush()
return &SimpleStorageProvider{ return &SimpleStorageProvider{
Storage: Storage{ Storage: Storage{
Persister: pe, Persister: pe,
UserdataDb: userdataStore, UserdataDb: userdataStore,
}, },
} }