Skip to content

Commit

Permalink
chore: update interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
katallaxie authored Nov 5, 2024
1 parent 43e1e46 commit 44a902b
Show file tree
Hide file tree
Showing 27 changed files with 134 additions and 688 deletions.
5 changes: 1 addition & 4 deletions cmd/api/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package cmd
import (
"context"

"github.com/zeiss/typhoon/internal/api/adapters"
"github.com/zeiss/typhoon/internal/api/adapters/db"
"github.com/zeiss/typhoon/internal/api/adapters/handlers"
"github.com/zeiss/typhoon/internal/api/controllers"
Expand Down Expand Up @@ -72,7 +71,6 @@ func (s *WebSrv) Start(ctx context.Context, ready server.ReadyFunc, run server.R
}

db := db.NewDB(conn)
build := adapters.NewBuild()

swagger, err := openapi.GetSwagger()
if err != nil {
Expand All @@ -96,12 +94,11 @@ func (s *WebSrv) Start(ctx context.Context, ready server.ReadyFunc, run server.R

tc := controllers.NewTeamsController(db)
sc := controllers.NewSystemsController(db)
vc := controllers.NewVersionController(build)
oc := controllers.NewOperatorsController(db)
ac := controllers.NewAccountsController(db)
uc := controllers.NewUsersController(db)

handlers := handlers.NewApiHandlers(sc, tc, vc, oc, ac, uc)
handlers := handlers.NewApiHandlers(sc, tc, oc, ac, uc)

handler := openapi.NewStrictHandler(handlers, nil)
openapi.RegisterHandlers(app, handler)
Expand Down
4 changes: 2 additions & 2 deletions cmd/cloudeventstarget-adapter/main.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package main

import (
pkgadapter "knative.dev/eventing/pkg/adapter/v2"
"knative.dev/eventing/pkg/adapter/v2"

"github.com/zeiss/typhoon/pkg/targets/adapter/cloudeventstarget"
)

func main() {
pkgadapter.Main("cloudeventstarget", cloudeventstarget.EnvAccessorCtor, cloudeventstarget.NewTarget)
adapter.Main("cloudeventstarget", cloudeventstarget.EnvAccessorCtor, cloudeventstarget.NewTarget)
}
4 changes: 2 additions & 2 deletions cmd/httptarget-adapter/main.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package main

import (
pkgadapter "knative.dev/eventing/pkg/adapter/v2"
"knative.dev/eventing/pkg/adapter/v2"

"github.com/zeiss/typhoon/pkg/targets/adapter/httptarget"
)

func main() {
pkgadapter.Main("httptarget", httptarget.EnvAccessorCtor, httptarget.NewTarget)
adapter.Main("httptarget", httptarget.EnvAccessorCtor, httptarget.NewTarget)
}
4 changes: 2 additions & 2 deletions cmd/jiratarget-adapter/main.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package main

import (
pkgadapter "knative.dev/eventing/pkg/adapter/v2"
"knative.dev/eventing/pkg/adapter/v2"

"github.com/zeiss/typhoon/pkg/targets/adapter/jiratarget"
)

func main() {
pkgadapter.Main("jiratarget", jiratarget.EnvAccessorCtor, jiratarget.NewTarget)
adapter.Main("jiratarget", jiratarget.EnvAccessorCtor, jiratarget.NewTarget)
}
4 changes: 2 additions & 2 deletions cmd/jqtransformation-adapter/main.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package main

import (
pkgadapter "knative.dev/eventing/pkg/adapter/v2"
"knative.dev/eventing/pkg/adapter/v2"

"github.com/zeiss/typhoon/pkg/flow/adapter/jqtransformation"
)

func main() {
pkgadapter.Main("jqtransformation", jqtransformation.EnvAccessorCtor, jqtransformation.NewAdapter)
adapter.Main("jqtransformation", jqtransformation.EnvAccessorCtor, jqtransformation.NewAdapter)
}
4 changes: 2 additions & 2 deletions cmd/logztarget-adapter/main.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package main

import (
pkgadapter "knative.dev/eventing/pkg/adapter/v2"
"knative.dev/eventing/pkg/adapter/v2"

"github.com/zeiss/typhoon/pkg/targets/adapter/logztarget"
)

func main() {
pkgadapter.Main("logztarget", logztarget.EnvAccessorCtor, logztarget.NewTarget)
adapter.Main("logztarget", logztarget.EnvAccessorCtor, logztarget.NewTarget)
}
4 changes: 2 additions & 2 deletions cmd/natstarget-adapter/main.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package main

import (
pkgadapter "knative.dev/eventing/pkg/adapter/v2"
"knative.dev/eventing/pkg/adapter/v2"

"github.com/zeiss/typhoon/pkg/targets/adapter/natstarget"
)

func main() {
pkgadapter.Main("natstarget", natstarget.EnvAccessorCtor, natstarget.NewTarget)
adapter.Main("natstarget", natstarget.EnvAccessorCtor, natstarget.NewTarget)
}
5 changes: 2 additions & 3 deletions cmd/servicenowtarget-adapter/main.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package main

import (
pkgadapter "knative.dev/eventing/pkg/adapter/v2"

"github.com/zeiss/typhoon/pkg/targets/adapter/servicenowtarget"
"knative.dev/eventing/pkg/adapter/v2"
)

func main() {
pkgadapter.Main("servicenowtarget", servicenowtarget.EnvAccessorCtor, servicenowtarget.NewTarget)
adapter.Main("servicenowtarget", servicenowtarget.EnvAccessorCtor, servicenowtarget.NewTarget)
}
4 changes: 2 additions & 2 deletions cmd/synchronizer-adapter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package main

import (
"github.com/zeiss/typhoon/pkg/flow/adapter/synchronizer"
pkgadapter "knative.dev/eventing/pkg/adapter/v2"
"knative.dev/eventing/pkg/adapter/v2"
)

func main() {
pkgadapter.Main("synchronizer", synchronizer.EnvAccessorCtor, synchronizer.NewAdapter)
adapter.Main("synchronizer", synchronizer.EnvAccessorCtor, synchronizer.NewAdapter)
}
5 changes: 3 additions & 2 deletions cmd/transformation-adapter/main.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package main

import (
"knative.dev/eventing/pkg/adapter/v2"

"github.com/zeiss/typhoon/pkg/flow/adapter/transformation"
pkgadapter "knative.dev/eventing/pkg/adapter/v2"
)

func main() {
pkgadapter.Main("transformation", transformation.NewEnvConfig, transformation.NewAdapter)
adapter.Main("transformation", transformation.NewEnvConfig, transformation.NewAdapter)
}
5 changes: 2 additions & 3 deletions cmd/xmltojsontransformation-adapter/main.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package main

import (
pkgadapter "knative.dev/eventing/pkg/adapter/v2"

"github.com/zeiss/typhoon/pkg/flow/adapter/xmltojsontransformation"
"knative.dev/eventing/pkg/adapter/v2"
)

func main() {
pkgadapter.Main("xmltojsontransformation", xmltojsontransformation.EnvAccessorCtor, xmltojsontransformation.NewAdapter)
adapter.Main("xmltojsontransformation", xmltojsontransformation.EnvAccessorCtor, xmltojsontransformation.NewAdapter)
}
4 changes: 2 additions & 2 deletions cmd/xslttransformation-adapter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ package main

import (
"github.com/zeiss/typhoon/pkg/flow/adapter/xslttransformation"
pkgadapter "knative.dev/eventing/pkg/adapter/v2"
"knative.dev/eventing/pkg/adapter/v2"
)

func main() {
pkgadapter.Main("xslttransformation", xslttransformation.EnvAccessorCtor, xslttransformation.NewTarget)
adapter.Main("xslttransformation", xslttransformation.EnvAccessorCtor, xslttransformation.NewTarget)
}
4 changes: 0 additions & 4 deletions gen.go

This file was deleted.

Loading

0 comments on commit 44a902b

Please sign in to comment.