octopush/internal/server/server.go
Kasper Juul Hermansen 50228f0aff Adding Initial action (#1)
Co-authored-by: kjuulh <contact@kjuulh.io>
Reviewed-on: kjuulh/kraken#1
2022-09-12 22:12:02 +02:00

23 lines
582 B
Go

package server
import (
"context"
"git.front.kjuulh.io/kjuulh/curre"
"git.front.kjuulh.io/kjuulh/kraken/internal/serverdeps"
"git.front.kjuulh.io/kjuulh/kraken/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)
}