-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
159 changed files
with
13,650 additions
and
6,763 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ addons: | |
packages: | ||
- python3.5 | ||
- python3-pip | ||
- python3.5-dev | ||
- libluajit-5.1-dev | ||
|
||
matrix: | ||
|
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,80 @@ | ||
SHELL := /bin/bash | ||
|
||
GOCMD=go | ||
GOTEST=$(GOCMD) test | ||
GOCLEAN=$(GOCMD) clean | ||
GOBUILD=$(GOCMD) build | ||
GOINSTALL=$(GOCMD) install | ||
|
||
BINARY_NAME=tyk | ||
BINARY_LINUX=tyk | ||
TAGS=coprocess grpc goplugin | ||
CONF=tyk.conf | ||
|
||
TEST_REGEX=. | ||
TEST_COUNT=1 | ||
|
||
BENCH_REGEX=. | ||
BENCH_RUN=NONE | ||
|
||
.PHONY: test | ||
test: | ||
$(GOTEST) -run=$(TEST_REGEX) -count=$(TEST_COUNT) ./... | ||
|
||
.PHONY: bench | ||
bench: | ||
$(GOTEST) -run=$(BENCH_RUN) -bench=$(BENCH_REGEX) ./... | ||
|
||
.PHONY: clean | ||
clean: | ||
$(GOCLEAN) | ||
rm -f $(BINARY_NAME) | ||
|
||
.PHONY: dev | ||
dev: | ||
$(GOBUILD) -tags "$(TAGS)" -o $(BINARY_NAME) -v . | ||
./$(BINARY_NAME) --conf $(CONF) | ||
|
||
.PHONY: build | ||
build: | ||
$(GOBUILD) -tags "$(TAGS)" -o $(BINARY_NAME) -v . | ||
|
||
.PHONY: build-linux | ||
build-linux: | ||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GOBUILD) -tags "$(TAGS)" -o $(BINARY_LINUX) -v . | ||
|
||
.PHONY: install | ||
install: | ||
$(GOINSTALL) -tags "$(TAGS)" | ||
|
||
.PHONY: db-start | ||
db-start: redis-start mongo-start | ||
|
||
.PHONY: db-stop | ||
db-stop: redis-stop mongo-stop | ||
|
||
# Docker start redis | ||
.PHONY: redis-start | ||
redis-start: | ||
docker run -itd --rm --name redis -p 127.0.0.1:6379:6379 redis:4.0-alpine redis-server --appendonly yes | ||
|
||
.PHONY: redis-stop | ||
redis-stop: | ||
docker stop redis | ||
|
||
.PHONY: redis-cli | ||
redis-cli: | ||
docker exec -it redis redis-cli | ||
|
||
# Docker start mongo | ||
.PHONY: mongo-start | ||
mongo-start: | ||
docker run -itd --rm --name mongo -p 127.0.0.1:27017:27017 mongo:3.4-jessie | ||
|
||
.PHONY: mongo-stop | ||
mongo-stop: | ||
docker stop mongo | ||
|
||
.PHONY: mongo-shell | ||
mongo-shell: | ||
docker exec -it mongo mongo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package apidef | ||
|
||
type InboundData struct { | ||
KeyName string | ||
Value string | ||
SessionState string | ||
Timeout int64 | ||
Per int64 | ||
Expire int64 | ||
} | ||
|
||
type DefRequest struct { | ||
OrgId string | ||
Tags []string | ||
} | ||
|
||
type GroupLoginRequest struct { | ||
UserKey string | ||
GroupID string | ||
} | ||
|
||
type GroupKeySpaceRequest struct { | ||
OrgID string | ||
GroupID string | ||
} | ||
|
||
type KeysValuesPair struct { | ||
Keys []string | ||
Values []string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
Oops, something went wrong.