-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
531 changed files
with
313 additions
and
227,495 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 @@ | ||
!dist/ | ||
.idea | ||
vendor/ |
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,28 @@ | ||
ARG GO_VERSION=1.18 | ||
ARG ALPINE_VERSION=3.17 | ||
|
||
FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} | ||
ARG USERNAME=vscode | ||
ARG USER_UID=1000 | ||
ARG USER_GID=1000 | ||
|
||
# Setup user | ||
RUN adduser $USERNAME -s /bin/sh -D -u $USER_UID $USER_GID && \ | ||
mkdir -p /etc/sudoers.d && \ | ||
echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME && \ | ||
chmod 0440 /etc/sudoers.d/$USERNAME | ||
|
||
# Install packages and Go language server | ||
RUN apk add -q --update --progress --no-cache git sudo openssh-client build-base curl vim | ||
RUN go clean -modcache | ||
|
||
USER $USERNAME | ||
ENV LANG=en_US.UTF-8 | ||
|
||
ENV GOPATH=/go | ||
ENV GO111MODULE=on | ||
|
||
RUN go install -v github.com/go-delve/delve/cmd/dlv@latest | ||
RUN go install -v golang.org/x/tools/gopls@latest | ||
|
||
ENV CONFIG="/home/vscode/workspaces/shaker/dev/config.yml" |
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,26 @@ | ||
{ | ||
"name": "OTT Shaker", | ||
"dockerComposeFile": "docker-compose.yml", | ||
"initializeCommand": "ls", | ||
"service": "shaker", | ||
"workspaceFolder": "/home/vscode/workspaces/${localWorkspaceFolderBasename}", | ||
|
||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"golang.go", | ||
"mhutchie.git-graph", | ||
"GitHub.copilot", | ||
"ZainChen.json", | ||
"esbenp.prettier-vscode" | ||
], | ||
"settings": { | ||
"go.useLanguageServer": true, | ||
"go.gopath": "/go", | ||
"go.goroot": "/usr/local/go" | ||
} | ||
} | ||
}, | ||
|
||
"postCreateCommand": "go mod tidy" | ||
} |
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,26 @@ | ||
version: '3.3' | ||
|
||
volumes: | ||
redis-data: | ||
|
||
services: | ||
shaker: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
|
||
# env_file: | ||
# - .env | ||
|
||
command: sleep infinity | ||
|
||
volumes: | ||
- ..:/home/vscode/workspaces/shaker | ||
|
||
db: | ||
image: redis:latest | ||
restart: unless-stopped | ||
volumes: | ||
- redis-data:/var/lib/postgresql/data | ||
# env_file: | ||
# - .env |
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,40 @@ | ||
name: Go | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
env: | ||
GO111MODULE: on | ||
|
||
steps: | ||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.18 | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Build | ||
run: go build | ||
|
||
- name: Prepare files for release | ||
run: | | ||
touch shaker_${{github.ref_name}}_linux-amd64.tar.gz | ||
mkdir shaker_${{github.ref_name}}_linux-amd64 | ||
mv shaker shaker_${{github.ref_name}}_linux-amd64/ | ||
tar -czf shaker_${{github.ref_name}}_linux-amd64.tar.gz --exclude='./.*' --exclude=shaker_${{github.ref_name}}_linux-amd64.tar.gz shaker_${{github.ref_name}}_linux-amd64 | ||
- uses: ncipollo/release-action@v1.13.0 | ||
with: | ||
name: Shaker_release_${{github.ref_name}} | ||
artifacts: "shaker_${{github.ref_name}}_linux-amd64.tar.gz" | ||
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
!dist/ | ||
.idea | ||
vendor/ |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Launch Package", | ||
"type": "go", | ||
"request": "launch", | ||
"mode": "auto", | ||
"program": "${workspaceFolder}/main.go", | ||
"dlvFlags": ["--check-go-version=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 |
---|---|---|
|
@@ -70,7 +70,7 @@ users: | |
|
||
# Build | ||
|
||
go build -mod vendor | ||
go build | ||
|
||
# For run | ||
|
||
|
Empty file.
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
Empty file.
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,12 @@ | ||
{ | ||
"redis": "pubsub", | ||
"jobs": [ | ||
{ | ||
"name": "Redis PubSub Pinger", | ||
"method": "publish", | ||
"channel": "slack is false", | ||
"message": "{\"name\": \"PING\"}", | ||
"cron": "* * * * *" | ||
} | ||
] | ||
} |
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 |
---|---|---|
@@ -1,18 +1,25 @@ | ||
module shaker | ||
|
||
go 1.18 | ||
|
||
require ( | ||
github.com/bamzi/jobrunner v0.0.0-20161019143021-273175f8b6eb | ||
github.com/bamzi/jobrunner v1.0.0 | ||
github.com/bsm/redis-lock v8.0.0+incompatible | ||
github.com/fsnotify/fsnotify v1.4.7 | ||
github.com/go-redis/redis v6.14.2+incompatible | ||
github.com/gorilla/websocket v1.4.0 // indirect | ||
github.com/lusis/go-slackbot v0.0.0-20180109053408-401027ccfef5 // indirect | ||
github.com/lusis/slack-test v0.0.0-20180109053238-3c758769bfa6 // indirect | ||
github.com/nlopes/slack v0.4.1-0.20181123205743-38ac5e8c495b | ||
github.com/onsi/ginkgo v1.7.0 // indirect | ||
github.com/onsi/gomega v1.4.3 // indirect | ||
github.com/pkg/errors v0.8.0 // indirect | ||
github.com/sirupsen/logrus v1.2.0 | ||
gopkg.in/robfig/cron.v2 v2.0.0-20150107220207-be2e0b0deed5 // indirect | ||
gopkg.in/yaml.v2 v2.2.1 | ||
github.com/fsnotify/fsnotify v1.6.0 | ||
github.com/go-redis/redis v6.15.9+incompatible | ||
github.com/nlopes/slack v0.6.0 | ||
github.com/sirupsen/logrus v1.9.0 | ||
gopkg.in/yaml.v2 v2.4.0 | ||
) | ||
|
||
require ( | ||
github.com/gorilla/websocket v1.2.0 // indirect | ||
github.com/kr/pretty v0.3.0 // indirect | ||
github.com/onsi/ginkgo v1.16.5 // indirect | ||
github.com/onsi/gomega v1.24.1 // indirect | ||
github.com/pkg/errors v0.9.1 // indirect | ||
github.com/robfig/cron/v3 v3.0.0 // indirect | ||
github.com/stretchr/testify v1.8.1 // indirect | ||
golang.org/x/sys v0.2.0 // indirect | ||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect | ||
) |
Oops, something went wrong.