-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial Amazon SQS Connector Draft * nit attributes * Add readme * Add tests, cleanup, seperate configs for src and dest * lint * Update go.mod * linter * Remove token, cleanup * lint * Update .golangci.yml * test config * update readme and makefile * Update README.md * Update .golangci.yml * Update .golangci.yml * lint lint * lint lint * more updates on src + dst + lint * sleep? * Update some tests and config files * source test update * draft * remove go:generate statement --------- Co-authored-by: Lovro Mažgon <[email protected]>
- Loading branch information
1 parent
61da971
commit 8156a30
Showing
32 changed files
with
1,877 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Define code owners (individuals or teams that are responsible for code in this repository) | ||
# More about code owners at https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners | ||
* @conduitio-labs/conduit-core |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: 🚀 Feature Request | ||
description: Request a new feature. | ||
title: "Feature: <title>" | ||
labels: [feature, triage] | ||
body: | ||
- type: textarea | ||
attributes: | ||
label: Feature description | ||
description: A clear and concise description of what you want to happen and what problem will this solve. | ||
validations: | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: 🐛 Bug | ||
description: Report a bug. | ||
title: "Bug: <title>" | ||
labels: [bug, triage] | ||
body: | ||
- type: textarea | ||
attributes: | ||
label: Bug description | ||
description: A concise description of what you're experiencing and what you expected to happen instead. | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Steps to reproduce | ||
description: Steps to reproduce the behavior. | ||
placeholder: | | ||
1. In this environment... | ||
2. With this config... | ||
3. Run '...' | ||
4. See error... | ||
validations: | ||
required: true | ||
- type: input | ||
attributes: | ||
label: Version | ||
description: "Version of connector" | ||
placeholder: v0.1.0 darwin/amd64 | ||
validations: | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
blank_issues_enabled: true | ||
contact_links: | ||
- name: ❓ Ask a Question | ||
url: https://github.com/ConduitIO/conduit/discussions | ||
about: Please ask and answer questions here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Docs: https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates | ||
version: 2 | ||
updates: | ||
|
||
# Maintain dependencies for GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
commit-message: | ||
prefix: ".github:" | ||
|
||
# Maintain dependencies for Go | ||
- package-ecosystem: "gomod" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
commit-message: | ||
prefix: "go.mod:" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
### Description | ||
|
||
Please include a summary of the change and what type of change it is (new feature, bug fix, refactoring, documentation). | ||
Please also include relevant motivation and context. | ||
List any dependencies that are required for this change. | ||
|
||
Fixes # (issue) | ||
|
||
### Quick checks: | ||
|
||
- [ ] There is no other [pull request](https://github.com/conduitio-labs/conduit-connector-sqs/pulls) for the same update/change. | ||
- [ ] I have written unit tests. | ||
- [ ] I have made sure that the PR is of reasonable size and can be easily reviewed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: 'go.mod' | ||
- name: Test | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_REGION: ${{ secrets.AWS_REGION }} | ||
AWS_MESSAGE_DELAY: ${{ secrets.AWS_MESSAGE_DELAY }} | ||
AWS_VISIBILITY: ${{ secrets.AWS_VISIBILITY }} | ||
run: make test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# This action automatically merges dependabot PRs that update go dependencies (only patch and minor updates). | ||
# Based on: https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/automating-dependabot-with-github-actions#enable-auto-merge-on-a-pull-request | ||
|
||
name: Dependabot auto-merge | ||
on: | ||
pull_request: | ||
# Run this action when dependabot labels the PR, we care about the 'go' label. | ||
types: [labeled] | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
jobs: | ||
dependabot-go: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.actor == 'dependabot[bot]' && contains(github.event.pull_request.labels.*.name, 'go') }} | ||
steps: | ||
- name: Dependabot metadata | ||
id: metadata | ||
uses: dependabot/[email protected] | ||
with: | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
- name: Approve PR | ||
# Approve only patch and minor updates | ||
if: ${{ steps.metadata.outputs.update-type != 'version-update:semver-major' }} | ||
run: gh pr review --approve "$PR_URL" | ||
env: | ||
PR_URL: ${{ github.event.pull_request.html_url }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Enable auto-merge for Dependabot PRs | ||
# Enable auto-merging only for patch and minor updates | ||
if: ${{ steps.metadata.outputs.update-type != 'version-update:semver-major' }} | ||
run: gh pr merge --auto --squash "$PR_URL" | ||
env: | ||
PR_URL: ${{ github.event.pull_request.html_url }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: lint | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
|
||
jobs: | ||
golangci-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: 'go.mod' | ||
- name: golangci-lint | ||
uses: golangci/[email protected] | ||
with: | ||
version: v1.55.2 | ||
args: --timeout=2m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: 'go.mod' | ||
|
||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Copyright © {{ copyright-year }} Meroxa, Inc. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
linters-settings: | ||
gofmt: | ||
simplify: false | ||
govet: | ||
check-shadowing: false | ||
nolintlint: | ||
allow-unused: false # report any unused nolint directives | ||
require-explanation: true # require an explanation for nolint directives | ||
require-specific: true # require nolint directives to mention the specific linter being suppressed | ||
gocyclo: | ||
min-complexity: 20 | ||
goconst: | ||
ignore-tests: true | ||
goheader: | ||
template-path: '.golangci.goheader.template' | ||
values: | ||
regexp: | ||
copyright-year: 20[2-9]\d | ||
|
||
issues: | ||
exclude-rules: | ||
- path: _test\.go | ||
linters: | ||
- dogsled | ||
- gosec | ||
- revive | ||
|
||
linters: | ||
# please, do not use `enable-all`: it's deprecated and will be removed soon. | ||
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint | ||
disable-all: true | ||
enable: | ||
- bodyclose | ||
# - depguard | ||
- dogsled | ||
- durationcheck | ||
- errcheck | ||
- errname | ||
# - errorlint | ||
# - exhaustive | ||
# - exhaustivestruct | ||
- exportloopref | ||
# - forbidigo | ||
# - forcetypeassert | ||
# - funlen | ||
# - gochecknoinits | ||
- goconst | ||
- gocritic | ||
- gocyclo | ||
# - cyclop # not interested in package complexities at the moment | ||
# - godot | ||
- gofmt | ||
# - gofumpt | ||
- goheader | ||
- goimports | ||
- revive | ||
# - gomnd | ||
- gomoddirectives | ||
- gomodguard | ||
- goprintffuncname | ||
- gosec | ||
- gosimple | ||
- govet | ||
# - ifshort | ||
- ineffassign | ||
# - importas | ||
# - lll | ||
# - misspell | ||
- makezero | ||
# - nakedret | ||
# - nilerr | ||
# - nilnil | ||
# - nlreturn | ||
- noctx | ||
- nolintlint | ||
# - paralleltest | ||
- predeclared | ||
- rowserrcheck | ||
- staticcheck | ||
- stylecheck | ||
- sqlclosecheck | ||
# - tagliatelle | ||
# - tenv | ||
# - thelper | ||
# - tparallel | ||
- typecheck | ||
- unconvert | ||
# - unparam | ||
- unused | ||
- wastedassign | ||
- whitespace | ||
# - wrapcheck | ||
# - wsl | ||
|
||
# don't enable: | ||
# - asciicheck | ||
# - dupl | ||
# - gochecknoglobals | ||
# - gocognit | ||
# - godox | ||
# - goerr113 | ||
# - maligned | ||
# - nestif | ||
# - prealloc | ||
# - testpackage | ||
# - wsl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
builds: | ||
- main: ./cmd/connector/main.go | ||
goos: | ||
- darwin | ||
- linux | ||
- windows | ||
env: | ||
- CGO_ENABLED=0 | ||
ldflags: | ||
- "-s -w -X 'github.com/conduitio-labs/conduit-connector-sqs.version={{ .Tag }}'" | ||
checksum: | ||
name_template: checksums.txt | ||
archives: | ||
- name_template: >- | ||
{{ .ProjectName }}_ | ||
{{- .Version }}_ | ||
{{- title .Os }}_ | ||
{{- if eq .Arch "amd64" }}x86_64 | ||
{{- else if eq .Arch "386" }}i386 | ||
{{- else }}{{ .Arch }}{{ end }} | ||
changelog: | ||
sort: asc | ||
use: github | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' | ||
- '^go.mod:' | ||
- '^.github:' | ||
- Merge branch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
VERSION=$(shell git describe --tags --dirty --always) | ||
.PHONY: | ||
build: | ||
go build -ldflags "-X 'github.com/conduitio-labs/conduit-connector-sqs.version=${VERSION}'" -o conduit-connector-sqs cmd/connector/main.go | ||
|
||
.PHONY: | ||
test: | ||
go test $(GOTEST_FLAGS) -race -v ./... | ||
|
||
.PHONY: golangci-lint-install | ||
golangci-lint-install: | ||
go install github.com/golangci/golangci-lint/cmd/golangci-lint | ||
|
||
.PHONY: | ||
lint: | ||
golangci-lint run | ||
|
||
install-paramgen: | ||
go install github.com/conduitio/conduit-connector-sdk/cmd/paramgen@latest |
Oops, something went wrong.