fx build fix
Some checks failed
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/fx/1 Pipeline failed
ci/woodpecker/push/nats Pipeline was successful
ci/woodpecker/push/fx/2 Pipeline failed

This commit is contained in:
Stephan D
2025-11-08 00:40:01 +01:00
parent 49b86efecb
commit d367dddbbd
98 changed files with 3983 additions and 5063 deletions

View File

@@ -0,0 +1,21 @@
package api
import (
"github.com/tech/sendico/notification/interface/api/localizer"
"github.com/tech/sendico/pkg/db"
"github.com/tech/sendico/pkg/domainprovider"
"github.com/tech/sendico/pkg/messaging"
"github.com/tech/sendico/pkg/mlogger"
"github.com/tech/sendico/pkg/mservice"
)
type API interface {
Config() *Config
DBFactory() db.Factory
Logger() mlogger.Logger
Register() messaging.Register
Localizer() localizer.Localizer
DomainProvider() domainprovider.DomainProvider
}
type MicroServiceFactoryT = func(API) (mservice.MicroService, error)

View File

@@ -0,0 +1,13 @@
package api
import (
mwa "github.com/tech/sendico/notification/interface/middleware"
amp "github.com/tech/sendico/notification/interface/services/amplitude/config"
not "github.com/tech/sendico/notification/interface/services/notification/config"
)
type Config struct {
Mw *mwa.Config `yaml:"middleware"`
Notification *not.Config `yaml:"notification"`
Amplitude *amp.Config `yaml:"amplitude"`
}

View File

@@ -0,0 +1,19 @@
package localizer
import (
lclrimp "github.com/tech/sendico/notification/internal/localizer"
"github.com/tech/sendico/pkg/mlogger"
)
type Config = *lclrimp.Config
type Localizer interface {
LocalizeTemplate(id string, templateData, ctr any, lang string) (string, error)
LocalizeString(id, lang string) (string, error)
ServiceName() string
SupportMail() string
}
func CreateLocalizer(logger mlogger.Logger, config *Config) (Localizer, error) {
return lclrimp.CreateLocalizer(logger, *config)
}

View File

@@ -0,0 +1,12 @@
package middleware
import (
ai "github.com/tech/sendico/notification/internal/api/config"
)
type (
Config = ai.Config
Signature = ai.SignatureConf
)
type MapClaims = ai.MapClaims

View File

@@ -0,0 +1,11 @@
package amplitude
import (
"github.com/tech/sendico/notification/interface/api"
ampliimp "github.com/tech/sendico/notification/internal/server/amplitude"
"github.com/tech/sendico/pkg/mservice"
)
func Create(a api.API) (mservice.MicroService, error) {
return ampliimp.CreateAPI(a)
}

View File

@@ -0,0 +1,5 @@
package amplitude
type Config struct {
Environment string `yaml:"ampli_environment_env"`
}

View File

@@ -0,0 +1,6 @@
package notificationimp
type Config struct {
Driver string `yaml:"driver"`
Settings map[string]any `yaml:"settings,omitempty"`
}

View File

@@ -0,0 +1,11 @@
package notification
import (
"github.com/tech/sendico/notification/interface/api"
"github.com/tech/sendico/notification/internal/server/notificationimp"
"github.com/tech/sendico/pkg/mservice"
)
func Create(a api.API) (mservice.MicroService, error) {
return notificationimp.CreateAPI(a)
}