Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenCDC changes #26

Merged
merged 6 commits into from
Oct 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.18

- name: Test
run: make test GOTEST_FLAGS="-v -count=1"
9 changes: 7 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.18

- name: golangci-lint
uses: golangci/golangci-lint-action@v3.2.0
uses: golangci/golangci-lint-action@v3
with:
version: v1.45.2
version: v1.49.0

96 changes: 1 addition & 95 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Created by https://www.toptal.com/developers/gitignore/api/macos,windows,goland,visualstudiocode,go
# Edit at https://www.toptal.com/developers/gitignore?templates=macos,windows,goland,visualstudiocode,go

### Go ###
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
Expand Down Expand Up @@ -33,50 +30,11 @@ go.work
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# AWS User-specific
.idea/**/aws.xml

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
.idea/

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

Expand All @@ -86,57 +44,6 @@ out/
# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# SonarLint plugin
.idea/sonarlint/

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### GoLand Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721

# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr

# Sonarlint plugin
# https://plugins.jetbrains.com/plugin/7973-sonarlint
.idea/**/sonarlint/

# SonarQube Plugin
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
.idea/**/sonarIssues.xml

# Markdown Navigator plugin
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
.idea/**/markdown-navigator.xml
.idea/**/markdown-navigator-enh.xml
.idea/**/markdown-navigator/

# Cache file creation bug
# See https://youtrack.jetbrains.com/issue/JBR-2257
.idea/$CACHE_FILE$

# CodeStream plugin
# https://plugins.jetbrains.com/plugin/12206-codestream
.idea/codestream.xml

### macOS ###
# General
.DS_Store
Expand All @@ -146,7 +53,6 @@ fabric.properties
# Icon must end with two \r
Icon


# Thumbnails
._*

Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,12 @@ There may be need to reconnect while connector is working. Server returns condit
There are a couple of steps that need to be done to start working with Salesforce connector.

1. Log in into Your Salesforce account, e.g. https://my-demo-app.my.salesforce.com. The environment is `my-demo-app`.
2. First, if not already done, You need to create connected app and enable OAuth: [Enable OAuth Settings for API Integration](https://help.salesforce.com/s/articleView?id=sf.connected_app_create_api_integration.htm&type=5). Successfully configured app example can be seen below:
2. First, if not already done, You need to create connected app and enable OAuth: [Enable OAuth Settings for API Integration](https://help.salesforce.com/s/articleView?id=sf.connected_app_create_api_integration.htm&type=5).

The callback URL is required, but not relevant for this connector, so you can put anything there.
maha-hajja marked this conversation as resolved.
Show resolved Hide resolved

Successfully configured app example can be seen below:

![Connected App example](docs/connect_and_configure_app.png)
3. Copy **Consumer Key** and **Consumer Secret**. If You need these values once again You can always find them in _Setup -> Apps -> App Manager_, find app on the list and choose _View_ option.
![View OAuth tokens](docs/view_oauth_tokens.png)
Expand Down
5 changes: 2 additions & 3 deletions cmd/connector/streaming_client_mock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,9 @@ func (s *streamingClientMock) Connect(_ context.Context) (responses.ConnectRespo
response.Events = append(response.Events, responses.ConnectResponseEvent{
Data: responses.ConnectResponseEventData{
Event: responses.ConnectResponseEventDataMetadata{
CreatedDate: record.CreatedAt,
ReplayID: s.lastIndex,
ReplayID: s.lastIndex,
},
SObject: record.Payload.(sdk.StructuredData),
SObject: record.Payload.After.(sdk.StructuredData),
},
Channel: "MyTopic1",
})
Expand Down
Empty file removed destination/.gitkeep
Empty file.
32 changes: 17 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,37 @@ module github.com/miquido/conduit-connector-salesforce
go 1.18

require (
github.com/conduitio/conduit-connector-sdk v0.2.1-0.20220608071937-511c321558fc
github.com/conduitio/conduit-connector-sdk v0.3.0
github.com/jaswdr/faker v1.15.0
github.com/stretchr/testify v1.8.0
golang.org/x/net v0.0.0-20220531201128-c960675eff93
golang.org/x/net v0.0.0-20220722155237-a158d28d115b
gopkg.in/tomb.v2 v2.0.0-20161208151619-d5d1b5820637
)

require (
github.com/conduitio/conduit-connector-protocol v0.2.0 // indirect
github.com/conduitio/conduit-connector-protocol v0.3.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/fatih/color v1.7.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/hashicorp/go-hclog v1.2.0 // indirect
github.com/hashicorp/go-plugin v1.4.4 // indirect
github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87 // indirect
github.com/hashicorp/go-hclog v0.14.1 // indirect
github.com/hashicorp/go-plugin v1.4.3 // indirect
github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb // indirect
github.com/jpillora/backoff v1.0.0 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/matryer/is v1.4.0 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/oklog/run v1.1.0 // indirect
github.com/mitchellh/go-testing-interface v1.0.0 // indirect
github.com/oklog/run v1.0.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rs/zerolog v1.27.0 // indirect
go.buf.build/library/go-grpc/conduitio/conduit-connector-protocol v1.4.1 // indirect
go.uber.org/goleak v1.1.12 // indirect
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
github.com/rs/zerolog v1.28.0 // indirect
go.buf.build/grpc/go/conduitio/conduit-connector-protocol v1.3.3 // indirect
go.uber.org/goleak v1.2.0 // indirect
golang.org/x/sys v0.0.0-20220926163933-8cfa568d3c25 // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/genproto v0.0.0-20220601144221-27df5f98adab // indirect
google.golang.org/grpc v1.47.0 // indirect
golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 // indirect
google.golang.org/genproto v0.0.0-20211104193956-4c6863e31247 // indirect
google.golang.org/grpc v1.43.0 // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading