2022-09-10 12:46:02 +02:00
|
|
|
package server
|
2022-09-10 20:20:49 +02:00
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
"git.front.kjuulh.io/kjuulh/curre"
|
2022-09-21 11:06:53 +02:00
|
|
|
"git.front.kjuulh.io/kjuulh/octopush/internal/serverdeps"
|
|
|
|
"git.front.kjuulh.io/kjuulh/octopush/internal/services/signer"
|
2022-09-10 20:20:49 +02:00
|
|
|
"go.uber.org/zap"
|
|
|
|
)
|
|
|
|
|
|
|
|
func Start(logger *zap.Logger) error {
|
|
|
|
ctx := context.Background()
|
|
|
|
|
|
|
|
deps := serverdeps.NewServerDeps(logger)
|
|
|
|
|
|
|
|
return curre.NewManager().
|
2022-09-12 22:12:02 +02:00
|
|
|
Register(NewGinHttpServer(logger.With(zap.Namespace("ginHttpServer")), deps)).
|
|
|
|
Register(NewStorageServer(logger.With(zap.Namespace("storageServer")), deps)).
|
|
|
|
Register(signer.NewOpenPGPApp(deps.GetOpenPGP())).
|
2022-09-10 20:20:49 +02:00
|
|
|
Run(ctx)
|
|
|
|
}
|