mirror of
https://github.com/int128/kubelogin.git
synced 2026-05-19 14:26:34 +00:00
* Refactor: use func type instead of factory interface * Refactor: remove duplicated dependencies in di.go
28 lines
616 B
Go
28 lines
616 B
Go
// Package setup provides the use case of setting up environment.
|
|
package setup
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/google/wire"
|
|
"github.com/int128/kubelogin/pkg/adaptors/certpool"
|
|
"github.com/int128/kubelogin/pkg/adaptors/logger"
|
|
"github.com/int128/kubelogin/pkg/usecases/authentication"
|
|
)
|
|
|
|
var Set = wire.NewSet(
|
|
wire.Struct(new(Setup), "*"),
|
|
wire.Bind(new(Interface), new(*Setup)),
|
|
)
|
|
|
|
type Interface interface {
|
|
DoStage1()
|
|
DoStage2(ctx context.Context, in Stage2Input) error
|
|
}
|
|
|
|
type Setup struct {
|
|
Authentication authentication.Interface
|
|
NewCertPool certpool.NewFunc
|
|
Logger logger.Interface
|
|
}
|