Simplify pkg/devfile/adapters/... packages (#5914)

* Remove dependency on common.AdapterContext for sync.Adapter

* Simplify adapters.NewComponentAdapter

* NewComponentAdapter accepts kubernetes.KubernetesContext instead of interface{}

* Replace KubernetesContext with its only field Namespace

* Move the Push Interface and  builders to the kubernetes.component  package

* Move AdapterContext to kubernetes.component package

* Embeds component.New into NewKubernetesAdapter

* Move GetCommandsMap where it is used

* Move GetSyncFilesFromAttributes  where it is used

* Move constants where they are used

* Move types to adapters package

* Update pkg/devfile/adapters/kubernetes/component/adapter.go

Co-authored-by: Armel Soro <armel@rm3l.org>

Co-authored-by: Armel Soro <armel@rm3l.org>
This commit is contained in:
Philippe Martin
2022-07-06 09:35:42 +02:00
committed by GitHub
parent ee120b7a22
commit a0b0d0f3c1
24 changed files with 221 additions and 462 deletions

View File

@@ -82,3 +82,8 @@ mockgen -source=pkg/binding/interface.go \
mockgen -source=pkg/binding/backend/interface.go \
-package backend \
-destination pkg/binding/backend/mock.go
mockgen -source=pkg/sync/sync.go \
-package mock \
-destination pkg/sync/mock/sync.go