네이밍 변경
This commit is contained in:
parent
b71f88cbf7
commit
4e2702265a
|
@ -124,4 +124,4 @@ bind/
|
||||||
vendor/
|
vendor/
|
||||||
mecab/
|
mecab/
|
||||||
*.log
|
*.log
|
||||||
rooibos
|
api_skeleton
|
||||||
|
|
|
@ -2,18 +2,18 @@
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"name": "rooibos dev",
|
"name": "api_skeleton dev",
|
||||||
"type": "go",
|
"type": "go",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"mode": "debug",
|
"mode": "debug",
|
||||||
"remotePath": "",
|
"remotePath": "",
|
||||||
"port": 2345,
|
"port": 2345,
|
||||||
"host": "127.0.0.1",
|
"host": "127.0.0.1",
|
||||||
"program": "${workspaceRoot}/rooibos",
|
"program": "${workspaceRoot}/api_skeleton",
|
||||||
"env": {},
|
"env": {},
|
||||||
"args": [
|
"args": [
|
||||||
"-C",
|
"-C",
|
||||||
"dev.yml"
|
"settings.yml"
|
||||||
],
|
],
|
||||||
"showLog": true
|
"showLog": true
|
||||||
}
|
}
|
||||||
|
|
6
Makefile
6
Makefile
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
|
|
||||||
# This how we want to name the binary output
|
# 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
|
# These are the values we want to pass for VERSION and BUILD
|
||||||
# git tag 1.0.1
|
# git tag 1.0.1
|
||||||
|
@ -10,7 +10,7 @@ VERSION=`git describe --always`
|
||||||
BUILD=`date +%FT%T%z`
|
BUILD=`date +%FT%T%z`
|
||||||
|
|
||||||
# Setup the -ldflags option for go build here, interpolate the variable values
|
# 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
|
CGO_ENABLED=0
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ generate:
|
||||||
|
|
||||||
|
|
||||||
strip:
|
strip:
|
||||||
upx rooibos
|
upx api_skeleton
|
||||||
# Installs our project: copies binaries
|
# Installs our project: copies binaries
|
||||||
install:
|
install:
|
||||||
go install ${LDFLAGS}
|
go install ${LDFLAGS}
|
||||||
|
|
6
main.go
6
main.go
|
@ -7,10 +7,10 @@ import (
|
||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"amuz.es/gogs/infra/rooibos/subsys/http"
|
"amuz.es/gogs/infra/api_skeleton/subsys/http"
|
||||||
"amuz.es/gogs/infra/rooibos/subsys/periodic"
|
"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"
|
"gopkg.in/alecthomas/kingpin.v2"
|
||||||
"sync"
|
"sync"
|
||||||
"context"
|
"context"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Rooibos API Daemon
|
Description=Api_skeleton API Daemon
|
||||||
Documentation=https://amuz.es
|
Documentation=https://amuz.es
|
||||||
After=syslog.target network-online.target
|
After=syslog.target network-online.target
|
||||||
Wants=network-online.target
|
Wants=network-online.target
|
||||||
|
@ -8,8 +8,8 @@ Wants=network-online.target
|
||||||
Type=notify
|
Type=notify
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=15
|
RestartSec=15
|
||||||
ExecStart=/opt/eden/service/rooibos/cur-dev/rooibos -C dev.yml -L /opt/eden/service/rooibos/logs/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/rooibos/cur-dev
|
WorkingDirectory=/opt/eden/service/api_skeleton/cur-dev
|
||||||
#ExecReload=/bin/kill -s HUP $MAINPID
|
#ExecReload=/bin/kill -s HUP $MAINPID
|
||||||
TimeoutStartSec=5
|
TimeoutStartSec=5
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"amuz.es/gogs/infra/rooibos/util"
|
"amuz.es/gogs/infra/api_skeleton/util"
|
||||||
_ "github.com/go-sql-driver/mysql"
|
_ "github.com/go-sql-driver/mysql"
|
||||||
"github.com/jmoiron/sqlx"
|
"github.com/jmoiron/sqlx"
|
||||||
errs "github.com/pkg/errors"
|
errs "github.com/pkg/errors"
|
||||||
|
|
|
@ -3,7 +3,7 @@ package db
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
|
||||||
"amuz.es/gogs/infra/rooibos/enums"
|
"amuz.es/gogs/infra/api_skeleton/enums"
|
||||||
|
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
|
@ -6,13 +6,13 @@ import (
|
||||||
"time"
|
"time"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"amuz.es/gogs/infra/rooibos/subsys/http/middleware/logging"
|
"amuz.es/gogs/infra/api_skeleton/subsys/http/middleware/logging"
|
||||||
"amuz.es/gogs/infra/rooibos/subsys/http/middleware/recovery"
|
"amuz.es/gogs/infra/api_skeleton/subsys/http/middleware/recovery"
|
||||||
"amuz.es/gogs/infra/rooibos/util"
|
"amuz.es/gogs/infra/api_skeleton/util"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
errs "github.com/pkg/errors"
|
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"
|
"github.com/mkevac/debugcharts"
|
||||||
"log"
|
"log"
|
||||||
"context"
|
"context"
|
||||||
|
|
|
@ -9,8 +9,8 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"amuz.es/gogs/infra/rooibos/subsys/http/iface"
|
"amuz.es/gogs/infra/api_skeleton/subsys/http/iface"
|
||||||
"amuz.es/gogs/infra/rooibos/util"
|
"amuz.es/gogs/infra/api_skeleton/util"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,8 @@ import (
|
||||||
"runtime"
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"amuz.es/gogs/infra/rooibos/subsys/http/iface"
|
"amuz.es/gogs/infra/api_skeleton/subsys/http/iface"
|
||||||
"amuz.es/gogs/infra/rooibos/util"
|
"amuz.es/gogs/infra/api_skeleton/util"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
|
@ -3,13 +3,13 @@ package route
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"amuz.es/gogs/infra/rooibos/subsys/http/iface"
|
"amuz.es/gogs/infra/api_skeleton/subsys/http/iface"
|
||||||
"amuz.es/gogs/infra/rooibos/util"
|
"amuz.es/gogs/infra/api_skeleton/util"
|
||||||
common_iface "amuz.es/gogs/infra/rooibos/util/iface"
|
common_iface "amuz.es/gogs/infra/api_skeleton/util/iface"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"amuz.es/gogs/infra/rooibos/subsys/db"
|
"amuz.es/gogs/infra/api_skeleton/subsys/db"
|
||||||
"time"
|
"time"
|
||||||
"amuz.es/gogs/infra/rooibos/enums"
|
"amuz.es/gogs/infra/api_skeleton/enums"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Index(c *gin.Context) {
|
func Index(c *gin.Context) {
|
||||||
|
|
|
@ -5,9 +5,9 @@ import (
|
||||||
"runtime"
|
"runtime"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"amuz.es/gogs/infra/rooibos/subsys/http/iface"
|
"amuz.es/gogs/infra/api_skeleton/subsys/http/iface"
|
||||||
"amuz.es/gogs/infra/rooibos/subsys/http/middleware/logging"
|
"amuz.es/gogs/infra/api_skeleton/subsys/http/middleware/logging"
|
||||||
"amuz.es/gogs/infra/rooibos/util"
|
"amuz.es/gogs/infra/api_skeleton/util"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"amuz.es/gogs/infra/rooibos/util"
|
"amuz.es/gogs/infra/api_skeleton/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
var logger = util.NewLogger("route")
|
var logger = util.NewLogger("route")
|
||||||
|
|
|
@ -9,7 +9,7 @@ import (
|
||||||
|
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
|
|
||||||
"amuz.es/gogs/infra/rooibos/util"
|
"amuz.es/gogs/infra/api_skeleton/util"
|
||||||
"context"
|
"context"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ import math "math"
|
||||||
import _ "github.com/gogo/protobuf/gogoproto"
|
import _ "github.com/gogo/protobuf/gogoproto"
|
||||||
import _ "github.com/golang/protobuf/ptypes/timestamp"
|
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 time "time"
|
||||||
|
|
||||||
import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
|
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
|
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
|
||||||
|
|
||||||
type TokenData struct {
|
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"`
|
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_rooibos_util_iface.UUID `protobuf:"bytes,2,opt,name=RefreshToken,proto3,customtype=amuz.es/gogs/infra/rooibos/util/iface.UUID" json:"refresh_token"`
|
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"`
|
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"`
|
CreatedAt time.Time `protobuf:"bytes,4,opt,name=CreatedAt,stdtime" json:"created_at"`
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,12 +5,12 @@ import "google/protobuf/timestamp.proto";
|
||||||
|
|
||||||
message TokenData {
|
message TokenData {
|
||||||
bytes ClientId =1 [
|
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.jsontag) = "client_id",
|
||||||
(gogoproto.nullable) = false
|
(gogoproto.nullable) = false
|
||||||
];
|
];
|
||||||
bytes RefreshToken =2 [
|
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.jsontag) = "refresh_token",
|
||||||
(gogoproto.nullable) = false
|
(gogoproto.nullable) = false
|
||||||
];
|
];
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"amuz.es/gogs/infra/rooibos/util/iface"
|
"amuz.es/gogs/infra/api_skeleton/util/iface"
|
||||||
"github.com/garyburd/redigo/redis"
|
"github.com/garyburd/redigo/redis"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"amuz.es/gogs/infra/rooibos/util"
|
"amuz.es/gogs/infra/api_skeleton/util"
|
||||||
"github.com/garyburd/redigo/redis"
|
"github.com/garyburd/redigo/redis"
|
||||||
"github.com/youtube/vitess/go/pools"
|
"github.com/youtube/vitess/go/pools"
|
||||||
"golang.org/x/net/context"
|
"golang.org/x/net/context"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package redis
|
package redis
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"amuz.es/gogs/infra/rooibos/util/iface"
|
"amuz.es/gogs/infra/api_skeleton/util/iface"
|
||||||
"github.com/garyburd/redigo/redis"
|
"github.com/garyburd/redigo/redis"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ func (c config) BuildDate() string {
|
||||||
return buildDate
|
return buildDate
|
||||||
}
|
}
|
||||||
|
|
||||||
const name = "Rooibos"
|
const name = "Api_skeleton"
|
||||||
|
|
||||||
var (
|
var (
|
||||||
buildDate string
|
buildDate string
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package iface
|
package iface
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"amuz.es/gogs/infra/rooibos/util"
|
"amuz.es/gogs/infra/api_skeleton/util"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue