octopush/internal/server/server.go
Kasper Juul Hermansen d6d98c2ce8 v0.2 (#14)
Co-authored-by: kjuulh <contact@kjuulh.io>
Reviewed-on: #14
2022-09-21 22:55:52 +02:00

23 lines
586 B
Go

package server
import (
"context"
"git.front.kjuulh.io/kjuulh/curre"
"git.front.kjuulh.io/kjuulh/octopush/internal/serverdeps"
"git.front.kjuulh.io/kjuulh/octopush/internal/services/signer"
"go.uber.org/zap"
)
func Start(logger *zap.Logger) error {
ctx := context.Background()
deps := serverdeps.NewServerDeps(logger)
return curre.NewManager().
Register(NewGinHttpServer(logger.With(zap.Namespace("ginHttpServer")), deps)).
Register(NewStorageServer(logger.With(zap.Namespace("storageServer")), deps)).
Register(signer.NewOpenPGPApp(deps.GetOpenPGP())).
Run(ctx)
}