2fas-server/internal/api/mobile/domain/mobile_config.go

24 lines
448 B
Go
Raw Normal View History

2022-12-31 10:22:38 +01:00
package domain
import (
2023-01-30 19:59:42 +01:00
"github.com/twofas/2fas-server/internal/common/logging"
"github.com/twofas/2fas-server/internal/common/storage"
2022-12-31 10:22:38 +01:00
"os"
)
type FcmPushConfig struct {
FcmApiServiceAccountFile *os.File
}
func NewFcmPushConfig(fs storage.FileSystemStorage) *FcmPushConfig {
file, err := fs.Get("/2fas-api/service_account_key.json")
if err != nil {
logging.Fatal(err)
}
return &FcmPushConfig{
FcmApiServiceAccountFile: file,
}
}