drone/cli/server/standalone.wire.go
Johannes Batzill 4d3db64397 add specific handlers for api/git/web to allow replacement for harness (#23)
Abstracting the api/git/web routers will allow us to replace API routing (and potentially web?), while keeping the rest the same.
2022-09-30 17:05:39 -07:00

42 lines
1.1 KiB
Go

// Copyright 2021 Harness Inc. All rights reserved.
// Use of this source code is governed by the Polyform Free Trial License
// that can be found in the LICENSE.md file for this repository.
//go:build wireinject && !harness
// +build wireinject,!harness
package server
import (
"context"
"github.com/harness/gitness/internal/auth/authn"
"github.com/harness/gitness/internal/auth/authz"
"github.com/harness/gitness/internal/cron"
"github.com/harness/gitness/internal/guard"
"github.com/harness/gitness/internal/router"
"github.com/harness/gitness/internal/router/translator"
"github.com/harness/gitness/internal/server"
"github.com/harness/gitness/internal/store/database"
"github.com/harness/gitness/internal/store/memory"
"github.com/harness/gitness/types"
"github.com/google/wire"
)
func initSystem(ctx context.Context, config *types.Config) (*system, error) {
wire.Build(
newSystem,
database.WireSet,
memory.WireSet,
router.WireSet,
server.WireSet,
cron.WireSet,
guard.WireSet,
authn.WireSet,
authz.WireSet,
translator.WireSet,
)
return &system{}, nil
}