Skip to content

Commit

Permalink
fix: salesforce adapter entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
katallaxie committed May 21, 2024
1 parent 2da4a0f commit 3f5fecf
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
18 changes: 18 additions & 0 deletions cmd/salesforcesource-adapter/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package main

import (
"github.com/golang-jwt/jwt/v4"

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

"github.com/zeiss/typhoon/pkg/sources/adapter/salesforcesource"
)

func main() {
// JWT package marshals Audience as array even if there is only one element in it. This does not
// seem to be supported by Salesforce. By setting the following option to false we tell the imported
// library to marshal single item Audience array as a string.
jwt.MarshalSingleStringAsArray = false

adapter.Main("salesforce", salesforcesource.NewEnvConfig, salesforcesource.NewAdapter)
}
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3'

services:
east1:
image: docker.io/nats:2.10.9
Expand Down
8 changes: 8 additions & 0 deletions internal/web/adapters/db.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package adapters

import (
"github.com/zeiss/typhoon/internal/api/models"
"github.com/zeiss/typhoon/internal/web/ports"

authz "github.com/zeiss/fiber-authz"
Expand Down Expand Up @@ -29,5 +30,12 @@ func (d *db) RunMigrations() error {
&authz.UserRole{},
&adapters.Account{},
&adapters.Session{},
&models.User{},
&models.Operator{},
&models.Account{},
&models.System{},
&models.Tag{},
&models.Cluster{},
&models.SigningKeyGroup{},
)
}

0 comments on commit 3f5fecf

Please sign in to comment.