with moved commands

This commit is contained in:
2022-09-21 21:29:44 +02:00
parent 8e12bf1bff
commit 73be67a0fd
13 changed files with 486 additions and 378 deletions

26
internal/cli/cli.go Normal file
View File

@@ -0,0 +1,26 @@
package cli
import (
"context"
"git.front.kjuulh.io/kjuulh/curre"
"git.front.kjuulh.io/kjuulh/octopush/internal/server"
"git.front.kjuulh.io/kjuulh/octopush/internal/serverdeps"
"git.front.kjuulh.io/kjuulh/octopush/internal/services/signer"
"go.uber.org/zap"
)
func Start(ctx context.Context, logger *zap.Logger) (*serverdeps.ServerDeps, error) {
deps := serverdeps.NewServerDeps(logger)
err := curre.NewManager().
Register(
server.NewStorageServer(logger.With(zap.Namespace("storage")), deps),
).
Register(
signer.NewOpenPGPApp(deps.GetOpenPGP()),
).
RunNonBlocking(ctx)
return deps, err
}