drone/internal/server/wire.go
Enver Bisevac f03528e862 [MAINT] initial config for ci linter (#17)
* initial config for ci linter

* more linter work

* linter errors fix

* linter errors fix

* linter conf minor changes
2022-09-19 18:13:18 +02:00

27 lines
648 B
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.
package server
import (
"net/http"
"github.com/harness/gitness/types"
"github.com/google/wire"
)
// WireSet provides a wire set for this package.
var WireSet = wire.NewSet(ProvideServer)
// ProvideServer provides a server instance.
func ProvideServer(config *types.Config, handler http.Handler) *Server {
return &Server{
Acme: config.Server.Acme.Enabled,
Addr: config.Server.Bind,
Host: config.Server.Host,
Handler: handler,
}
}