-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Stavros Foteinopoulos <[email protected]>
- Loading branch information
Showing
18 changed files
with
1,969 additions
and
0 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
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,16 @@ | ||
|
||
run: | ||
skip-dirs-use-default: false | ||
|
||
linters: | ||
enable: | ||
- revive | ||
- gocyclo | ||
- misspell | ||
|
||
gocyclo: | ||
min-complexity: 15 | ||
|
||
issues: | ||
exclude-use-default: false | ||
|
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,59 @@ | ||
HANDLER ?= bootstrap | ||
PACKAGE ?= $(HANDLER) | ||
GOPATH ?= $(HOME)/go | ||
GOOS ?= linux | ||
GOARCH ?= amd64 | ||
|
||
WORKDIR = $(CURDIR:$(GOPATH)%=/go%) | ||
ifeq ($(WORKDIR),$(CURDIR)) | ||
WORKDIR = /tmp | ||
endif | ||
|
||
all: build pack | ||
|
||
build: | ||
@echo "Building..." | ||
@GOOS=$(GOOS) GOARCH=$(GOARCH) CGO_ENABLED=0 go build -ldflags='-w -s' -o $(HANDLER) . | ||
|
||
pack: | ||
@echo "Packing binary..." | ||
@zip $(PACKAGE).zip $(HANDLER) | ||
|
||
update-modules: | ||
go get -u ./... | ||
go mod tidy | ||
|
||
.PHONY: fmt | ||
## fmt: Run go fmt on codebase | ||
fmt: | ||
@echo Checking if code is formatted | ||
files=$$(go list -f '{{range .GoFiles}}{{$$.Dir}}/{{.}} {{end}}' .); \ | ||
if [ "$$files" ]; then \ | ||
gofmt_output=$$(gofmt -d -s $$files 2>&1); \ | ||
if [ "$$gofmt_output" ]; then \ | ||
echo "$$gofmt_output"; \ | ||
echo "gofmt failed"; \ | ||
echo "To fix it, run:"; \ | ||
echo "go fmt [FILE]"; \ | ||
exit 1; \ | ||
fi; \ | ||
fi; \ | ||
echo "gofmt success"; \ | ||
|
||
.PHONY: lint | ||
## lint: Run golangci-lint on codebase | ||
lint: | ||
@echo "Linting..." | ||
@if ! [ -x "$$(command -v golangci-lint)" ]; then \ | ||
echo "golangci-lint is not installed. Please see https://github.com/golangci/golangci-lint#install for installation instructions."; \ | ||
exit 1; \ | ||
fi; \ | ||
|
||
@echo Running golangci-lint | ||
golangci-lint run ./... | ||
|
||
clean: | ||
@echo "Cleaning up..." | ||
@rm -rf $(HANDLER) $(PACKAGE).zip | ||
|
||
.PHONY: all build pack clean update-modules |
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,63 @@ | ||
module github.com/mattermost/mattermost-cloud-lambdas/elrond-notification | ||
|
||
go 1.21 | ||
|
||
require ( | ||
github.com/aws/aws-lambda-go v1.41.0 | ||
github.com/mattermost/elrond v0.5.0 | ||
github.com/opsgenie/opsgenie-go-sdk-v2 v1.2.22 | ||
github.com/pkg/errors v0.9.1 | ||
github.com/sirupsen/logrus v1.9.3 | ||
) | ||
|
||
require ( | ||
github.com/aws/aws-sdk-go v1.47.9 // indirect | ||
github.com/davecgh/go-spew v1.1.1 // indirect | ||
github.com/emicklei/go-restful/v3 v3.11.0 // indirect | ||
github.com/go-logr/logr v1.3.0 // indirect | ||
github.com/go-openapi/jsonpointer v0.20.0 // indirect | ||
github.com/go-openapi/jsonreference v0.20.2 // indirect | ||
github.com/go-openapi/swag v0.22.4 // indirect | ||
github.com/gogo/protobuf v1.3.2 // indirect | ||
github.com/golang/protobuf v1.5.3 // indirect | ||
github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect | ||
github.com/google/go-cmp v0.6.0 // indirect | ||
github.com/google/gofuzz v1.2.0 // indirect | ||
github.com/google/uuid v1.4.0 // indirect | ||
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect | ||
github.com/hashicorp/go-retryablehttp v0.7.5 // indirect | ||
github.com/imdario/mergo v0.3.16 // indirect | ||
github.com/jmespath/go-jmespath v0.4.0 // indirect | ||
github.com/josharian/intern v1.0.0 // indirect | ||
github.com/json-iterator/go v1.1.12 // indirect | ||
github.com/mailru/easyjson v0.7.7 // indirect | ||
github.com/mattermost/mattermost-cloud v0.78.0 // indirect | ||
github.com/mattermost/mattermost-operator v1.21.0-rc.2 // indirect | ||
github.com/mattermost/rotator v0.2.1-0.20230830064954-61490ed26761 // indirect | ||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect | ||
github.com/modern-go/reflect2 v1.0.2 // indirect | ||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect | ||
github.com/pborman/uuid v1.2.1 // indirect | ||
github.com/spf13/pflag v1.0.5 // indirect | ||
golang.org/x/net v0.18.0 // indirect | ||
golang.org/x/oauth2 v0.14.0 // indirect | ||
golang.org/x/sys v0.14.0 // indirect | ||
golang.org/x/term v0.14.0 // indirect | ||
golang.org/x/text v0.14.0 // indirect | ||
golang.org/x/time v0.4.0 // indirect | ||
google.golang.org/appengine v1.6.8 // indirect | ||
google.golang.org/protobuf v1.31.0 // indirect | ||
gopkg.in/inf.v0 v0.9.1 // indirect | ||
gopkg.in/yaml.v2 v2.4.0 // indirect | ||
gopkg.in/yaml.v3 v3.0.1 // indirect | ||
k8s.io/api v0.28.3 // indirect | ||
k8s.io/apimachinery v0.28.3 // indirect | ||
k8s.io/client-go v0.28.3 // indirect | ||
k8s.io/klog/v2 v2.110.1 // indirect | ||
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect | ||
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect | ||
sigs.k8s.io/controller-runtime v0.16.3 // indirect | ||
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect | ||
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect | ||
sigs.k8s.io/yaml v1.4.0 // indirect | ||
) |
Oops, something went wrong.