From 4e2702265ad63902bcf461d8219cedc1bfafa185 Mon Sep 17 00:00:00 2001 From: Sangbum Kim Date: Mon, 21 Aug 2017 18:00:29 +0900 Subject: [PATCH] =?UTF-8?q?=EB=84=A4=EC=9D=B4=EB=B0=8D=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- .vscode/launch.json | 6 +++--- Makefile | 6 +++--- main.go | 6 +++--- rooibos-dev.service | 6 +++--- subsys/db/conn.go | 2 +- subsys/db/member.go | 2 +- subsys/http/init.go | 8 ++++---- subsys/http/middleware/logging/middleware.go | 4 ++-- subsys/http/middleware/recovery/middleware.go | 4 ++-- subsys/http/route/index.go | 10 +++++----- subsys/http/route/metric.go | 6 +++--- subsys/http/route/services.go | 2 +- subsys/periodic/init.go | 2 +- subsys/redis/app_token_data.pb.go | 6 +++--- subsys/redis/app_token_data.proto | 4 ++-- subsys/redis/app_token_service.go | 2 +- subsys/redis/conn.go | 2 +- subsys/redis/serialize.go | 2 +- util/config.go | 2 +- util/iface/types.go | 2 +- 21 files changed, 43 insertions(+), 43 deletions(-) diff --git a/.gitignore b/.gitignore index ce8e70c..a653b58 100644 --- a/.gitignore +++ b/.gitignore @@ -124,4 +124,4 @@ bind/ vendor/ mecab/ *.log -rooibos +api_skeleton diff --git a/.vscode/launch.json b/.vscode/launch.json index 1c5d12e..3b4648e 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -2,18 +2,18 @@ "version": "0.2.0", "configurations": [ { - "name": "rooibos dev", + "name": "api_skeleton dev", "type": "go", "request": "launch", "mode": "debug", "remotePath": "", "port": 2345, "host": "127.0.0.1", - "program": "${workspaceRoot}/rooibos", + "program": "${workspaceRoot}/api_skeleton", "env": {}, "args": [ "-C", - "dev.yml" + "settings.yml" ], "showLog": true } diff --git a/Makefile b/Makefile index 5fc49d3..6c06088 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # This how we want to name the binary output -BINARY=rooibos +BINARY=api_skeleton # These are the values we want to pass for VERSION and BUILD # git tag 1.0.1 @@ -10,7 +10,7 @@ VERSION=`git describe --always` BUILD=`date +%FT%T%z` # Setup the -ldflags option for go build here, interpolate the variable values -LDFLAGS=-ldflags "-w -s -X amuz.es/gogs/infra/rooibos/util.version=${VERSION} -X amuz.es/gogs/infra/rooibos/util.buildDate=${BUILD} " +LDFLAGS=-ldflags "-w -s -X amuz.es/gogs/infra/api_skeleton/util.version=${VERSION} -X amuz.es/gogs/infra/api_skeleton/util.buildDate=${BUILD} " CGO_ENABLED=0 @@ -41,7 +41,7 @@ generate: strip: - upx rooibos + upx api_skeleton # Installs our project: copies binaries install: go install ${LDFLAGS} diff --git a/main.go b/main.go index 570e8bd..33ed86e 100644 --- a/main.go +++ b/main.go @@ -7,10 +7,10 @@ import ( "syscall" "time" - "amuz.es/gogs/infra/rooibos/subsys/http" - "amuz.es/gogs/infra/rooibos/subsys/periodic" + "amuz.es/gogs/infra/api_skeleton/subsys/http" + "amuz.es/gogs/infra/api_skeleton/subsys/periodic" - "amuz.es/gogs/infra/rooibos/util" + "amuz.es/gogs/infra/api_skeleton/util" "gopkg.in/alecthomas/kingpin.v2" "sync" "context" diff --git a/rooibos-dev.service b/rooibos-dev.service index b53a769..452b9c3 100644 --- a/rooibos-dev.service +++ b/rooibos-dev.service @@ -1,5 +1,5 @@ [Unit] -Description=Rooibos API Daemon +Description=Api_skeleton API Daemon Documentation=https://amuz.es After=syslog.target network-online.target Wants=network-online.target @@ -8,8 +8,8 @@ Wants=network-online.target Type=notify Restart=always RestartSec=15 -ExecStart=/opt/eden/service/rooibos/cur-dev/rooibos -C dev.yml -L /opt/eden/service/rooibos/logs/dev -WorkingDirectory=/opt/eden/service/rooibos/cur-dev +ExecStart=/opt/eden/service/api_skeleton/cur-dev/api_skeleton -C dev.yml -L /opt/eden/service/api_skeleton/logs/dev +WorkingDirectory=/opt/eden/service/api_skeleton/cur-dev #ExecReload=/bin/kill -s HUP $MAINPID TimeoutStartSec=5 diff --git a/subsys/db/conn.go b/subsys/db/conn.go index c4ad290..b7ceafe 100644 --- a/subsys/db/conn.go +++ b/subsys/db/conn.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "amuz.es/gogs/infra/rooibos/util" + "amuz.es/gogs/infra/api_skeleton/util" _ "github.com/go-sql-driver/mysql" "github.com/jmoiron/sqlx" errs "github.com/pkg/errors" diff --git a/subsys/db/member.go b/subsys/db/member.go index 0ad600e..4e03c42 100644 --- a/subsys/db/member.go +++ b/subsys/db/member.go @@ -3,7 +3,7 @@ package db import ( "bytes" - "amuz.es/gogs/infra/rooibos/enums" + "amuz.es/gogs/infra/api_skeleton/enums" "database/sql" "strconv" diff --git a/subsys/http/init.go b/subsys/http/init.go index bdcc22a..680e7e2 100644 --- a/subsys/http/init.go +++ b/subsys/http/init.go @@ -6,13 +6,13 @@ import ( "time" "net/http" - "amuz.es/gogs/infra/rooibos/subsys/http/middleware/logging" - "amuz.es/gogs/infra/rooibos/subsys/http/middleware/recovery" - "amuz.es/gogs/infra/rooibos/util" + "amuz.es/gogs/infra/api_skeleton/subsys/http/middleware/logging" + "amuz.es/gogs/infra/api_skeleton/subsys/http/middleware/recovery" + "amuz.es/gogs/infra/api_skeleton/util" "github.com/gin-gonic/gin" errs "github.com/pkg/errors" - "amuz.es/gogs/infra/rooibos/subsys/http/route" + "amuz.es/gogs/infra/api_skeleton/subsys/http/route" "github.com/mkevac/debugcharts" "log" "context" diff --git a/subsys/http/middleware/logging/middleware.go b/subsys/http/middleware/logging/middleware.go index ba410be..1112a7a 100644 --- a/subsys/http/middleware/logging/middleware.go +++ b/subsys/http/middleware/logging/middleware.go @@ -9,8 +9,8 @@ import ( "strconv" "time" - "amuz.es/gogs/infra/rooibos/subsys/http/iface" - "amuz.es/gogs/infra/rooibos/util" + "amuz.es/gogs/infra/api_skeleton/subsys/http/iface" + "amuz.es/gogs/infra/api_skeleton/util" "github.com/gin-gonic/gin" ) diff --git a/subsys/http/middleware/recovery/middleware.go b/subsys/http/middleware/recovery/middleware.go index 2698f1e..7c054e6 100644 --- a/subsys/http/middleware/recovery/middleware.go +++ b/subsys/http/middleware/recovery/middleware.go @@ -9,8 +9,8 @@ import ( "runtime" "strings" - "amuz.es/gogs/infra/rooibos/subsys/http/iface" - "amuz.es/gogs/infra/rooibos/util" + "amuz.es/gogs/infra/api_skeleton/subsys/http/iface" + "amuz.es/gogs/infra/api_skeleton/util" "github.com/gin-gonic/gin" "github.com/sirupsen/logrus" ) diff --git a/subsys/http/route/index.go b/subsys/http/route/index.go index 1d201b5..0050a0c 100644 --- a/subsys/http/route/index.go +++ b/subsys/http/route/index.go @@ -3,13 +3,13 @@ package route import ( "net/http" - "amuz.es/gogs/infra/rooibos/subsys/http/iface" - "amuz.es/gogs/infra/rooibos/util" - common_iface "amuz.es/gogs/infra/rooibos/util/iface" + "amuz.es/gogs/infra/api_skeleton/subsys/http/iface" + "amuz.es/gogs/infra/api_skeleton/util" + common_iface "amuz.es/gogs/infra/api_skeleton/util/iface" "github.com/gin-gonic/gin" - "amuz.es/gogs/infra/rooibos/subsys/db" + "amuz.es/gogs/infra/api_skeleton/subsys/db" "time" - "amuz.es/gogs/infra/rooibos/enums" + "amuz.es/gogs/infra/api_skeleton/enums" ) func Index(c *gin.Context) { diff --git a/subsys/http/route/metric.go b/subsys/http/route/metric.go index e6952b2..d2fb6ef 100644 --- a/subsys/http/route/metric.go +++ b/subsys/http/route/metric.go @@ -5,9 +5,9 @@ import ( "runtime" "time" - "amuz.es/gogs/infra/rooibos/subsys/http/iface" - "amuz.es/gogs/infra/rooibos/subsys/http/middleware/logging" - "amuz.es/gogs/infra/rooibos/util" + "amuz.es/gogs/infra/api_skeleton/subsys/http/iface" + "amuz.es/gogs/infra/api_skeleton/subsys/http/middleware/logging" + "amuz.es/gogs/infra/api_skeleton/util" "github.com/gin-gonic/gin" ) diff --git a/subsys/http/route/services.go b/subsys/http/route/services.go index fbcc09c..a3a8eb3 100644 --- a/subsys/http/route/services.go +++ b/subsys/http/route/services.go @@ -4,7 +4,7 @@ import ( "net/http" "time" - "amuz.es/gogs/infra/rooibos/util" + "amuz.es/gogs/infra/api_skeleton/util" ) var logger = util.NewLogger("route") diff --git a/subsys/periodic/init.go b/subsys/periodic/init.go index 9a40dab..cda2a49 100644 --- a/subsys/periodic/init.go +++ b/subsys/periodic/init.go @@ -9,7 +9,7 @@ import ( "sync/atomic" - "amuz.es/gogs/infra/rooibos/util" + "amuz.es/gogs/infra/api_skeleton/util" "context" ) diff --git a/subsys/redis/app_token_data.pb.go b/subsys/redis/app_token_data.pb.go index 1a62d02..bc64309 100644 --- a/subsys/redis/app_token_data.pb.go +++ b/subsys/redis/app_token_data.pb.go @@ -18,7 +18,7 @@ import math "math" import _ "github.com/gogo/protobuf/gogoproto" import _ "github.com/golang/protobuf/ptypes/timestamp" -import amuz_es_gogs_infra_rooibos_util_iface "amuz.es/gogs/infra/rooibos/util/iface" +import amuz_es_gogs_infra_api_skeleton_util_iface "amuz.es/gogs/infra/api_skeleton/util/iface" import time "time" import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" @@ -38,8 +38,8 @@ var _ = time.Kitchen const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type TokenData struct { - ClientId amuz_es_gogs_infra_rooibos_util_iface.UUID `protobuf:"bytes,1,opt,name=ClientId,proto3,customtype=amuz.es/gogs/infra/rooibos/util/iface.UUID" json:"client_id"` - RefreshToken amuz_es_gogs_infra_rooibos_util_iface.UUID `protobuf:"bytes,2,opt,name=RefreshToken,proto3,customtype=amuz.es/gogs/infra/rooibos/util/iface.UUID" json:"refresh_token"` + ClientId amuz_es_gogs_infra_api_skeleton_util_iface.UUID `protobuf:"bytes,1,opt,name=ClientId,proto3,customtype=amuz.es/gogs/infra/api_skeleton/util/iface.UUID" json:"client_id"` + RefreshToken amuz_es_gogs_infra_api_skeleton_util_iface.UUID `protobuf:"bytes,2,opt,name=RefreshToken,proto3,customtype=amuz.es/gogs/infra/api_skeleton/util/iface.UUID" json:"refresh_token"` MemberId uint64 `protobuf:"fixed64,3,opt,name=MemberId,proto3" json:"member_id"` CreatedAt time.Time `protobuf:"bytes,4,opt,name=CreatedAt,stdtime" json:"created_at"` } diff --git a/subsys/redis/app_token_data.proto b/subsys/redis/app_token_data.proto index e696528..c423bb3 100644 --- a/subsys/redis/app_token_data.proto +++ b/subsys/redis/app_token_data.proto @@ -5,12 +5,12 @@ import "google/protobuf/timestamp.proto"; message TokenData { bytes ClientId =1 [ - (gogoproto.customtype) = "amuz.es/gogs/infra/rooibos/util/iface.UUID", + (gogoproto.customtype) = "amuz.es/gogs/infra/api_skeleton/util/iface.UUID", (gogoproto.jsontag) = "client_id", (gogoproto.nullable) = false ]; bytes RefreshToken =2 [ - (gogoproto.customtype) = "amuz.es/gogs/infra/rooibos/util/iface.UUID", + (gogoproto.customtype) = "amuz.es/gogs/infra/api_skeleton/util/iface.UUID", (gogoproto.jsontag) = "refresh_token", (gogoproto.nullable) = false ]; diff --git a/subsys/redis/app_token_service.go b/subsys/redis/app_token_service.go index f94130d..aa60630 100644 --- a/subsys/redis/app_token_service.go +++ b/subsys/redis/app_token_service.go @@ -5,7 +5,7 @@ import ( "fmt" "strconv" - "amuz.es/gogs/infra/rooibos/util/iface" + "amuz.es/gogs/infra/api_skeleton/util/iface" "github.com/garyburd/redigo/redis" ) diff --git a/subsys/redis/conn.go b/subsys/redis/conn.go index 4424196..976d6a6 100644 --- a/subsys/redis/conn.go +++ b/subsys/redis/conn.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "amuz.es/gogs/infra/rooibos/util" + "amuz.es/gogs/infra/api_skeleton/util" "github.com/garyburd/redigo/redis" "github.com/youtube/vitess/go/pools" "golang.org/x/net/context" diff --git a/subsys/redis/serialize.go b/subsys/redis/serialize.go index 1fab4bd..0a7ee52 100644 --- a/subsys/redis/serialize.go +++ b/subsys/redis/serialize.go @@ -1,7 +1,7 @@ package redis import ( - "amuz.es/gogs/infra/rooibos/util/iface" + "amuz.es/gogs/infra/api_skeleton/util/iface" "github.com/garyburd/redigo/redis" ) diff --git a/util/config.go b/util/config.go index ebda2cb..fca841c 100644 --- a/util/config.go +++ b/util/config.go @@ -56,7 +56,7 @@ func (c config) BuildDate() string { return buildDate } -const name = "Rooibos" +const name = "Api_skeleton" var ( buildDate string diff --git a/util/iface/types.go b/util/iface/types.go index 911fc51..350d15c 100644 --- a/util/iface/types.go +++ b/util/iface/types.go @@ -1,7 +1,7 @@ package iface import ( - "amuz.es/gogs/infra/rooibos/util" + "amuz.es/gogs/infra/api_skeleton/util" "github.com/google/uuid" )