mirror of
https://github.com/twofas/2fas-server.git
synced 2024-12-12 20:20:19 +01:00
24 lines
428 B
Go
24 lines
428 B
Go
|
package domain
|
||
|
|
||
|
import (
|
||
|
"github.com/2fas/api/internal/common/logging"
|
||
|
"github.com/2fas/api/internal/common/storage"
|
||
|
"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,
|
||
|
}
|
||
|
}
|