feat: switch to drone 1.0 (#399)

fix #397
This commit is contained in:
Bo-Yi Wu 2019-03-16 11:37:01 +08:00 committed by GitHub
parent 5321ed4575
commit 3f223cf6c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
25 changed files with 1104 additions and 697 deletions

16
.drone.jsonnet Normal file
View File

@ -0,0 +1,16 @@
local pipeline = import 'pipeline.libsonnet';
local name = 'gorush';
[
pipeline.test,
pipeline.build(name, 'linux', 'amd64'),
pipeline.build(name, 'linux', 'arm64'),
pipeline.build(name, 'linux', 'arm'),
pipeline.release,
pipeline.notifications(depends_on=[
'linux-amd64',
'linux-arm64',
'linux-arm',
'release-binary',
]),
]

View File

@ -1,191 +1,404 @@
workspace: ---
base: /go/src kind: pipeline
path: github.com/appleboy/gorush name: testing
clone: platform:
git: os: linux
image: plugins/git arch: amd64
depth: 50
tags: true
pipeline: steps:
deps: - name: vet
image: golang:1.11 pull: always
pull: true image: golang:1.12
group: golang commands:
commands: - make vet
- make deps environment:
- make embedmd GO111MODULE: on
volumes:
- name: gopath
path: /go
lint: - name: lint
image: golang:1.11 pull: always
pull: true image: golang:1.12
group: golang commands:
commands: - make lint
- make vet environment:
- make lint GO111MODULE: on
volumes:
- name: gopath
path: /go
vendor: - name: misspell
image: golang:1.11 pull: always
pull: true image: golang:1.12
group: golang commands:
commands: - make misspell-check
- make test-vendor environment:
- make misspell-check GO111MODULE: on
- make fmt-check volumes:
- name: gopath
path: /go
go_module_build_linux_amd64: - name: embedmd
image: golang:1.11 pull: always
pull: true image: golang:1.12
group: golang commands:
environment: - make embedmd
- GO111MODULE=on environment:
commands: GO111MODULE: on
- make module volumes:
- make build_linux_amd64 - name: gopath
path: /go
build_linux_amd64: - name: test
image: golang:1.11 pull: always
pull: true image: golang:1.12
group: golang commands:
commands: - make test
- make build_linux_amd64 environment:
ANDROID_API_KEY:
from_secret: android_api_key
ANDROID_TEST_TOKEN:
from_secret: android_test_token
GO111MODULE: on
volumes:
- name: gopath
path: /go
build_linux_i386: - name: codecov
image: golang:1.11 pull: always
pull: true image: robertstettner/drone-codecov
group: golang settings:
commands: token:
- make build_linux_i386 from_secret: codecov_token
build_linux_arm64:
image: golang:1.11
pull: true
group: golang
commands:
- make build_linux_arm64
build_linux_arm:
image: golang:1.11
pull: true
group: golang
commands:
- make build_linux_arm
# coverage:
# image: golang:1.11
# pull: true
# group: golang
# secrets: [ android_test_token, android_api_key ]
# commands:
# - make unit-test-coverage
# when:
# event: [ push, pull_request ]
# generate-coverage:
# image: golang:1.11
# pull: true
# commands:
# - make coverage
# when:
# event: [ push, pull_request ]
# codecov:
# image: robertstettner/drone-codecov
# secrets: [ codecov_token ]
# files:
# - coverage.all
# when:
# event: [ push, pull_request ]
release:
image: golang:1.11
pull: true
commands:
- make release
when:
event: [ tag ]
publish_linux_amd64:
image: plugins/docker
group: release
pull: true
secrets: [ docker_username, docker_password ]
default_tags: true
repo: ${DRONE_REPO}
when:
event: [ push, tag ]
local: false
publish_linux_alpine:
image: plugins/docker
group: release
pull: true
dockerfile: Dockerfile.alpine
secrets: [ docker_username, docker_password ]
default_tags: true
default_suffix: alpine
repo: ${DRONE_REPO}
when:
event: [ push, tag ]
local: false
publish_linux_i386:
image: plugins/docker
group: release
pull: true
dockerfile: Dockerfile.i386
secrets: [ docker_username, docker_password ]
default_tags: true
default_suffix: i386
repo: ${DRONE_REPO}
when:
event: [ push, tag ]
local: false
publish_linux_arm:
image: plugins/docker
group: release
pull: true
dockerfile: Dockerfile.arm
secrets: [ docker_username, docker_password ]
default_tags: true
default_suffix: arm
repo: ${DRONE_REPO}
when:
event: [ push, tag ]
local: false
publish_linux_arm64:
image: plugins/docker
group: release
pull: true
dockerfile: Dockerfile.arm64
secrets: [ docker_username, docker_password ]
default_tags: true
default_suffix: arm64
repo: ${DRONE_REPO}
when:
event: [ push, tag ]
local: false
release_tag:
image: plugins/github-release
secrets: [ github_release_api_key ]
group: release
files:
- dist/release/*
when:
event: [ tag ]
local: false
discord:
image: appleboy/drone-discord
pull: true
secrets: [ discord_webhook_id, discord_webhook_token ]
when:
status: [ success, failure ]
services: services:
redis: - name: redis
image: redis:alpine image: redis
volumes:
- name: gopath
temp: {}
---
kind: pipeline
name: linux-amd64
platform:
os: linux
arch: amd64
steps:
- name: build-push
pull: always
image: golang:1.12
commands:
- "go build -v -ldflags '-X main.build=${DRONE_BUILD_NUMBER}' -a -o release/linux/amd64/gorush"
environment:
CGO_ENABLED: 0
GO111MODULE: on
when:
event:
exclude:
- tag
- name: build-tag
pull: always
image: golang:1.12
commands:
- "go build -v -ldflags '-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}' -a -o release/linux/amd64/gorush"
environment:
CGO_ENABLED: 0
GO111MODULE: on
when:
event:
- tag
- name: executable
pull: always
image: golang:1.12
commands:
- ./release/linux/amd64/gorush --help
- name: dryrun
pull: always
image: plugins/docker:linux-amd64
settings:
cache_from: appleboy/gorush
dockerfile: docker/Dockerfile.linux.amd64
dry_run: true
repo: appleboy/gorush
tags: linux-amd64
when:
event:
- pull_request
- name: publish
pull: always
image: plugins/docker:linux-amd64
settings:
auto_tag: true
auto_tag_suffix: linux-amd64
cache_from: appleboy/gorush
daemon_off: false
dockerfile: docker/Dockerfile.linux.amd64
password:
from_secret: docker_password
repo: appleboy/gorush
username:
from_secret: docker_username
when:
event:
exclude:
- pull_request
trigger:
ref:
- refs/heads/master
- "refs/pull/**"
- "refs/tags/**"
depends_on:
- testing
---
kind: pipeline
name: linux-arm64
platform:
os: linux
arch: arm64
steps:
- name: build-push
pull: always
image: golang:1.12
commands:
- "go build -v -ldflags '-X main.build=${DRONE_BUILD_NUMBER}' -a -o release/linux/arm64/gorush"
environment:
CGO_ENABLED: 0
GO111MODULE: on
when:
event:
exclude:
- tag
- name: build-tag
pull: always
image: golang:1.12
commands:
- "go build -v -ldflags '-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}' -a -o release/linux/arm64/gorush"
environment:
CGO_ENABLED: 0
GO111MODULE: on
when:
event:
- tag
- name: executable
pull: always
image: golang:1.12
commands:
- ./release/linux/arm64/gorush --help
- name: dryrun
pull: always
image: plugins/docker:linux-arm64
settings:
cache_from: appleboy/gorush
dockerfile: docker/Dockerfile.linux.arm64
dry_run: true
repo: appleboy/gorush
tags: linux-arm64
when:
event:
- pull_request
- name: publish
pull: always
image: plugins/docker:linux-arm64
settings:
auto_tag: true
auto_tag_suffix: linux-arm64
cache_from: appleboy/gorush
daemon_off: false
dockerfile: docker/Dockerfile.linux.arm64
password:
from_secret: docker_password
repo: appleboy/gorush
username:
from_secret: docker_username
when:
event:
exclude:
- pull_request
trigger:
ref:
- refs/heads/master
- "refs/pull/**"
- "refs/tags/**"
depends_on:
- testing
---
kind: pipeline
name: linux-arm
platform:
os: linux
arch: arm
steps:
- name: build-push
pull: always
image: golang:1.12
commands:
- "go build -v -ldflags '-X main.build=${DRONE_BUILD_NUMBER}' -a -o release/linux/arm/gorush"
environment:
CGO_ENABLED: 0
GO111MODULE: on
when:
event:
exclude:
- tag
- name: build-tag
pull: always
image: golang:1.12
commands:
- "go build -v -ldflags '-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}' -a -o release/linux/arm/gorush"
environment:
CGO_ENABLED: 0
GO111MODULE: on
when:
event:
- tag
- name: executable
pull: always
image: golang:1.12
commands:
- ./release/linux/arm/gorush --help
- name: dryrun
pull: always
image: plugins/docker:linux-arm
settings:
cache_from: appleboy/gorush
dockerfile: docker/Dockerfile.linux.arm
dry_run: true
repo: appleboy/gorush
tags: linux-arm
when:
event:
- pull_request
- name: publish
pull: always
image: plugins/docker:linux-arm
settings:
auto_tag: true
auto_tag_suffix: linux-arm
cache_from: appleboy/gorush
daemon_off: false
dockerfile: docker/Dockerfile.linux.arm
password:
from_secret: docker_password
repo: appleboy/gorush
username:
from_secret: docker_username
when:
event:
exclude:
- pull_request
trigger:
ref:
- refs/heads/master
- "refs/pull/**"
- "refs/tags/**"
depends_on:
- testing
---
kind: pipeline
name: release-binary
platform:
os: linux
arch: amd64
steps:
- name: build-all-binary
pull: always
image: golang:1.12
commands:
- make release
environment:
GO111MODULE: on
when:
event:
- tag
- name: deploy-all-binary
pull: always
image: plugins/github-release
settings:
api_key:
from_secret: github_release_api_key
files:
- "dist/release/*"
when:
event:
- tag
trigger:
ref:
- "refs/tags/**"
depends_on:
- testing
---
kind: pipeline
name: notifications
platform:
os: linux
arch: amd64
steps:
- name: manifest
pull: always
image: plugins/manifest
settings:
ignore_missing: true
password:
from_secret: docker_password
spec: docker/manifest.tmpl
username:
from_secret: docker_username
- name: microbadger
pull: always
image: plugins/webhook:1
settings:
url:
from_secret: microbadger_url
trigger:
ref:
- refs/heads/master
- "refs/tags/**"
depends_on:
- linux-amd64
- linux-arm64
- linux-arm
- release-binary
...

2
.gitignore vendored
View File

@ -34,4 +34,4 @@ coverage.txt
dist dist
custom custom
release release
coverage.out coverage.txt

25
.revive.toml Normal file
View File

@ -0,0 +1,25 @@
ignoreGeneratedHeader = false
severity = "warning"
confidence = 0.8
errorCode = 1
warningCode = 1
[rule.blank-imports]
[rule.context-as-argument]
[rule.context-keys-type]
[rule.dot-imports]
[rule.error-return]
[rule.error-strings]
[rule.error-naming]
[rule.exported]
[rule.if-return]
[rule.increment-decrement]
[rule.var-naming]
[rule.var-declaration]
[rule.package-comments]
[rule.range]
[rule.receiver-naming]
[rule.time-naming]
[rule.unexported-return]
[rule.indent-error-flow]
[rule.errorf]

View File

@ -1,17 +0,0 @@
FROM plugins/base:multiarch
LABEL org.label-schema.version=latest
LABEL org.label-schema.vcs-url="https://github.com/appleboy/gorush.git"
LABEL org.label-schema.name="Gorush"
LABEL org.label-schema.vendor="Bo-Yi Wu"
LABEL org.label-schema.schema-version="1.0"
LABEL maintainer="Bo-Yi Wu <appleboy.tw@gmail.com>"
ADD release/linux/amd64/gorush /bin/
EXPOSE 8088 9000
HEALTHCHECK --start-period=2s --interval=10s --timeout=5s \
CMD ["/bin/gorush", "--ping"]
ENTRYPOINT ["/bin/gorush"]

View File

@ -1,19 +0,0 @@
FROM alpine:3.7
LABEL org.label-schema.version=latest
LABEL org.label-schema.vcs-url="https://github.com/appleboy/gorush.git"
LABEL org.label-schema.name="Gorush"
LABEL org.label-schema.vendor="Bo-Yi Wu"
LABEL org.label-schema.schema-version="1.0"
LABEL maintainer="Bo-Yi Wu <appleboy.tw@gmail.com>"
RUN apk add --no-cache ca-certificates && \
rm -rf /var/cache/apk/*
ADD release/linux/amd64/gorush /bin/
EXPOSE 8088 9000
HEALTHCHECK --start-period=2s --interval=10s --timeout=5s \
CMD ["/bin/gorush", "--ping"]
ENTRYPOINT ["/bin/gorush"]

View File

@ -1,16 +0,0 @@
FROM plugins/base:multiarch
LABEL org.label-schema.version=latest
LABEL org.label-schema.vcs-url="https://github.com/appleboy/gorush.git"
LABEL org.label-schema.name="Gorush"
LABEL org.label-schema.vendor="Bo-Yi Wu"
LABEL org.label-schema.schema-version="1.0"
LABEL maintainer="Bo-Yi Wu <appleboy.tw@gmail.com>"
ADD release/linux/arm/gorush /bin/
EXPOSE 8088 9000
HEALTHCHECK --start-period=2s --interval=10s --timeout=5s \
CMD ["/bin/gorush", "--ping"]
ENTRYPOINT ["/bin/gorush"]

View File

@ -1,16 +0,0 @@
FROM plugins/base:multiarch
LABEL org.label-schema.version=latest
LABEL org.label-schema.vcs-url="https://github.com/appleboy/gorush.git"
LABEL org.label-schema.name="Gorush"
LABEL org.label-schema.vendor="Bo-Yi Wu"
LABEL org.label-schema.schema-version="1.0"
LABEL maintainer="Bo-Yi Wu <appleboy.tw@gmail.com>"
ADD release/linux/arm64/gorush /bin/
EXPOSE 8088 9000
HEALTHCHECK --start-period=2s --interval=10s --timeout=5s \
CMD ["/bin/gorush", "--ping"]
ENTRYPOINT ["/bin/gorush"]

View File

@ -1,16 +0,0 @@
FROM plugins/base:multiarch
LABEL org.label-schema.version=latest
LABEL org.label-schema.vcs-url="https://github.com/appleboy/gorush.git"
LABEL org.label-schema.name="Gorush"
LABEL org.label-schema.vendor="Bo-Yi Wu"
LABEL org.label-schema.schema-version="1.0"
LABEL maintainer="Bo-Yi Wu <appleboy.tw@gmail.com>"
ADD release/linux/i386/gorush /bin/
EXPOSE 8088 9000
HEALTHCHECK --start-period=2s --interval=10s --timeout=5s \
CMD ["/bin/gorush", "--ping"]
ENTRYPOINT ["/bin/gorush"]

114
Makefile
View File

@ -8,16 +8,12 @@ GOFMT ?= gofmt "-s"
TARGETS ?= linux darwin windows openbsd TARGETS ?= linux darwin windows openbsd
ARCHS ?= amd64 386 ARCHS ?= amd64 386
PACKAGES ?= $(shell $(GO) list ./... | grep -v /vendor/) PACKAGES ?= $(shell $(GO) list ./...)
GOFILES := $(shell find . -name "*.go" -type f -not -path "./vendor/*") GOFILES := $(shell find . -name "*.go" -type f)
SOURCES ?= $(shell find . -name "*.go" -type f) TAGS ?= sqlite
TAGS ?=
LDFLAGS ?= -X 'main.Version=$(VERSION)' LDFLAGS ?= -X 'main.Version=$(VERSION)'
TMPDIR := $(shell mktemp -d 2>/dev/null || mktemp -d -t 'tempdir') TMPDIR := $(shell mktemp -d 2>/dev/null || mktemp -d -t 'tempdir')
NODE_PROTOC_PLUGIN := $(shell which grpc_tools_node_protoc_plugin) NODE_PROTOC_PLUGIN := $(shell which grpc_tools_node_protoc_plugin)
GOVENDOR := $(GOPATH)/bin/govendor
GOX := $(GOPATH)/bin/gox
MISSPELL := $(GOPATH)/bin/misspell
ifneq ($(shell uname), Darwin) ifneq ($(shell uname), Darwin)
EXTLDFLAGS = -extldflags "-static" $(null) EXTLDFLAGS = -extldflags "-static" $(null)
@ -45,15 +41,10 @@ ifeq ($(ANDROID_TEST_TOKEN),)
endif endif
@echo "Already set ANDROID_API_KEY and ANDROID_TEST_TOKEN globale variable." @echo "Already set ANDROID_API_KEY and ANDROID_TEST_TOKEN globale variable."
$(GOVENDOR):
$(GO) get -u github.com/kardianos/govendor
$(GOX):
$(GO) get -u github.com/mitchellh/gox
$(MISSPELL): $(MISSPELL):
$(GO) get -u github.com/client9/misspell/cmd/misspell $(GO) get -u github.com/client9/misspell/cmd/misspell
.PHONY: fmt
fmt: fmt:
$(GOFMT) -w $(GOFILES) $(GOFMT) -w $(GOFILES)
@ -69,35 +60,20 @@ fmt-check:
vet: vet:
$(GO) vet $(PACKAGES) $(GO) vet $(PACKAGES)
module:
$(GO) mod download
deps:
$(GO) get github.com/campoy/embedmd
embedmd: embedmd:
@hash embedmd > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
$(GO) get -u github.com/campoy/embedmd; \
fi
embedmd -d *.md embedmd -d *.md
errcheck:
@hash errcheck > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
$(GO) get -u github.com/kisielk/errcheck; \
fi
errcheck $(PACKAGES)
lint: lint:
@hash golint > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ @hash revive > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
$(GO) get -u golang.org/x/lint/golint; \ $(GO) get -u github.com/mgechev/revive; \
fi fi
for PKG in $(PACKAGES); do golint -set_exit_status $$PKG || exit 1; done; revive -config .revive.toml ./... || exit 1
unconvert:
@hash unconvert > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
$(GO) get -u github.com/mdempsky/unconvert; \
fi
for PKG in $(PACKAGES); do unconvert -v $$PKG || exit 1; done;
.PHONY: install .PHONY: install
install: $(SOURCES) install: $(GOFILES)
$(GO) install -v -tags '$(TAGS)' -ldflags '$(EXTLDFLAGS)-s -w $(LDFLAGS)' $(GO) install -v -tags '$(TAGS)' -ldflags '$(EXTLDFLAGS)-s -w $(LDFLAGS)'
@echo "==> Installed gorush ${GOPATH}/bin/gorush" @echo "==> Installed gorush ${GOPATH}/bin/gorush"
@ -105,69 +81,37 @@ install: $(SOURCES)
build: $(EXECUTABLE) build: $(EXECUTABLE)
.PHONY: $(EXECUTABLE) .PHONY: $(EXECUTABLE)
$(EXECUTABLE): $(SOURCES) $(EXECUTABLE): $(GOFILES)
$(GO) build -v -tags '$(TAGS)' -ldflags '$(EXTLDFLAGS)-s -w $(LDFLAGS)' -o release/$@ $(GO) build -v -tags '$(TAGS)' -ldflags '$(EXTLDFLAGS)-s -w $(LDFLAGS)' -o release/$@
.PHONY: misspell-check .PHONY: misspell-check
misspell-check: $(MISSPELL) misspell-check:
$(MISSPELL) -error $(GOFILES) @hash misspell > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
$(GO) get -u github.com/client9/misspell/cmd/misspell; \
fi
misspell -error $(GOFILES)
.PHONY: misspell .PHONY: misspell
misspell: $(MISSPELL) misspell:
$(MISSPELL) -w $(GOFILES) @hash misspell > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
$(GO) get -u github.com/client9/misspell/cmd/misspell; \
.PHONY: coverage
coverage:
@hash gocovmerge > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
$(GO) get -u github.com/wadey/gocovmerge; \
fi fi
gocovmerge $(shell find . -type f -name "coverage.out") > coverage.all;\ misspell -w $(GOFILES)
.PHONY: unit-test-coverage .PHONY: test
unit-test-coverage: init test: init fmt-check
for PKG in $(PACKAGES); do $(GO) test -cover -coverprofile $$GOPATH/src/$$PKG/coverage.out $$PKG || exit 1; done; @$(GO) test -v -cover -tags $(TAGS) -coverprofile coverage.txt $(PACKAGES) && echo "\n==>\033[32m Ok\033[m\n" || exit 1
test: init
for PKG in $(PACKAGES); do $(GO) test -v $$PKG || exit 1; done;
.PHONY: test-vendor
test-vendor: $(GOVENDOR)
$(GOVENDOR) list +unused | tee "$(TMPDIR)/wc-gitea-unused"
[ $$(cat "$(TMPDIR)/wc-gitea-unused" | wc -l) -eq 0 ] || echo "Warning: /!\\ Some vendor are not used /!\\"
$(GOVENDOR) list +outside | tee "$(TMPDIR)/wc-gitea-outside"
[ $$(cat "$(TMPDIR)/wc-gitea-outside" | wc -l) -eq 0 ] || exit 1
$(GOVENDOR) status || exit 1
redis_test: init
$(GO) test -v -cover ./storage/redis/...
boltdb_test: init
$(GO) test -v -cover ./storage/boltdb/...
memory_test: init
$(GO) test -v -cover ./storage/memory/...
buntdb_test: init
$(GO) test -v -cover ./storage/buntdb/...
leveldb_test: init
$(GO) test -v -cover ./storage/leveldb/...
config_test: init
$(GO) test -v -cover ./config/...
html:
$(GO) tool cover -html=.cover/coverage.txt
release: release-dirs release-build release-copy release-check release: release-dirs release-build release-copy release-check
release-dirs: release-dirs:
mkdir -p $(DIST)/binaries $(DIST)/release mkdir -p $(DIST)/binaries $(DIST)/release
release-build: $(GOX) release-build:
$(GOX) -os="$(TARGETS)" -arch="$(ARCHS)" -tags="$(TAGS)" -ldflags="$(EXTLDFLAGS)-s -w $(LDFLAGS)" -output="$(DIST)/binaries/$(EXECUTABLE)-$(VERSION)-{{.OS}}-{{.Arch}}" @hash gox > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
$(GO) get -u github.com/mitchellh/gox; \
fi
gox -os="$(TARGETS)" -arch="$(ARCHS)" -tags="$(TAGS)" -ldflags="$(EXTLDFLAGS)-s -w $(LDFLAGS)" -output="$(DIST)/binaries/$(EXECUTABLE)-$(VERSION)-{{.OS}}-{{.Arch}}"
release-copy: release-copy:
$(foreach file,$(wildcard $(DIST)/binaries/$(EXECUTABLE)-*),cp $(file) $(DIST)/release/$(notdir $(file));) $(foreach file,$(wildcard $(DIST)/binaries/$(EXECUTABLE)-*),cp $(file) $(DIST)/release/$(notdir $(file));)

View File

@ -3,7 +3,7 @@
A push notification micro server using [Gin](https://github.com/gin-gonic/gin) framework written in Go (Golang). A push notification micro server using [Gin](https://github.com/gin-gonic/gin) framework written in Go (Golang).
[![GoDoc](https://godoc.org/github.com/appleboy/gorush?status.svg)](https://godoc.org/github.com/appleboy/gorush) [![GoDoc](https://godoc.org/github.com/appleboy/gorush?status.svg)](https://godoc.org/github.com/appleboy/gorush)
[![Build Status](http://drone.wu-boy.com/api/badges/appleboy/gorush/status.svg)](http://drone.wu-boy.com/appleboy/gorush) [![Build Status](https://cloud.drone.io/api/badges/appleboy/gorush/status.svg)](https://cloud.drone.io/appleboy/gorush)
[![Build status](https://ci.appveyor.com/api/projects/status/ka4hvplssp1q2s5u?svg=true)](https://ci.appveyor.com/project/appleboy/gorush-fp5dh) [![Build status](https://ci.appveyor.com/api/projects/status/ka4hvplssp1q2s5u?svg=true)](https://ci.appveyor.com/project/appleboy/gorush-fp5dh)
[![codecov](https://codecov.io/gh/appleboy/gorush/branch/master/graph/badge.svg)](https://codecov.io/gh/appleboy/gorush) [![codecov](https://codecov.io/gh/appleboy/gorush/branch/master/graph/badge.svg)](https://codecov.io/gh/appleboy/gorush)
[![Go Report Card](https://goreportcard.com/badge/github.com/appleboy/gorush)](https://goreportcard.com/report/github.com/appleboy/gorush) [![Go Report Card](https://goreportcard.com/badge/github.com/appleboy/gorush)](https://goreportcard.com/report/github.com/appleboy/gorush)
@ -16,33 +16,46 @@ A push notification micro server using [Gin](https://github.com/gin-gonic/gin) f
## Contents ## Contents
- [Support Platform](#support-platform) - [gorush](#gorush)
- [Features](#features) - [Contents](#contents)
- [Memory Usage](#memory-usage) - [Support Platform](#support-platform)
- [Basic Usage](#basic-usage) - [Features](#features)
- [Download a binary](#download-a-binary) - [Memory Usage](#memory-usage)
- [Install from source](#install-from-source) - [Basic Usage](#basic-usage)
- [Command Usage](#command-usage) - [Download a binary](#download-a-binary)
- [Send Android notification](#send-android-notification) - [Install from source](#install-from-source)
- [Send iOS notification](#send-ios-notification) - [Prerequisite Tools](#prerequisite-tools)
- [Send Android or iOS notifications using Firebase](#send-android-or-ios-notifications-using-firebase) - [Fetch from GitHub](#fetch-from-github)
- [Run gorush web server](#run-gorush-web-server) - [Command Usage](#command-usage)
- [Web API](#web-api) - [Send Android notification](#send-android-notification)
- [GET /api/stat/go](#get-apistatgo) - [Send iOS notification](#send-ios-notification)
- [GET /api/stat/app](#get-apistatapp) - [Send Android or iOS notifications using Firebase](#send-android-or-ios-notifications-using-firebase)
- [GET /sys/stats](#get-sysstats) - [Run gorush web server](#run-gorush-web-server)
- [POST /api/push](#post-apipush) - [Web API](#web-api)
- [Request body](#request-body) - [GET /api/stat/go](#get-apistatgo)
- [iOS alert payload](#ios-alert-payload) - [GET /api/stat/app](#get-apistatapp)
- [Android notification payload](#android-notification-payload) - [GET /sys/stats](#get-sysstats)
- [iOS Example](#ios-example) - [GET /metrics](#get-metrics)
- [Android Example](#android-example) - [POST /api/push](#post-apipush)
- [Response body](#response-body) - [Request body](#request-body)
- [Run gRPC service](#run-grpc-service) - [iOS alert payload](#ios-alert-payload)
- [Run gorush in Docker](#run-gorush-in-docker) - [iOS sound payload](#ios-sound-payload)
- [Run gorush in Kubernetes](#run-gorush-in-kubernetes) - [Android notification payload](#android-notification-payload)
- [Run gorush in AWS Lambda](#run-gorush-in-aws-lambda) - [iOS Example](#ios-example)
- [License](#license) - [Android Example](#android-example)
- [Response body](#response-body)
- [Run gRPC service](#run-grpc-service)
- [Run gorush in Docker](#run-gorush-in-docker)
- [Run gorush in Kubernetes](#run-gorush-in-kubernetes)
- [Quick Start](#quick-start)
- [Create the Service Controller for AWS ELB](#create-the-service-controller-for-aws-elb)
- [Ingress Controller for AWS ALB](#ingress-controller-for-aws-alb)
- [Clean up the gorush:](#clean-up-the-gorush)
- [Run gorush in AWS Lambda](#run-gorush-in-aws-lambda)
- [Build gorush binary](#build-gorush-binary)
- [Deploy gorush application](#deploy-gorush-application)
- [Stargazers over time](#stargazers-over-time)
- [License](#license)
<a href="https://www.buymeacoffee.com/appleboy" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a> <a href="https://www.buymeacoffee.com/appleboy" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>

View File

@ -203,11 +203,6 @@ func TestLoadConfigFromEnv(t *testing.T) {
assert.Equal(t, "/healthz", ConfGorush.API.HealthURI) assert.Equal(t, "/healthz", ConfGorush.API.HealthURI)
} }
func TestLoadWrongYAMLConfig(t *testing.T) {
_, err := LoadConf("testdata/wrong.yml")
assert.Error(t, err)
}
func TestLoadWrongDefaultYAMLConfig(t *testing.T) { func TestLoadWrongDefaultYAMLConfig(t *testing.T) {
defaultConf = []byte(`a`) defaultConf = []byte(`a`)
_, err := LoadConf("") _, err := LoadConf("")

View File

@ -1,76 +0,0 @@
# wrong format
#core:
core:
enabled: true # enabale httpd server
address: "" # ip address to bind (default: any)
port: "8088" # ignore this port number if auto_tls is enabled (listen 443).
worker_num: 0 # default worker number is runtime.NumCPU()
queue_num: 0 # default queue number is 8192
max_notification: 100
sync: false # set true if you need get error message from fail push notification in API response.
mode: "release"
ssl: false
cert_path: "cert.pem"
key_path: "key.pem"
cert_base64: ""
key_base64: ""
http_proxy: "" # only working for FCM server
pid:
enabled: false
path: "gorush.pid"
override: true
auto_tls:
enabled: false # Automatically install TLS certificates from Let's Encrypt.
folder: ".cache" # folder for storing TLS certificates
host: "" # which domains the Let's Encrypt will attempt
grpc:
enabled: false # enabale gRPC server
port: 9000
api:
push_uri: "/api/push"
stat_go_uri: "/api/stat/go"
stat_app_uri: "/api/stat/app"
config_uri: "/api/config"
sys_stat_uri: "/sys/stats"
metric_uri: "/metrics"
health_uri: "/healthz"
android:
enabled: true
apikey: "YOUR_API_KEY"
max_retry: 0 # resend fail notification, default value zero is disabled
ios:
enabled: false
key_path: "key.pem"
key_base64: "" # load iOS key from base64 input
key_type: "pem" # could be pem, p12 or p8 type
password: "" # certificate password, default as empty string.
production: false
max_retry: 0 # resend fail notification, default value zero is disabled
key_id: "" # KeyID from developer account (Certificates, Identifiers & Profiles -> Keys)
team_id: "" # TeamID from developer account (View Account -> Membership)
log:
format: "string" # string or json
access_log: "stdout" # stdout: output to console, or define log path like "log/access_log"
access_level: "debug"
error_log: "stderr" # stderr: output to console, or define log path like "log/error_log"
error_level: "error"
hide_token: true
stat:
engine: "memory" # support memory, redis, boltdb, buntdb or leveldb
redis:
addr: "localhost:6379"
password: ""
db: 0
boltdb:
path: "bolt.db"
bucket: "gorush"
buntdb:
path: "bunt.db"
leveldb:
path: "level.db"

View File

@ -0,0 +1,14 @@
FROM plugins/base:linux-amd64
LABEL maintainer="Bo-Yi Wu <appleboy.tw@gmail.com>" \
org.label-schema.name="Gorush" \
org.label-schema.vendor="Bo-Yi Wu" \
org.label-schema.schema-version="1.0"
COPY release/linux/amd64/gorush /bin/
EXPOSE 8088 9000
HEALTHCHECK --start-period=2s --interval=10s --timeout=5s \
CMD ["/bin/gorush", "--ping"]
ENTRYPOINT ["/bin/gorush"]

View File

@ -0,0 +1,14 @@
FROM plugins/base:linux-arm
LABEL maintainer="Bo-Yi Wu <appleboy.tw@gmail.com>" \
org.label-schema.name="Gorush" \
org.label-schema.vendor="Bo-Yi Wu" \
org.label-schema.schema-version="1.0"
COPY release/linux/arm/gorush /bin/
EXPOSE 8088 9000
HEALTHCHECK --start-period=2s --interval=10s --timeout=5s \
CMD ["/bin/gorush", "--ping"]
ENTRYPOINT ["/bin/gorush"]

View File

@ -0,0 +1,14 @@
FROM plugins/base:linux-arm64
LABEL maintainer="Bo-Yi Wu <appleboy.tw@gmail.com>" \
org.label-schema.name="Gorush" \
org.label-schema.vendor="Bo-Yi Wu" \
org.label-schema.schema-version="1.0"
COPY release/linux/arm64/gorush /bin/
EXPOSE 8088 9000
HEALTHCHECK --start-period=2s --interval=10s --timeout=5s \
CMD ["/bin/gorush", "--ping"]
ENTRYPOINT ["/bin/gorush"]

View File

@ -1,11 +1,13 @@
FROM microsoft/nanoserver:10.0.14393.1884 FROM plugins/base:windows-amd64
LABEL maintainer="Bo-Yi Wu <appleboy.tw@gmail.com>" \ LABEL maintainer="Bo-Yi Wu <appleboy.tw@gmail.com>" \
org.label-schema.name="Gorush" \ org.label-schema.name="Gorush" \
org.label-schema.vendor="Bo-Yi Wu" \ org.label-schema.vendor="Bo-Yi Wu" \
org.label-schema.schema-version="1.0" org.label-schema.schema-version="1.0"
ADD release/gorush.exe /gorush.exe COPY release/gorush.exe /gorush.exe
EXPOSE 8088 9000
HEALTHCHECK --start-period=2s --interval=10s --timeout=5s \ HEALTHCHECK --start-period=2s --interval=10s --timeout=5s \
CMD ["\\gorush.exe", "--ping"] CMD ["\\gorush.exe", "--ping"]

25
docker/manifest.tmpl Normal file
View File

@ -0,0 +1,25 @@
image: appleboy/gorush:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
{{#if build.tags}}
tags:
{{#each build.tags}}
- {{this}}
{{/each}}
{{/if}}
manifests:
-
image: appleboy/gorush:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
platform:
architecture: amd64
os: linux
-
image: appleboy/gorush:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
platform:
architecture: arm64
os: linux
variant: v8
-
image: appleboy/gorush:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
platform:
architecture: arm
os: linux
variant: v7

97
go.mod
View File

@ -1,70 +1,85 @@
module github.com/appleboy/gorush module github.com/appleboy/gorush
go 1.12
require ( require (
github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9 // indirect github.com/AndreasBriese/bbloom v0.0.0-20170702084017-28f7e881ca57 // indirect
github.com/BurntSushi/toml v0.3.1 // indirect
github.com/DataDog/zstd v1.3.5 // indirect github.com/DataDog/zstd v1.3.5 // indirect
github.com/Sereal/Sereal v0.0.0-20190203221631-e99c7e10fca4 // indirect github.com/Sereal/Sereal v0.0.0-20190203221631-e99c7e10fca4 // indirect
github.com/apex/gateway v1.1.1 github.com/apex/gateway v0.0.0-20180121231047-e9c6ccec8851
github.com/appleboy/com v0.0.1 github.com/appleboy/com v0.0.0-20180410030638-c0b5901f9622
github.com/appleboy/go-fcm v0.0.0-20190214153823-cfd5eac22a0f github.com/appleboy/go-fcm v0.0.0-20180823141355-c8cd26f2c452
github.com/appleboy/gofight v2.0.0+incompatible // indirect github.com/appleboy/gofight v2.0.0+incompatible // indirect
github.com/asdine/storm v2.1.2+incompatible github.com/asdine/storm v0.0.0-20170209191653-de95a2ead13a
github.com/aws/aws-lambda-go v1.9.0 // indirect github.com/aws/aws-lambda-go v0.0.0-20180121103608-6736675908bd // indirect
github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23 github.com/boltdb/bolt v0.0.0-20170131192018-e9cf4fae01b5 // indirect
github.com/dgraph-io/badger v1.5.4 github.com/buger/jsonparser v0.0.0-20170215081816-6bd16707875b
github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect github.com/davecgh/go-spew v1.1.0 // indirect
github.com/dgryski/go-farm v0.0.0-20190104051053-3adb47b1fb0f // indirect github.com/dgraph-io/badger v0.0.0-20180406055407-deb140b63781
github.com/dgrijalva/jwt-go v3.1.0+incompatible // indirect
github.com/dgryski/go-farm v0.0.0-20180109070241-2de33835d102 // indirect
github.com/emirpasic/gods v0.0.0-20170204130913-fc3e4a43ff31 // indirect
github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a // indirect github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a // indirect
github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 // indirect github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 // indirect
github.com/facebookgo/freeport v0.0.0-20150612182905-d4adf43b75b9 // indirect github.com/facebookgo/freeport v0.0.0-20150612182905-d4adf43b75b9 // indirect
github.com/facebookgo/grace v0.0.0-20180706040059-75cf19382434 github.com/facebookgo/grace v0.0.0-20170218225239-4afe952a37a4
github.com/facebookgo/httpdown v0.0.0-20180706035922-5979d39b15c2 // indirect github.com/facebookgo/httpdown v0.0.0-20160323221027-a3b1354551a2 // indirect
github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 // indirect github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 // indirect
github.com/facebookgo/stats v0.0.0-20151006221625-1b76add642e4 // indirect github.com/facebookgo/stats v0.0.0-20151006221625-1b76add642e4 // indirect
github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870 // indirect github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870 // indirect
github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3 // indirect github.com/gin-contrib/sse v0.0.0-20170109093832-22d885f9ecc7 // indirect
github.com/gin-gonic/gin v1.3.0 github.com/gin-gonic/gin v0.0.0-20170929084810-b8b68314faa0
github.com/gogo/protobuf v1.2.1 github.com/gogo/protobuf v1.1.1
github.com/json-iterator/go v1.1.6 // indirect github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect
github.com/golang/snappy v0.0.0-20170215233205-553a64147049 // indirect
github.com/hashicorp/hcl v0.0.0-20171017181929-23c074d0eceb // indirect
github.com/json-iterator/go v0.0.0-20170713110145-8b0360418449 // indirect
github.com/kr/pretty v0.1.0 // indirect
github.com/labstack/echo v3.3.10+incompatible // indirect github.com/labstack/echo v3.3.10+incompatible // indirect
github.com/labstack/gommon v0.2.8 // indirect github.com/labstack/gommon v0.2.8 // indirect
github.com/magiconair/properties v0.0.0-20170902060319-8d7837e64d3c // indirect
github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe // indirect
github.com/mattn/go-colorable v0.1.1 // indirect github.com/mattn/go-colorable v0.1.1 // indirect
github.com/mattn/go-isatty v0.0.7 github.com/mattn/go-isatty v0.0.5
github.com/mitchellh/mapstructure v1.1.2 github.com/mitchellh/mapstructure v1.1.2
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/onsi/ginkgo v1.8.0 // indirect
github.com/modern-go/reflect2 v1.0.1 // indirect github.com/onsi/gomega v1.5.0 // indirect
github.com/pkg/errors v0.8.1 // indirect github.com/pelletier/go-toml v0.0.0-20171022022338-8c31c2ec65b2 // indirect
github.com/pkg/errors v0.0.0-20171216070316-e881fd58d78e // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/pquerna/ffjson v0.0.0-20181028064349-e517b90714f7 // indirect
github.com/prometheus/client_golang v0.9.2 github.com/prometheus/client_golang v0.9.2
github.com/sideshow/apns2 v0.0.0-20181014012405-060d44b53d05 github.com/sideshow/apns2 v0.0.0-20181014012405-060d44b53d05
github.com/sirupsen/logrus v1.4.0 github.com/sirupsen/logrus v0.0.0-20170620144510-3d4380f53a34
github.com/spf13/viper v1.3.2 github.com/spf13/afero v0.0.0-20171021110813-5660eeed305f // indirect
github.com/stretchr/testify v1.3.0 github.com/spf13/cast v1.1.0 // indirect
github.com/syndtr/goleveldb v1.0.0 github.com/spf13/jwalterweatherman v0.0.0-20170901151539-12bd96e66386 // indirect
github.com/spf13/pflag v0.0.0-20171020110617-97afa5e7ca8a // indirect
github.com/spf13/viper v0.0.0-20171020104009-8ef37cbca716
github.com/stretchr/testify v0.0.0-20170130113145-4d4bfba8f1d1
github.com/syndtr/goleveldb v0.0.0-20161227110519-23851d93a229
github.com/thoas/stats v0.0.0-20181218120333-e97827ebd7ca github.com/thoas/stats v0.0.0-20181218120333-e97827ebd7ca
github.com/tidwall/btree v0.0.0-20170113224114-9876f1454cf0 // indirect github.com/tidwall/btree v0.0.0-20170113224114-9876f1454cf0 // indirect
github.com/tidwall/buntdb v1.1.0 github.com/tidwall/buntdb v0.0.0-20161202163738-74dc10171b75
github.com/tidwall/gjson v1.2.1 // indirect github.com/tidwall/gjson v0.0.0-20170205161042-09d1c5c5bc64 // indirect
github.com/tidwall/grect v0.0.0-20161006141115-ba9a043346eb // indirect github.com/tidwall/grect v0.0.0-20161006141115-ba9a043346eb // indirect
github.com/tidwall/match v1.0.1 // indirect github.com/tidwall/match v0.0.0-20160830173930-173748da739a // indirect
github.com/tidwall/pretty v0.0.0-20180105212114-65a9db5fad51 // indirect github.com/tidwall/rtree v0.0.0-20160903213729-d4a8a3d30d57 // indirect
github.com/tidwall/rtree v0.0.0-20180113144539-6cd427091e0e // indirect github.com/ugorji/go v0.0.0-20170312112114-708a42d24682 // indirect
github.com/tidwall/tinyqueue v0.0.0-20180302190814-1e39f5511563 // indirect
github.com/tj/assert v0.0.0-20171129193455-018094318fb0 // indirect
github.com/valyala/fasttemplate v1.0.1 // indirect github.com/valyala/fasttemplate v1.0.1 // indirect
github.com/vmihailenco/msgpack v4.0.2+incompatible // indirect golang.org/x/crypto v0.0.0-20170404161947-c78caca803c9
go.etcd.io/bbolt v1.3.2 // indirect golang.org/x/net v0.0.0-20181201002055-351d144fa1fc
golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a golang.org/x/sync v0.0.0-20181108010431-42b317875d0f
golang.org/x/net v0.0.0-20190313220215-9f648a60d977 google.golang.org/appengine v1.4.0 // indirect
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6 google.golang.org/genproto v0.0.0-20170711235230-b0a3dcfcd1a9 // indirect
google.golang.org/grpc v1.19.0 google.golang.org/grpc v0.0.0-20171109215322-de2209a968d4
gopkg.in/appleboy/gin-status-api.v1 v1.0.1 gopkg.in/appleboy/gin-status-api.v1 v1.0.1
gopkg.in/appleboy/gofight.v1 v1.0.4 // indirect gopkg.in/appleboy/gofight.v1 v1.0.4 // indirect
gopkg.in/appleboy/gofight.v2 v2.0.0 gopkg.in/appleboy/gofight.v2 v2.0.0
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
gopkg.in/fukata/golang-stats-api-handler.v1 v1.0.0 // indirect gopkg.in/fukata/golang-stats-api-handler.v1 v1.0.0 // indirect
gopkg.in/gin-gonic/gin.v1 v1.3.0 // indirect gopkg.in/gin-gonic/gin.v1 v1.3.0 // indirect
gopkg.in/go-playground/assert.v1 v1.2.1 // indirect gopkg.in/go-playground/assert.v1 v1.2.1 // indirect
gopkg.in/go-playground/validator.v8 v8.18.2 // indirect gopkg.in/go-playground/validator.v8 v8.18.1 // indirect
gopkg.in/redis.v5 v5.2.9 gopkg.in/redis.v5 v5.2.4
gopkg.in/vmihailenco/msgpack.v2 v2.9.1 // indirect
) )

247
go.sum
View File

@ -1,52 +1,49 @@
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/AndreasBriese/bbloom v0.0.0-20170702084017-28f7e881ca57 h1:CVuXDbdzPW0XCNYTldy5dQues57geAs+vfwz3FTTpy8=
github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9 h1:HD8gA2tkByhMAwYaFAX9w2l7vxvBQ5NMoxDrkhqhtn4= github.com/AndreasBriese/bbloom v0.0.0-20170702084017-28f7e881ca57/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8=
github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8=
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/DataDog/zstd v1.3.5 h1:DtpNbljikUepEPD16hD4LvIcmhnhdLTiW/5pHgbmp14= github.com/DataDog/zstd v1.3.5 h1:DtpNbljikUepEPD16hD4LvIcmhnhdLTiW/5pHgbmp14=
github.com/DataDog/zstd v1.3.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/DataDog/zstd v1.3.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo=
github.com/Sereal/Sereal v0.0.0-20190203221631-e99c7e10fca4 h1:6Tu8RZRaWkHeTPk6TCcGt7uTdjBWne5J5xvL2b7S7Vw= github.com/Sereal/Sereal v0.0.0-20190203221631-e99c7e10fca4 h1:6Tu8RZRaWkHeTPk6TCcGt7uTdjBWne5J5xvL2b7S7Vw=
github.com/Sereal/Sereal v0.0.0-20190203221631-e99c7e10fca4/go.mod h1:D0JMgToj/WdxCgd30Kc1UcA9E+WdZoJqeVOuYW7iTBM= github.com/Sereal/Sereal v0.0.0-20190203221631-e99c7e10fca4/go.mod h1:D0JMgToj/WdxCgd30Kc1UcA9E+WdZoJqeVOuYW7iTBM=
github.com/apex/gateway v1.1.1 h1:dPE3y2LQ/fSJuZikCOvekqXLyn/Wrbgt10MSECobH/Q= github.com/apex/gateway v0.0.0-20180121231047-e9c6ccec8851 h1:u3W9c2pDjqbL6V91atkRL/B+IJMBAzaf+tJKAserLgM=
github.com/apex/gateway v1.1.1/go.mod h1:x7iPY22zu9D8sfrynawEwh1wZEO/kQTRaOM5ye02tWU= github.com/apex/gateway v0.0.0-20180121231047-e9c6ccec8851/go.mod h1:x7iPY22zu9D8sfrynawEwh1wZEO/kQTRaOM5ye02tWU=
github.com/appleboy/com v0.0.1 h1:SeP6J/YlZGWRwH7jdPYXXWA+qJy4GoQfcQFPda0ERYU= github.com/appleboy/com v0.0.0-20180410030638-c0b5901f9622 h1:ozHD8HTq7ivv8vTJRCAzjA4wEA8BMGekxMDZrFdqz5M=
github.com/appleboy/com v0.0.1/go.mod h1:rtwjPnHClMOJw4K5oW3ASx9BCPCJ1SDbFbzJjY4Ebqw= github.com/appleboy/com v0.0.0-20180410030638-c0b5901f9622/go.mod h1:rtwjPnHClMOJw4K5oW3ASx9BCPCJ1SDbFbzJjY4Ebqw=
github.com/appleboy/go-fcm v0.0.0-20190214153823-cfd5eac22a0f h1:qlMv6xr6XufzxNTAi9LqhWk8df+8DmUS8DLP5Q17saQ= github.com/appleboy/go-fcm v0.0.0-20180823141355-c8cd26f2c452 h1:+O17Ly9bsfToQAJApv4FeLYqbm0OZyE2nupljZ1iQrc=
github.com/appleboy/go-fcm v0.0.0-20190214153823-cfd5eac22a0f/go.mod h1:DeokSWAx9RKLcVXRodWJ0lpvHaMPfQx+cC/zODK7g8A= github.com/appleboy/go-fcm v0.0.0-20180823141355-c8cd26f2c452/go.mod h1:DeokSWAx9RKLcVXRodWJ0lpvHaMPfQx+cC/zODK7g8A=
github.com/appleboy/gofight v2.0.0+incompatible h1:ECVMVpNJFBztDbnA7ead4Ffm6mizKKb6QyR78F+j4eY= github.com/appleboy/gofight v2.0.0+incompatible h1:ECVMVpNJFBztDbnA7ead4Ffm6mizKKb6QyR78F+j4eY=
github.com/appleboy/gofight v2.0.0+incompatible/go.mod h1:H/tvof1oZHnZdlBd+AeODZGkk1C+D2na0NXr0iXuZHA= github.com/appleboy/gofight v2.0.0+incompatible/go.mod h1:H/tvof1oZHnZdlBd+AeODZGkk1C+D2na0NXr0iXuZHA=
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/asdine/storm v0.0.0-20170209191653-de95a2ead13a h1:+fMyGdnBFcIfdzMHhOXRhdnTbRAqDv8ahtl4nzP5l9Y=
github.com/asdine/storm v2.1.2+incompatible h1:dczuIkyqwY2LrtXPz8ixMrU/OFgZp71kbKTHGrXYt/Q= github.com/asdine/storm v0.0.0-20170209191653-de95a2ead13a/go.mod h1:RarYDc9hq1UPLImuiXK3BIWPJLdIygvV3PsInK0FbVQ=
github.com/asdine/storm v2.1.2+incompatible/go.mod h1:RarYDc9hq1UPLImuiXK3BIWPJLdIygvV3PsInK0FbVQ= github.com/aws/aws-lambda-go v0.0.0-20180121103608-6736675908bd h1:Be96229HOzPdt/kGWgoGGVeo3/SDxyB93xOjU3aHJyo=
github.com/aws/aws-lambda-go v1.9.0 h1:r9TWtk8ozLYdMW+aelUeWny8z2mjghJCMx6/uUwOLNo= github.com/aws/aws-lambda-go v0.0.0-20180121103608-6736675908bd/go.mod h1:zUsUQhAUjYzR8AuduJPCfhBuKWUaDbQiPOG+ouzmE1A=
github.com/aws/aws-lambda-go v1.9.0/go.mod h1:zUsUQhAUjYzR8AuduJPCfhBuKWUaDbQiPOG+ouzmE1A=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23 h1:D21IyuvjDCshj1/qq+pCNd3VZOAEI9jy6Bi131YlXgI= github.com/boltdb/bolt v0.0.0-20170131192018-e9cf4fae01b5 h1:CEa4aInusZzqB0d5gjtQFqUQjWBa30RQR8mXuu2RnXw=
github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= github.com/boltdb/bolt v0.0.0-20170131192018-e9cf4fae01b5/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/buger/jsonparser v0.0.0-20170215081816-6bd16707875b h1:UTJFwf/U1soV0wCEMDwm7Q+KvaMIxes5h9K+eXGFT/g=
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/buger/jsonparser v0.0.0-20170215081816-6bd16707875b/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s=
github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/dgraph-io/badger v0.0.0-20180406055407-deb140b63781 h1:2cZr+tpKuiLcuT0rk63IBRAuNNmktyLjSnFSFHXqZcs=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgraph-io/badger v0.0.0-20180406055407-deb140b63781/go.mod h1:VZxzAIRPHRVNRKRo6AXrX9BJegn6il06VMTZVJYCIjQ=
github.com/dgraph-io/badger v1.5.4 h1:gVTrpUTbbr/T24uvoCaqY2KSHfNLVGm0w+hbee2HMeg= github.com/dgrijalva/jwt-go v3.1.0+incompatible h1:FFziAwDQQ2dz1XClWMkwvukur3evtZx7x/wMHKM1i20=
github.com/dgraph-io/badger v1.5.4/go.mod h1:VZxzAIRPHRVNRKRo6AXrX9BJegn6il06VMTZVJYCIjQ= github.com/dgrijalva/jwt-go v3.1.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgryski/go-farm v0.0.0-20180109070241-2de33835d102 h1:afESQBXJEnj3fu+34X//E8Wg3nEbMJxJkwSc0tPePK0=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-farm v0.0.0-20180109070241-2de33835d102/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw=
github.com/dgryski/go-farm v0.0.0-20190104051053-3adb47b1fb0f h1:dDxpBYafY/GYpcl+LS4Bn3ziLPuEdGRkRjYAbSlWxSA= github.com/emirpasic/gods v0.0.0-20170204130913-fc3e4a43ff31 h1:l2nU4fk8IgsxoSLC2Tj+UrqiZXlFfZGMAj04oMJN+VU=
github.com/dgryski/go-farm v0.0.0-20190104051053-3adb47b1fb0f/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/emirpasic/gods v0.0.0-20170204130913-fc3e4a43ff31/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o=
github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a h1:yDWHCSQ40h88yih2JAcL6Ls/kVkSE8GFACTGVnMPruw= github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a h1:yDWHCSQ40h88yih2JAcL6Ls/kVkSE8GFACTGVnMPruw=
github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a/go.mod h1:7Ga40egUymuWXxAe151lTNnCv97MddSOVsjpPPkityA= github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a/go.mod h1:7Ga40egUymuWXxAe151lTNnCv97MddSOVsjpPPkityA=
github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 h1:0JZ+dUmQeA8IIVUMzysrX4/AKuQwWhV2dYQuPZdvdSQ= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 h1:0JZ+dUmQeA8IIVUMzysrX4/AKuQwWhV2dYQuPZdvdSQ=
github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64=
github.com/facebookgo/freeport v0.0.0-20150612182905-d4adf43b75b9 h1:wWke/RUCl7VRjQhwPlR/v0glZXNYzBHdNUzf/Am2Nmg= github.com/facebookgo/freeport v0.0.0-20150612182905-d4adf43b75b9 h1:wWke/RUCl7VRjQhwPlR/v0glZXNYzBHdNUzf/Am2Nmg=
github.com/facebookgo/freeport v0.0.0-20150612182905-d4adf43b75b9/go.mod h1:uPmAp6Sws4L7+Q/OokbWDAK1ibXYhB3PXFP1kol5hPg= github.com/facebookgo/freeport v0.0.0-20150612182905-d4adf43b75b9/go.mod h1:uPmAp6Sws4L7+Q/OokbWDAK1ibXYhB3PXFP1kol5hPg=
github.com/facebookgo/grace v0.0.0-20180706040059-75cf19382434 h1:mOp33BLbcbJ8fvTAmZacbBiOASfxN+MLcLxymZCIrGE= github.com/facebookgo/grace v0.0.0-20170218225239-4afe952a37a4 h1:c8bY3vJpaia8nrZANEBY8yL7rGg7TSit8O1eAJe4hbo=
github.com/facebookgo/grace v0.0.0-20180706040059-75cf19382434/go.mod h1:KigFdumBXUPSwzLDbeuzyt0elrL7+CP7TKuhrhT4bcU= github.com/facebookgo/grace v0.0.0-20170218225239-4afe952a37a4/go.mod h1:KigFdumBXUPSwzLDbeuzyt0elrL7+CP7TKuhrhT4bcU=
github.com/facebookgo/httpdown v0.0.0-20180706035922-5979d39b15c2 h1:nXeeRHmgNgjLxi+7dY9l9aDvSS1uwVlNLqUWIY4Ath0= github.com/facebookgo/httpdown v0.0.0-20160323221027-a3b1354551a2 h1:3Zvf9wRhl1cOhckN1oRGWPOkIhOketmEcrQ4TeFAoR4=
github.com/facebookgo/httpdown v0.0.0-20180706035922-5979d39b15c2/go.mod h1:TUV/fX3XrTtBQb5+ttSUJzcFgLNpILONFTKmBuk5RSw= github.com/facebookgo/httpdown v0.0.0-20160323221027-a3b1354551a2/go.mod h1:TUV/fX3XrTtBQb5+ttSUJzcFgLNpILONFTKmBuk5RSw=
github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A=
github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg=
github.com/facebookgo/stats v0.0.0-20151006221625-1b76add642e4 h1:0YtRCqIZs2+Tz49QuH6cJVw/IFqzo39gEqZ0iYLxD2M= github.com/facebookgo/stats v0.0.0-20151006221625-1b76add642e4 h1:0YtRCqIZs2+Tz49QuH6cJVw/IFqzo39gEqZ0iYLxD2M=
@ -55,59 +52,58 @@ github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870 h1:E2s37DuLxFhQD
github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0=
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3 h1:t8FVkw33L+wilf2QiWkw0UV77qRpcH/JHPKGpKa2E8g= github.com/gin-contrib/sse v0.0.0-20170109093832-22d885f9ecc7 h1:AzN37oI0cOS+cougNAV9szl6CVoj2RYwzS3DpUQNtlY=
github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= github.com/gin-contrib/sse v0.0.0-20170109093832-22d885f9ecc7/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s=
github.com/gin-gonic/gin v1.3.0 h1:kCmZyPklC0gVdL728E6Aj20uYBJV93nj/TkwBTKhFbs= github.com/gin-gonic/gin v0.0.0-20170929084810-b8b68314faa0 h1:9NJhszAM+V+E0qESsPI3EGhCINyqzDWAwC0/dPEUexM=
github.com/gin-gonic/gin v1.3.0/go.mod h1:7cKuhb5qV2ggCFctp2fJQ+ErvciLZrIeoOSOm6mUr7Y= github.com/gin-gonic/gin v0.0.0-20170929084810-b8b68314faa0/go.mod h1:7cKuhb5qV2ggCFctp2fJQ+ErvciLZrIeoOSOm6mUr7Y=
github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= github.com/gogo/protobuf v1.1.1 h1:72R+M5VuhED/KujmZVcIquuo8mBgX4oVda//DQb3PXo=
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db h1:woRePGFeVFfLKN/pOkfl+p/TAqKOfFu+7KPlMVpok/w= github.com/golang/snappy v0.0.0-20170215233205-553a64147049 h1:K9KHZbXKpGydfDN0aZrsoHpLJlZsBrGMFWbgLDGnPZk=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v0.0.0-20171017181929-23c074d0eceb h1:1OvvPvZkn/yCQ3xBcM8y4020wdkMXPHLB4+NfoGWh4U=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/hcl v0.0.0-20171017181929-23c074d0eceb/go.mod h1:oZtUIOe8dh44I2q6ScRibXws4Ajl+d+nod3AaR9vL5w=
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/json-iterator/go v1.1.6 h1:MrUvLMLTMxbqFJ9kzlvat/rYZqZnW3u4wkLzWTaFwKs= github.com/json-iterator/go v0.0.0-20170713110145-8b0360418449 h1:VJa+Po1cVKm+Dj6WfkX1Hn9uhN9Em148uJmr+LMDGN8=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v0.0.0-20170713110145-8b0360418449/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/labstack/echo v3.3.10+incompatible h1:pGRcYk231ExFAyoAjAfD85kQzRJCRI8bbnE7CX5OEgg= github.com/labstack/echo v3.3.10+incompatible h1:pGRcYk231ExFAyoAjAfD85kQzRJCRI8bbnE7CX5OEgg=
github.com/labstack/echo v3.3.10+incompatible/go.mod h1:0INS7j/VjnFxD4E2wkz67b8cVwCLbBmJyDaka6Cmk1s= github.com/labstack/echo v3.3.10+incompatible/go.mod h1:0INS7j/VjnFxD4E2wkz67b8cVwCLbBmJyDaka6Cmk1s=
github.com/labstack/gommon v0.2.8 h1:JvRqmeZcfrHC5u6uVleB4NxxNbzx6gpbJiQknDbKQu0= github.com/labstack/gommon v0.2.8 h1:JvRqmeZcfrHC5u6uVleB4NxxNbzx6gpbJiQknDbKQu0=
github.com/labstack/gommon v0.2.8/go.mod h1:/tj9csK2iPSBvn+3NLM9e52usepMtrd5ilFYA+wQNJ4= github.com/labstack/gommon v0.2.8/go.mod h1:/tj9csK2iPSBvn+3NLM9e52usepMtrd5ilFYA+wQNJ4=
github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY= github.com/magiconair/properties v0.0.0-20170902060319-8d7837e64d3c h1:BDr2SMw3gKp9Xyvp33plTgRPEkE6NralNG0JLuBgkiQ=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v0.0.0-20170902060319-8d7837e64d3c/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe h1:W/GaMY0y69G4cFlmsC6B9sbuo2fP8OFP1ABjt4kPz+w=
github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mattn/go-colorable v0.1.1 h1:G1f5SKeVxmagw/IyvzvtZE4Gybcc4Tr1tf7I8z0XgOg= github.com/mattn/go-colorable v0.1.1 h1:G1f5SKeVxmagw/IyvzvtZE4Gybcc4Tr1tf7I8z0XgOg=
github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=
github.com/mattn/go-isatty v0.0.5 h1:tHXDdz1cpzGaovsTB+TVB8q90WEokoVmfMqoVcrLUgw=
github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/go-isatty v0.0.7 h1:UvyT9uN+3r7yLEYSlJsbQGdsaB/a0DlgWP3pql6iwOc=
github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs= github.com/onsi/ginkgo v1.8.0 h1:VkHVNpR4iVnU8XQR6DBm8BqYjN7CRzw+xKUbVVbbW9w=
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU= github.com/onsi/gomega v1.5.0 h1:izbySO9zDPmjJ8rDjLvkA2zJHIo+HkYXHnf7eN7SSyo=
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v0.0.0-20171022022338-8c31c2ec65b2 h1:RTx6HBVnEPvm6X4nj0Tw4ebgCq6XgwnKCvsqbKGD4XQ=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v0.0.0-20171022022338-8c31c2ec65b2/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.0.0-20171216070316-e881fd58d78e h1:+RHxT/gm0O3UF7nLJbdNzAmULvCFt4XfXHWzh3XI/zs=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.0.0-20171216070316-e881fd58d78e/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pquerna/ffjson v0.0.0-20181028064349-e517b90714f7 h1:gGBSHPOU7g8YjTbhwn+lvFm2VDEhhA+PwDIlstkgSxE=
github.com/pquerna/ffjson v0.0.0-20181028064349-e517b90714f7/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M=
github.com/prometheus/client_golang v0.9.2 h1:awm861/B8OKDd2I/6o1dy3ra4BamzKhYOiGItCeZ740= github.com/prometheus/client_golang v0.9.2 h1:awm861/B8OKDd2I/6o1dy3ra4BamzKhYOiGItCeZ740=
github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910 h1:idejC8f05m9MGOsuEi1ATq9shN03HrxNkD/luQvxCv8= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910 h1:idejC8f05m9MGOsuEi1ATq9shN03HrxNkD/luQvxCv8=
@ -118,97 +114,74 @@ github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a h1:9a8MnZMP0X2nL
github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/sideshow/apns2 v0.0.0-20181014012405-060d44b53d05 h1:3M+RJyiSlS8LumIYw9HbwwhKMQzJZ1HzTbU3FVmXy8o= github.com/sideshow/apns2 v0.0.0-20181014012405-060d44b53d05 h1:3M+RJyiSlS8LumIYw9HbwwhKMQzJZ1HzTbU3FVmXy8o=
github.com/sideshow/apns2 v0.0.0-20181014012405-060d44b53d05/go.mod h1:f7dArLPLbiZ3qPdzzrZXdCSlMp8FD0p6z7tHssDOLvk= github.com/sideshow/apns2 v0.0.0-20181014012405-060d44b53d05/go.mod h1:f7dArLPLbiZ3qPdzzrZXdCSlMp8FD0p6z7tHssDOLvk=
github.com/sirupsen/logrus v1.4.0 h1:yKenngtzGh+cUSSh6GWbxW2abRqhYUSR/t/6+2QqNvE= github.com/sirupsen/logrus v0.0.0-20170620144510-3d4380f53a34 h1:kVLTAexkb0RpvzqHGdmxz80/bPLGuZn4qnUR0a4sW9Y=
github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v0.0.0-20170620144510-3d4380f53a34/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= github.com/spf13/afero v0.0.0-20171021110813-5660eeed305f h1:+Dx5AA/mr18sj78olfUUNWiBBH18xbGhdXiOnLoKnzY=
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v0.0.0-20171021110813-5660eeed305f/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.1.0 h1:0Rhw4d6C8J9VPu6cjZLIhZ8+aAOHcDvGeKn+cq5Aq3k=
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.1.0/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg=
github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= github.com/spf13/jwalterweatherman v0.0.0-20170901151539-12bd96e66386 h1:zBoLErXXAvWnNsu+pWkRYl6Cx1KXmIfAVsIuYkPN6aY=
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v0.0.0-20170901151539-12bd96e66386/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= github.com/spf13/pflag v0.0.0-20171020110617-97afa5e7ca8a h1:NLjz2RTuoGx4ITYI/oN9PGzz1b53vqe7xZ2juTlC/18=
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v0.0.0-20171020110617-97afa5e7ca8a/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/spf13/viper v1.3.2 h1:VUFqw5KcqRf7i70GOzW7N+Q7+gxVBkSSqiXB12+JQ4M= github.com/spf13/viper v0.0.0-20171020104009-8ef37cbca716 h1:riT9pMSDqlXO6nIDTZoGk3C5OIDdLFaCkfkgJ0fF/rQ=
github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v0.0.0-20171020104009-8ef37cbca716/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v0.0.0-20170130113145-4d4bfba8f1d1 h1:Zx8Rp9ozC4FPFxfEKRSUu8+Ay3sZxEUZ7JrCWMbGgvE=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v0.0.0-20170130113145-4d4bfba8f1d1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/syndtr/goleveldb v0.0.0-20161227110519-23851d93a229 h1:arXQNTPyszL9q5nmGtSXyGocRDQRxdtoSS25nZgPvCI=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/syndtr/goleveldb v0.0.0-20161227110519-23851d93a229/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/thoas/stats v0.0.0-20160726120248-152b5d051953 h1:PD6HdaGc9tn2a8W/33zxcA6DTq1D1K0O/PKWOGz3Lxo=
github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE= github.com/thoas/stats v0.0.0-20160726120248-152b5d051953/go.mod h1:GkZsNBOco11YY68OnXUARbSl26IOXXAeYf6ZKmSZR2M=
github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ=
github.com/thoas/stats v0.0.0-20181218120333-e97827ebd7ca h1:Ju3LQGLQHCUv1yB2WwB1/uXHL+8SfF4E8qm/iSCQV0Q= github.com/thoas/stats v0.0.0-20181218120333-e97827ebd7ca h1:Ju3LQGLQHCUv1yB2WwB1/uXHL+8SfF4E8qm/iSCQV0Q=
github.com/thoas/stats v0.0.0-20181218120333-e97827ebd7ca/go.mod h1:GkZsNBOco11YY68OnXUARbSl26IOXXAeYf6ZKmSZR2M= github.com/thoas/stats v0.0.0-20181218120333-e97827ebd7ca/go.mod h1:GkZsNBOco11YY68OnXUARbSl26IOXXAeYf6ZKmSZR2M=
github.com/tidwall/btree v0.0.0-20170113224114-9876f1454cf0 h1:QnyrPZZvPmR0AtJCxxfCtI1qN+fYpKTKJ/5opWmZ34k= github.com/tidwall/btree v0.0.0-20170113224114-9876f1454cf0 h1:QnyrPZZvPmR0AtJCxxfCtI1qN+fYpKTKJ/5opWmZ34k=
github.com/tidwall/btree v0.0.0-20170113224114-9876f1454cf0/go.mod h1:huei1BkDWJ3/sLXmO+bsCNELL+Bp2Kks9OLyQFkzvA8= github.com/tidwall/btree v0.0.0-20170113224114-9876f1454cf0/go.mod h1:huei1BkDWJ3/sLXmO+bsCNELL+Bp2Kks9OLyQFkzvA8=
github.com/tidwall/buntdb v1.1.0 h1:H6LzK59KiNjf1nHVPFrYj4Qnl8d8YLBsYamdL8N+Bao= github.com/tidwall/buntdb v0.0.0-20161202163738-74dc10171b75 h1:lBUdGHoBnfesVCZAYHc4uvAfp1irCkoZh8TQ6y0GzZ8=
github.com/tidwall/buntdb v1.1.0/go.mod h1:Y39xhcDW10WlyYXeLgGftXVbjtM0QP+/kpz8xl9cbzE= github.com/tidwall/buntdb v0.0.0-20161202163738-74dc10171b75/go.mod h1:Y39xhcDW10WlyYXeLgGftXVbjtM0QP+/kpz8xl9cbzE=
github.com/tidwall/gjson v1.2.1 h1:j0efZLrZUvNerEf6xqoi0NjWMK5YlLrR7Guo/dxY174= github.com/tidwall/gjson v0.0.0-20170205161042-09d1c5c5bc64 h1:6/SJyMAg0OoV6FuVP97VsiTFxdG4XyisdpvSTC1IiHY=
github.com/tidwall/gjson v1.2.1/go.mod h1:c/nTNbUr0E0OrXEhq1pwa8iEgc2DOt4ZZqAt1HtCkPA= github.com/tidwall/gjson v0.0.0-20170205161042-09d1c5c5bc64/go.mod h1:c/nTNbUr0E0OrXEhq1pwa8iEgc2DOt4ZZqAt1HtCkPA=
github.com/tidwall/grect v0.0.0-20161006141115-ba9a043346eb h1:5NSYaAdrnblKByzd7XByQEJVT8+9v0W/tIY0Oo4OwrE= github.com/tidwall/grect v0.0.0-20161006141115-ba9a043346eb h1:5NSYaAdrnblKByzd7XByQEJVT8+9v0W/tIY0Oo4OwrE=
github.com/tidwall/grect v0.0.0-20161006141115-ba9a043346eb/go.mod h1:lKYYLFIr9OIgdgrtgkZ9zgRxRdvPYsExnYBsEAd8W5M= github.com/tidwall/grect v0.0.0-20161006141115-ba9a043346eb/go.mod h1:lKYYLFIr9OIgdgrtgkZ9zgRxRdvPYsExnYBsEAd8W5M=
github.com/tidwall/match v1.0.1 h1:PnKP62LPNxHKTwvHHZZzdOAOCtsJTjo6dZLCwpKm5xc= github.com/tidwall/match v0.0.0-20160830173930-173748da739a h1:jkSy//MOkpJzPmsdrxnM+wiF/wdmVCFGegxccsSkm2Q=
github.com/tidwall/match v1.0.1/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E= github.com/tidwall/match v0.0.0-20160830173930-173748da739a/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E=
github.com/tidwall/pretty v0.0.0-20180105212114-65a9db5fad51 h1:BP2bjP495BBPaBcS5rmqviTfrOkN5rO5ceKAMRZCRFc= github.com/tidwall/rtree v0.0.0-20160903213729-d4a8a3d30d57 h1:k1tEEozQvcJFX6AFAfaF6cCeDvIhocoTrM47VswRfCg=
github.com/tidwall/pretty v0.0.0-20180105212114-65a9db5fad51/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tidwall/rtree v0.0.0-20160903213729-d4a8a3d30d57/go.mod h1:/h+UnNGt0IhNNJLkGikcdcJqm66zGD/uJGMRxK/9+Ao=
github.com/tidwall/rtree v0.0.0-20180113144539-6cd427091e0e h1:+NL1GDIUOKxVfbp2KoJQD9cTQ6dyP2co9q4yzmT9FZo= github.com/ugorji/go v0.0.0-20170312112114-708a42d24682 h1:9FsLhpi/pQ3YZgrcf1xMOTaVqiUEaLCzGNFVfKswcww=
github.com/tidwall/rtree v0.0.0-20180113144539-6cd427091e0e/go.mod h1:/h+UnNGt0IhNNJLkGikcdcJqm66zGD/uJGMRxK/9+Ao= github.com/ugorji/go v0.0.0-20170312112114-708a42d24682/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ=
github.com/tidwall/tinyqueue v0.0.0-20180302190814-1e39f5511563 h1:Otn9S136ELckZ3KKDyCkxapfufrqDqwmGjcHfAyXRrE=
github.com/tidwall/tinyqueue v0.0.0-20180302190814-1e39f5511563/go.mod h1:mLqSmt7Dv/CNneF2wfcChfN1rvapyQr01LGKnKex0DQ=
github.com/tj/assert v0.0.0-20171129193455-018094318fb0 h1:Rw8kxzWo1mr6FSaYXjQELRe88y2KdfynXdnK72rdjtA=
github.com/tj/assert v0.0.0-20171129193455-018094318fb0/go.mod h1:mZ9/Rh9oLWpLLDRpvE+3b7gP/C2YyLFYxNmcLnPTMe0=
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8 h1:3SVOIvH7Ae1KRYyQWRjXWJEA9sS/c/pjvH++55Gr648=
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/valyala/fasttemplate v1.0.1 h1:tY9CJiPnMXf1ERmG2EyK7gNUd+c6RKGD0IfU8WdUSz8= github.com/valyala/fasttemplate v1.0.1 h1:tY9CJiPnMXf1ERmG2EyK7gNUd+c6RKGD0IfU8WdUSz8=
github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8=
github.com/vmihailenco/msgpack v4.0.2+incompatible h1:6ujmmycMfB62Mwv2N4atpnf8CKLSzhgodqMenpELKIQ= golang.org/x/crypto v0.0.0-20170404161947-c78caca803c9 h1:rPnURWKICR4bkjK+GABNWICXj6KLDa1jbj0IoVaQODw=
github.com/vmihailenco/msgpack v4.0.2+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= golang.org/x/crypto v0.0.0-20170404161947-c78caca803c9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
go.etcd.io/bbolt v1.3.2 h1:Z/90sZLPOeCy2PwprqkFa25PdkusRzaj9P8zm/KNyvk=
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a h1:YX8ljsm6wXlHZO+aRz9Exqr0evNhKRNe5K/gi+zKh4U=
golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181201002055-351d144fa1fc h1:a3CU5tJYVj92DY2LaA1kUkrsqD5/3mLDhx2NcNqyW+0=
golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190313220215-9f648a60d977 h1:actzWV6iWn3GLqN8dZjzsB+CLt+gaV2+wsxroxiQI8I=
golang.org/x/net v0.0.0-20190313220215-9f648a60d977/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f h1:Bl/8QSvNqXvPGPGXa2z5xUTmV7VDcZyvRZ+QQXkXTZQ=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6 h1:bjcUS9ztw9kFmmIxJInhon/0Is3p+EHBKNgquIzo1OI= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e h1:o3PsSEY8E4eXWkXrIP9YJALUkVZqzHJT5DOasTyn8Vs=
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223 h1:DH4skfRX4EBpamg7iV4ZlCpblAHI6s6TDM39bFZumv8= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223 h1:DH4skfRX4EBpamg7iV4ZlCpblAHI6s6TDM39bFZumv8=
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.1.0 h1:igQkv0AAhEIvTEpD5LIpAfav2eeVO9HBTjvKHVJPRSs= google.golang.org/genproto v0.0.0-20170711235230-b0a3dcfcd1a9 h1:wxGvmadi0ZZjsFJf3uyqRb1Eg4Jawj4ofWGwW09gfds=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/genproto v0.0.0-20170711235230-b0a3dcfcd1a9/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 h1:Nw54tB0rB7hY/N0NQvRW8DG4Yk3Q6T9cu9RcFQDu1tc= google.golang.org/grpc v0.0.0-20171109215322-de2209a968d4 h1:6MdQUci2qlorHzHryzbzwf6SpQbkyyjRoUedE1A/Hls=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/grpc v0.0.0-20171109215322-de2209a968d4/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
google.golang.org/grpc v1.19.0 h1:cfg4PD8YEdSFnm7qLV4++93WcmhH2nIUhMjhdCvl3j8=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
gopkg.in/appleboy/gin-status-api.v1 v1.0.1 h1:c80nPT2SftCfE/2I9g/BbH5bQjG3kbnMMQ1083ugapU= gopkg.in/appleboy/gin-status-api.v1 v1.0.1 h1:c80nPT2SftCfE/2I9g/BbH5bQjG3kbnMMQ1083ugapU=
gopkg.in/appleboy/gin-status-api.v1 v1.0.1/go.mod h1:X8bhgN2h4PXwJthf69L7rIAqDdnRZptEroSSpFiSnUg= gopkg.in/appleboy/gin-status-api.v1 v1.0.1/go.mod h1:X8bhgN2h4PXwJthf69L7rIAqDdnRZptEroSSpFiSnUg=
gopkg.in/appleboy/gofight.v1 v1.0.4 h1:TTaDOzxoUYfSoCnX6Bccct4EQUVPZwfv53aE5YEoyt4= gopkg.in/appleboy/gofight.v1 v1.0.4 h1:TTaDOzxoUYfSoCnX6Bccct4EQUVPZwfv53aE5YEoyt4=
gopkg.in/appleboy/gofight.v1 v1.0.4/go.mod h1:+uRfN6FDYnxTJ+ErmYp2sESG/haICL6CahBhD6RzsVw= gopkg.in/appleboy/gofight.v1 v1.0.4/go.mod h1:+uRfN6FDYnxTJ+ErmYp2sESG/haICL6CahBhD6RzsVw=
gopkg.in/appleboy/gofight.v2 v2.0.0 h1:tbwzV5a3rkoA7M+INNFZ0l1FqsbzVYbWKmJIcwpajLY= gopkg.in/appleboy/gofight.v2 v2.0.0 h1:tbwzV5a3rkoA7M+INNFZ0l1FqsbzVYbWKmJIcwpajLY=
gopkg.in/appleboy/gofight.v2 v2.0.0/go.mod h1:/oCUdVhE1UdRqheD5PmH/2GBvcaxShR7/cDBUoSk2wQ= gopkg.in/appleboy/gofight.v2 v2.0.0/go.mod h1:/oCUdVhE1UdRqheD5PmH/2GBvcaxShR7/cDBUoSk2wQ=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/fukata/golang-stats-api-handler.v1 v1.0.0 h1:UR6t2xlnAa3nDYeT+akxO31opz8bUDkswQ8tWd4E754= gopkg.in/fukata/golang-stats-api-handler.v1 v1.0.0 h1:UR6t2xlnAa3nDYeT+akxO31opz8bUDkswQ8tWd4E754=
@ -217,13 +190,13 @@ gopkg.in/gin-gonic/gin.v1 v1.3.0 h1:DjAu49rN1YttQsOkVCPlAO3INcZNFT0IKsNVMk5MRT4=
gopkg.in/gin-gonic/gin.v1 v1.3.0/go.mod h1:Eljh74A/zAvUOQ835v6ySeZ+5gQG6tKjbZTaZ9iWU3A= gopkg.in/gin-gonic/gin.v1 v1.3.0/go.mod h1:Eljh74A/zAvUOQ835v6ySeZ+5gQG6tKjbZTaZ9iWU3A=
gopkg.in/go-playground/assert.v1 v1.2.1 h1:xoYuJVE7KT85PYWrN730RguIQO0ePzVRfFMXadIrXTM= gopkg.in/go-playground/assert.v1 v1.2.1 h1:xoYuJVE7KT85PYWrN730RguIQO0ePzVRfFMXadIrXTM=
gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE=
gopkg.in/go-playground/validator.v8 v8.18.2 h1:lFB4DoMU6B626w8ny76MV7VX6W2VHct2GVOI3xgiMrQ= gopkg.in/go-playground/validator.v8 v8.18.1 h1:F8SLY5Vqesjs1nI1EL4qmF1PQZ1sitsmq0rPYXLyfGU=
gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= gopkg.in/go-playground/validator.v8 v8.18.1/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y=
gopkg.in/redis.v5 v5.2.9 h1:MNZYOLPomQzZMfpN3ZtD1uyJ2IDonTTlxYiV/pEApiw= gopkg.in/redis.v5 v5.2.4 h1:XpIcn07AdbjbLZOqa6ipEm9aUhLwpgsm3yi0liZMycc=
gopkg.in/redis.v5 v5.2.9/go.mod h1:6gtv0/+A4iM08kdRfocWYB3bLX2tebpNtfKlFT6H4mY= gopkg.in/redis.v5 v5.2.4/go.mod h1:6gtv0/+A4iM08kdRfocWYB3bLX2tebpNtfKlFT6H4mY=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/vmihailenco/msgpack.v2 v2.9.1 h1:kb0VV7NuIojvRfzwslQeP3yArBqJHW9tOl4t38VS1jM=
gopkg.in/vmihailenco/msgpack.v2 v2.9.1/go.mod h1:/3Dn1Npt9+MYyLpYYXjInO/5jvMLamn+AEGwNEOatn8=
gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=

View File

@ -76,7 +76,8 @@ func TestPushToAndroidRightTokenForJSONLog(t *testing.T) {
} }
isError := PushToAndroid(req) isError := PushToAndroid(req)
assert.False(t, isError) // mismatched sender id
assert.True(t, isError)
} }
func TestPushToAndroidRightTokenForStringLog(t *testing.T) { func TestPushToAndroidRightTokenForStringLog(t *testing.T) {
@ -94,7 +95,8 @@ func TestPushToAndroidRightTokenForStringLog(t *testing.T) {
} }
isError := PushToAndroid(req) isError := PushToAndroid(req)
assert.False(t, isError) // mismatched sender id
assert.True(t, isError)
} }
func TestOverwriteAndroidAPIKey(t *testing.T) { func TestOverwriteAndroidAPIKey(t *testing.T) {

View File

@ -129,7 +129,7 @@ func TestSyncModeForNotifications(t *testing.T) {
count, logs := queueNotification(req) count, logs := queueNotification(req)
assert.Equal(t, 3, count) assert.Equal(t, 3, count)
assert.Equal(t, 2, len(logs)) assert.Equal(t, 3, len(logs))
} }
func TestSyncModeForTopicNotification(t *testing.T) { func TestSyncModeForTopicNotification(t *testing.T) {

View File

@ -137,36 +137,11 @@ func TestStatForBoltDBEngine(t *testing.T) {
assert.Equal(t, int64(500), val) assert.Equal(t, int64(500), val)
} }
func TestStatForBuntDBEngine(t *testing.T) { // func TestStatForBuntDBEngine(t *testing.T) {
var val int64
PushConf.Stat.Engine = "buntdb"
err := InitAppStatus()
assert.Nil(t, err)
StatStorage.Reset()
StatStorage.AddTotalCount(100)
StatStorage.AddIosSuccess(200)
StatStorage.AddIosError(300)
StatStorage.AddAndroidSuccess(400)
StatStorage.AddAndroidError(500)
val = StatStorage.GetTotalCount()
assert.Equal(t, int64(100), val)
val = StatStorage.GetIosSuccess()
assert.Equal(t, int64(200), val)
val = StatStorage.GetIosError()
assert.Equal(t, int64(300), val)
val = StatStorage.GetAndroidSuccess()
assert.Equal(t, int64(400), val)
val = StatStorage.GetAndroidError()
assert.Equal(t, int64(500), val)
}
// func TestStatForLevelDBEngine(t *testing.T) {
// var val int64 // var val int64
// PushConf.Stat.Engine = "leveldb" // PushConf.Stat.Engine = "buntdb"
// InitAppStatus() // err := InitAppStatus()
// assert.Nil(t, err)
// StatStorage.Reset() // StatStorage.Reset()
@ -188,28 +163,54 @@ func TestStatForBuntDBEngine(t *testing.T) {
// assert.Equal(t, int64(500), val) // assert.Equal(t, int64(500), val)
// } // }
func TestStatForBadgerEngine(t *testing.T) { // func TestStatForLevelDBEngine(t *testing.T) {
var val int64 // var val int64
PushConf.Stat.Engine = "badger" // PushConf.Stat.Engine = "leveldb"
err := InitAppStatus() // err := InitAppStatus()
assert.Nil(t, err) // assert.Nil(t, err)
StatStorage.Reset() // StatStorage.Reset()
StatStorage.AddTotalCount(100) // StatStorage.AddTotalCount(100)
StatStorage.AddIosSuccess(200) // StatStorage.AddIosSuccess(200)
StatStorage.AddIosError(300) // StatStorage.AddIosError(300)
StatStorage.AddAndroidSuccess(400) // StatStorage.AddAndroidSuccess(400)
StatStorage.AddAndroidError(500) // StatStorage.AddAndroidError(500)
val = StatStorage.GetTotalCount() // val = StatStorage.GetTotalCount()
assert.Equal(t, int64(100), val) // assert.Equal(t, int64(100), val)
val = StatStorage.GetIosSuccess() // val = StatStorage.GetIosSuccess()
assert.Equal(t, int64(200), val) // assert.Equal(t, int64(200), val)
val = StatStorage.GetIosError() // val = StatStorage.GetIosError()
assert.Equal(t, int64(300), val) // assert.Equal(t, int64(300), val)
val = StatStorage.GetAndroidSuccess() // val = StatStorage.GetAndroidSuccess()
assert.Equal(t, int64(400), val) // assert.Equal(t, int64(400), val)
val = StatStorage.GetAndroidError() // val = StatStorage.GetAndroidError()
assert.Equal(t, int64(500), val) // assert.Equal(t, int64(500), val)
} // }
// func TestStatForBadgerEngine(t *testing.T) {
// var val int64
// PushConf.Stat.Engine = "badger"
// err := InitAppStatus()
// assert.Nil(t, err)
// StatStorage.Reset()
// StatStorage.AddTotalCount(100)
// StatStorage.AddIosSuccess(200)
// StatStorage.AddIosError(300)
// StatStorage.AddAndroidSuccess(400)
// StatStorage.AddAndroidError(500)
// val = StatStorage.GetTotalCount()
// assert.Equal(t, int64(100), val)
// val = StatStorage.GetIosSuccess()
// assert.Equal(t, int64(200), val)
// val = StatStorage.GetIosError()
// assert.Equal(t, int64(300), val)
// val = StatStorage.GetAndroidSuccess()
// assert.Equal(t, int64(400), val)
// val = StatStorage.GetAndroidError()
// assert.Equal(t, int64(500), val)
// }

303
pipeline.libsonnet Normal file
View File

@ -0,0 +1,303 @@
{
test:: {
kind: 'pipeline',
name: 'testing',
platform: {
os: 'linux',
arch: 'amd64',
},
steps: [
{
name: 'vet',
image: 'golang:1.12',
pull: 'always',
environment: {
GO111MODULE: 'on',
},
commands: [
'make vet',
],
volumes: [
{
name: 'gopath',
path: '/go',
},
],
},
{
name: 'lint',
image: 'golang:1.12',
pull: 'always',
environment: {
GO111MODULE: 'on',
},
commands: [
'make lint',
],
volumes: [
{
name: 'gopath',
path: '/go',
},
],
},
{
name: 'misspell',
image: 'golang:1.12',
pull: 'always',
environment: {
GO111MODULE: 'on',
},
commands: [
'make misspell-check',
],
volumes: [
{
name: 'gopath',
path: '/go',
},
],
},
{
name: 'embedmd',
image: 'golang:1.12',
pull: 'always',
environment: {
GO111MODULE: 'on',
},
commands: [
'make embedmd',
],
volumes: [
{
name: 'gopath',
path: '/go',
},
],
},
{
name: 'test',
image: 'golang:1.12',
pull: 'always',
environment: {
GO111MODULE: 'on',
ANDROID_API_KEY: { 'from_secret': 'android_api_key' },
ANDROID_TEST_TOKEN: { 'from_secret': 'android_test_token' },
},
commands: [
'make test',
],
volumes: [
{
name: 'gopath',
path: '/go',
},
],
},
{
name: 'codecov',
image: 'robertstettner/drone-codecov',
pull: 'always',
settings: {
token: { 'from_secret': 'codecov_token' },
},
},
],
volumes: [
{
name: 'gopath',
temp: {},
},
],
services: [
{
name: 'redis',
image: 'redis',
},
],
},
build(name, os='linux', arch='amd64'):: {
kind: 'pipeline',
name: os + '-' + arch,
platform: {
os: os,
arch: arch,
},
steps: [
{
name: 'build-push',
image: 'golang:1.12',
pull: 'always',
environment: {
CGO_ENABLED: '0',
GO111MODULE: 'on',
},
commands: [
'go build -v -ldflags \'-X main.build=${DRONE_BUILD_NUMBER}\' -a -o release/' + os + '/' + arch + '/' + name,
],
when: {
event: {
exclude: [ 'tag' ],
},
},
},
{
name: 'build-tag',
image: 'golang:1.12',
pull: 'always',
environment: {
CGO_ENABLED: '0',
GO111MODULE: 'on',
},
commands: [
'go build -v -ldflags \'-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\' -a -o release/' + os + '/' + arch + '/' + name,
],
when: {
event: [ 'tag' ],
},
},
{
name: 'executable',
image: 'golang:1.12',
pull: 'always',
commands: [
'./release/' + os + '/' + arch + '/' + name + ' --help',
],
},
{
name: 'dryrun',
image: 'plugins/docker:' + os + '-' + arch,
pull: 'always',
settings: {
daemon_off: false,
dry_run: true,
tags: os + '-' + arch,
dockerfile: 'docker/Dockerfile.' + os + '.' + arch,
repo: 'appleboy/' + name,
cache_from: 'appleboy/' + name,
},
when: {
event: [ 'pull_request' ],
},
},
{
name: 'publish',
image: 'plugins/docker:' + os + '-' + arch,
pull: 'always',
settings: {
daemon_off: 'false',
auto_tag: true,
auto_tag_suffix: os + '-' + arch,
dockerfile: 'docker/Dockerfile.' + os + '.' + arch,
repo: 'appleboy/' + name,
cache_from: 'appleboy/' + name,
username: { 'from_secret': 'docker_username' },
password: { 'from_secret': 'docker_password' },
},
when: {
event: {
exclude: [ 'pull_request' ],
},
},
},
],
depends_on: [
'testing',
],
trigger: {
ref: [
'refs/heads/master',
'refs/pull/**',
'refs/tags/**',
],
},
},
release:: {
kind: 'pipeline',
name: 'release-binary',
platform: {
os: 'linux',
arch: 'amd64',
},
steps: [
{
name: 'build-all-binary',
image: 'golang:1.12',
pull: 'always',
environment: {
GO111MODULE: 'on',
},
commands: [
'make release'
],
when: {
event: [ 'tag' ],
},
},
{
name: 'deploy-all-binary',
image: 'plugins/github-release',
pull: 'always',
settings: {
files: [ 'dist/release/*' ],
api_key: { 'from_secret': 'github_release_api_key' },
},
when: {
event: [ 'tag' ],
},
},
],
depends_on: [
'testing',
],
trigger: {
ref: [
'refs/tags/**',
],
},
},
notifications(os='linux', arch='amd64', depends_on=[]):: {
kind: 'pipeline',
name: 'notifications',
platform: {
os: os,
arch: arch,
},
steps: [
{
name: 'manifest',
image: 'plugins/manifest',
pull: 'always',
settings: {
username: { from_secret: 'docker_username' },
password: { from_secret: 'docker_password' },
spec: 'docker/manifest.tmpl',
ignore_missing: true,
},
},
{
name: 'microbadger',
image: 'plugins/webhook:1',
pull: 'always',
settings: {
url: { 'from_secret': 'microbadger_url' },
},
},
],
depends_on: depends_on,
trigger: {
ref: [
'refs/heads/master',
'refs/tags/**',
],
},
},
signature(key):: {
kind: 'signature',
hmac: key,
},
}

View File

@ -33,8 +33,6 @@ func (s *Storage) Init() error {
s.opts = badger.DefaultOptions s.opts = badger.DefaultOptions
s.opts.Dir = os.TempDir() + "badger" s.opts.Dir = os.TempDir() + "badger"
s.opts.ValueDir = os.TempDir() + "badger" s.opts.ValueDir = os.TempDir() + "badger"
fmt.Println(s.opts.Dir)
fmt.Println(s.opts.ValueDir)
return nil return nil
} }