mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-03-01 00:35:36 +08:00
init commit
This commit is contained in:
11
service/gm-hk4e/cmd/application.toml
Normal file
11
service/gm-hk4e/cmd/application.toml
Normal file
@@ -0,0 +1,11 @@
|
||||
http_port = 9004
|
||||
|
||||
[logger]
|
||||
level = "DEBUG"
|
||||
method = "CONSOLE"
|
||||
track_line = true
|
||||
|
||||
[air]
|
||||
addr = "air"
|
||||
port = 8086
|
||||
service_name = "gm-hk4e-app"
|
||||
48
service/gm-hk4e/cmd/main.go
Normal file
48
service/gm-hk4e/cmd/main.go
Normal file
@@ -0,0 +1,48 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"flswld.com/common/config"
|
||||
"flswld.com/light"
|
||||
"flswld.com/logger"
|
||||
"gm-hk4e/controller"
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
"time"
|
||||
)
|
||||
|
||||
func main() {
|
||||
filePath := "./application.toml"
|
||||
config.InitConfig(filePath)
|
||||
|
||||
logger.InitLogger()
|
||||
logger.LOG.Info("gm hk4e start")
|
||||
|
||||
httpProvider := light.NewHttpProvider()
|
||||
|
||||
// 认证服务
|
||||
rpcWaterAuthConsumer := light.NewRpcConsumer("water-auth")
|
||||
|
||||
rpcHk4eGatewayConsumer := light.NewRpcConsumer("hk4e-gateway")
|
||||
|
||||
_ = controller.NewController(rpcWaterAuthConsumer, rpcHk4eGatewayConsumer)
|
||||
|
||||
c := make(chan os.Signal, 1)
|
||||
signal.Notify(c, syscall.SIGHUP, syscall.SIGQUIT, syscall.SIGTERM, syscall.SIGINT)
|
||||
for {
|
||||
s := <-c
|
||||
logger.LOG.Info("get a signal %s", s.String())
|
||||
switch s {
|
||||
case syscall.SIGQUIT, syscall.SIGTERM, syscall.SIGINT:
|
||||
rpcWaterAuthConsumer.CloseRpcConsumer()
|
||||
rpcHk4eGatewayConsumer.CloseRpcConsumer()
|
||||
httpProvider.CloseHttpProvider()
|
||||
logger.LOG.Info("gm hk4e exit")
|
||||
time.Sleep(time.Second)
|
||||
return
|
||||
case syscall.SIGHUP:
|
||||
default:
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
75
service/gm-hk4e/controller/controller.go
Normal file
75
service/gm-hk4e/controller/controller.go
Normal file
@@ -0,0 +1,75 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"flswld.com/common/config"
|
||||
"flswld.com/light"
|
||||
waterAuth "flswld.com/water-api/auth"
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type Controller struct {
|
||||
rpcWaterAuthConsumer *light.Consumer
|
||||
rpcHk4eGatewayConsumer *light.Consumer
|
||||
}
|
||||
|
||||
func NewController(rpcWaterAuthConsumer *light.Consumer, rpcHk4eGatewayConsumer *light.Consumer) (r *Controller) {
|
||||
r = new(Controller)
|
||||
r.rpcWaterAuthConsumer = rpcWaterAuthConsumer
|
||||
r.rpcHk4eGatewayConsumer = rpcHk4eGatewayConsumer
|
||||
go r.registerRouter()
|
||||
return r
|
||||
}
|
||||
|
||||
func (c *Controller) getAccessToken(context *gin.Context) string {
|
||||
accessToken := context.GetHeader("Authorization")
|
||||
divIndex := strings.Index(accessToken, " ")
|
||||
if divIndex > 0 {
|
||||
payload := accessToken[divIndex+1:]
|
||||
return payload
|
||||
} else {
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
// access_token鉴权
|
||||
func (c *Controller) authorize() gin.HandlerFunc {
|
||||
return func(context *gin.Context) {
|
||||
valid, err := waterAuth.WaterVerifyAccessToken(c.rpcWaterAuthConsumer, c.getAccessToken(context))
|
||||
if err == nil && valid == true {
|
||||
// 验证通过
|
||||
context.Next()
|
||||
return
|
||||
}
|
||||
// 验证不通过
|
||||
context.Abort()
|
||||
context.JSON(http.StatusOK, gin.H{
|
||||
"code": "10001",
|
||||
"msg": "没有访问权限",
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func (c *Controller) registerRouter() {
|
||||
if config.CONF.Logger.Level == "DEBUG" {
|
||||
gin.SetMode(gin.DebugMode)
|
||||
} else {
|
||||
gin.SetMode(gin.ReleaseMode)
|
||||
}
|
||||
engine := gin.Default()
|
||||
// gacha
|
||||
engine.GET("/gm/gacha", c.gacha)
|
||||
engine.GET("/gm/gacha/details", c.gachaDetails)
|
||||
engine.Use(c.authorize())
|
||||
// gate
|
||||
engine.POST("/gm/gate/state", c.changeGateState)
|
||||
engine.POST("/gm/gate/kick", c.kickPlayer)
|
||||
engine.GET("/gm/gate/online", c.getOnlineUser)
|
||||
engine.POST("/gm/gate/forbid", c.forbidUser)
|
||||
engine.POST("/gm/gate/forbid/cancel", c.unForbidUser)
|
||||
port := strconv.FormatInt(int64(config.CONF.HttpPort), 10)
|
||||
portStr := ":" + port
|
||||
_ = engine.Run(portStr)
|
||||
}
|
||||
65
service/gm-hk4e/controller/gacha_controller.go
Normal file
65
service/gm-hk4e/controller/gacha_controller.go
Normal file
@@ -0,0 +1,65 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"flswld.com/common/entity/dto"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/golang-jwt/jwt/v4"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
type UserInfo struct {
|
||||
UserId uint32 `json:"userId"`
|
||||
jwt.RegisteredClaims
|
||||
}
|
||||
|
||||
func (c *Controller) gacha(context *gin.Context) {
|
||||
jwtStr := context.Query("jwt")
|
||||
token, err := jwt.ParseWithClaims(jwtStr, new(UserInfo), func(token *jwt.Token) (interface{}, error) {
|
||||
return []byte("flswld"), nil
|
||||
})
|
||||
if err != nil {
|
||||
context.JSON(http.StatusOK, dto.NewResponseResult(10005, "验签失败", nil))
|
||||
return
|
||||
}
|
||||
if !token.Valid {
|
||||
context.JSON(http.StatusOK, dto.NewResponseResult(10005, "验签失败", nil))
|
||||
return
|
||||
}
|
||||
info, ok := token.Claims.(*UserInfo)
|
||||
if !ok {
|
||||
context.JSON(http.StatusOK, dto.NewResponseResult(10005, "验签失败", nil))
|
||||
return
|
||||
}
|
||||
gachaType := context.Query("gachaType")
|
||||
rsp := map[string]any{
|
||||
"uid": info.UserId,
|
||||
"gachaType": gachaType,
|
||||
}
|
||||
context.JSON(http.StatusOK, dto.NewResponseResult(0, "成功", rsp))
|
||||
}
|
||||
|
||||
func (c *Controller) gachaDetails(context *gin.Context) {
|
||||
jwtStr := context.Query("jwt")
|
||||
token, err := jwt.ParseWithClaims(jwtStr, new(UserInfo), func(token *jwt.Token) (interface{}, error) {
|
||||
return []byte("flswld"), nil
|
||||
})
|
||||
if err != nil {
|
||||
context.JSON(http.StatusOK, dto.NewResponseResult(10005, "验签失败", nil))
|
||||
return
|
||||
}
|
||||
if !token.Valid {
|
||||
context.JSON(http.StatusOK, dto.NewResponseResult(10005, "验签失败", nil))
|
||||
return
|
||||
}
|
||||
info, ok := token.Claims.(*UserInfo)
|
||||
if !ok {
|
||||
context.JSON(http.StatusOK, dto.NewResponseResult(10005, "验签失败", nil))
|
||||
return
|
||||
}
|
||||
scheduleId := context.Query("scheduleId")
|
||||
rsp := map[string]any{
|
||||
"uid": info.UserId,
|
||||
"scheduleId": scheduleId,
|
||||
}
|
||||
context.JSON(http.StatusOK, dto.NewResponseResult(0, "成功", rsp))
|
||||
}
|
||||
161
service/gm-hk4e/controller/gate_controller.go
Normal file
161
service/gm-hk4e/controller/gate_controller.go
Normal file
@@ -0,0 +1,161 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"flswld.com/common/entity/dto"
|
||||
"flswld.com/gate-hk4e-api/gm"
|
||||
waterAuth "flswld.com/water-api/auth"
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
func (c *Controller) changeGateState(context *gin.Context) {
|
||||
accessToken := c.getAccessToken(context)
|
||||
user, err := waterAuth.WaterQueryUserByAccessToken(c.rpcWaterAuthConsumer, accessToken)
|
||||
if err != nil {
|
||||
context.JSON(http.StatusOK, dto.NewResponseResult(1001, "服务器内部错误", nil))
|
||||
return
|
||||
}
|
||||
if !user.IsAdmin {
|
||||
context.JSON(http.StatusOK, dto.NewResponseResult(10001, "没有访问权限", nil))
|
||||
return
|
||||
}
|
||||
stateStr := context.Query("state")
|
||||
state, err := strconv.ParseBool(stateStr)
|
||||
if err != nil {
|
||||
context.JSON(http.StatusOK, dto.NewResponseResult(10003, "参数错误", nil))
|
||||
return
|
||||
}
|
||||
var res bool
|
||||
ok := c.rpcHk4eGatewayConsumer.CallFunction("RpcManager", "ChangeGateOpenState", &state, &res)
|
||||
if ok == true && res == true {
|
||||
context.JSON(http.StatusOK, dto.NewResponseResult(0, "操作成功", nil))
|
||||
} else {
|
||||
context.JSON(http.StatusOK, dto.NewResponseResult(-1, "操作失败", nil))
|
||||
}
|
||||
}
|
||||
|
||||
func (c *Controller) kickPlayer(context *gin.Context) {
|
||||
accessToken := c.getAccessToken(context)
|
||||
user, err := waterAuth.WaterQueryUserByAccessToken(c.rpcWaterAuthConsumer, accessToken)
|
||||
if err != nil {
|
||||
context.JSON(http.StatusOK, dto.NewResponseResult(1001, "服务器内部错误", nil))
|
||||
return
|
||||
}
|
||||
if !user.IsAdmin {
|
||||
context.JSON(http.StatusOK, dto.NewResponseResult(10001, "没有访问权限", nil))
|
||||
return
|
||||
}
|
||||
uidStr := context.Query("uid")
|
||||
reasonStr := context.Query("reason")
|
||||
uid, err := strconv.ParseInt(uidStr, 10, 64)
|
||||
if err != nil {
|
||||
context.JSON(http.StatusOK, dto.NewResponseResult(10003, "参数错误", nil))
|
||||
return
|
||||
}
|
||||
reason, err := strconv.ParseInt(reasonStr, 10, 64)
|
||||
if err != nil {
|
||||
context.JSON(http.StatusOK, dto.NewResponseResult(10003, "参数错误", nil))
|
||||
return
|
||||
}
|
||||
info := new(gm.KickPlayerInfo)
|
||||
info.UserId = uint32(uid)
|
||||
info.Reason = uint32(reason)
|
||||
var result bool
|
||||
ok := c.rpcHk4eGatewayConsumer.CallFunction("RpcManager", "KickPlayer", &info, &result)
|
||||
if ok == true && result == true {
|
||||
context.JSON(http.StatusOK, dto.NewResponseResult(0, "操作成功", nil))
|
||||
} else {
|
||||
context.JSON(http.StatusOK, dto.NewResponseResult(-1, "操作失败", nil))
|
||||
}
|
||||
}
|
||||
|
||||
func (c *Controller) getOnlineUser(context *gin.Context) {
|
||||
accessToken := c.getAccessToken(context)
|
||||
user, err := waterAuth.WaterQueryUserByAccessToken(c.rpcWaterAuthConsumer, accessToken)
|
||||
if err != nil {
|
||||
context.JSON(http.StatusOK, dto.NewResponseResult(1001, "服务器内部错误", nil))
|
||||
return
|
||||
}
|
||||
if !user.IsAdmin {
|
||||
context.JSON(http.StatusOK, dto.NewResponseResult(10001, "没有访问权限", nil))
|
||||
return
|
||||
}
|
||||
uidStr := context.Query("uid")
|
||||
uid, err := strconv.ParseInt(uidStr, 10, 64)
|
||||
if err != nil {
|
||||
context.JSON(http.StatusOK, dto.NewResponseResult(10003, "参数错误", nil))
|
||||
return
|
||||
}
|
||||
list := new(gm.OnlineUserList)
|
||||
list.UserList = make([]*gm.OnlineUserInfo, 0)
|
||||
userId := uint32(uid)
|
||||
ok := c.rpcHk4eGatewayConsumer.CallFunction("RpcManager", "GetOnlineUser", &userId, &list)
|
||||
if ok {
|
||||
context.JSON(http.StatusOK, dto.NewResponseResult(0, "查询成功", list))
|
||||
} else {
|
||||
context.JSON(http.StatusOK, dto.NewResponseResult(-1, "查询失败", nil))
|
||||
}
|
||||
}
|
||||
|
||||
func (c *Controller) forbidUser(context *gin.Context) {
|
||||
accessToken := c.getAccessToken(context)
|
||||
user, err := waterAuth.WaterQueryUserByAccessToken(c.rpcWaterAuthConsumer, accessToken)
|
||||
if err != nil {
|
||||
context.JSON(http.StatusOK, dto.NewResponseResult(1001, "服务器内部错误", nil))
|
||||
return
|
||||
}
|
||||
if !user.IsAdmin {
|
||||
context.JSON(http.StatusOK, dto.NewResponseResult(10001, "没有访问权限", nil))
|
||||
return
|
||||
}
|
||||
uidStr := context.Query("uid")
|
||||
uid, err := strconv.ParseInt(uidStr, 10, 64)
|
||||
if err != nil {
|
||||
context.JSON(http.StatusOK, dto.NewResponseResult(10003, "参数错误", nil))
|
||||
return
|
||||
}
|
||||
endTimeStr := context.Query("endTime")
|
||||
endTime, err := strconv.ParseInt(endTimeStr, 10, 64)
|
||||
if err != nil {
|
||||
context.JSON(http.StatusOK, dto.NewResponseResult(10003, "参数错误", nil))
|
||||
return
|
||||
}
|
||||
info := new(gm.ForbidUserInfo)
|
||||
info.UserId = uint32(uid)
|
||||
info.ForbidEndTime = uint64(endTime)
|
||||
var result bool
|
||||
ok := c.rpcHk4eGatewayConsumer.CallFunction("RpcManager", "ForbidUser", &info, &result)
|
||||
if ok == true && result == true {
|
||||
context.JSON(http.StatusOK, dto.NewResponseResult(0, "操作成功", nil))
|
||||
} else {
|
||||
context.JSON(http.StatusOK, dto.NewResponseResult(-1, "操作失败", nil))
|
||||
}
|
||||
}
|
||||
|
||||
func (c *Controller) unForbidUser(context *gin.Context) {
|
||||
accessToken := c.getAccessToken(context)
|
||||
user, err := waterAuth.WaterQueryUserByAccessToken(c.rpcWaterAuthConsumer, accessToken)
|
||||
if err != nil {
|
||||
context.JSON(http.StatusOK, dto.NewResponseResult(1001, "服务器内部错误", nil))
|
||||
return
|
||||
}
|
||||
if !user.IsAdmin {
|
||||
context.JSON(http.StatusOK, dto.NewResponseResult(10001, "没有访问权限", nil))
|
||||
return
|
||||
}
|
||||
uidStr := context.Query("uid")
|
||||
uid, err := strconv.ParseInt(uidStr, 10, 64)
|
||||
if err != nil {
|
||||
context.JSON(http.StatusOK, dto.NewResponseResult(10003, "参数错误", nil))
|
||||
return
|
||||
}
|
||||
userId := uint32(uid)
|
||||
var result bool
|
||||
ok := c.rpcHk4eGatewayConsumer.CallFunction("RpcManager", "UnForbidUser", &userId, &result)
|
||||
if ok == true && result == true {
|
||||
context.JSON(http.StatusOK, dto.NewResponseResult(0, "操作成功", nil))
|
||||
} else {
|
||||
context.JSON(http.StatusOK, dto.NewResponseResult(-1, "操作失败", nil))
|
||||
}
|
||||
}
|
||||
53
service/gm-hk4e/go.mod
Normal file
53
service/gm-hk4e/go.mod
Normal file
@@ -0,0 +1,53 @@
|
||||
module gm-hk4e
|
||||
|
||||
go 1.19
|
||||
|
||||
require flswld.com/common v0.0.0-incompatible
|
||||
|
||||
replace flswld.com/common => ../../common
|
||||
|
||||
require flswld.com/logger v0.0.0-incompatible
|
||||
|
||||
replace flswld.com/logger => ../../logger
|
||||
|
||||
require flswld.com/air-api v0.0.0-incompatible // indirect
|
||||
|
||||
replace flswld.com/air-api => ../../air-api
|
||||
|
||||
require flswld.com/light v0.0.0-incompatible
|
||||
|
||||
replace flswld.com/light => ../../light
|
||||
|
||||
require flswld.com/gate-hk4e-api v0.0.0-incompatible
|
||||
|
||||
replace flswld.com/gate-hk4e-api => ../../gate-hk4e-api
|
||||
|
||||
require (
|
||||
flswld.com/annie-user-api v0.0.0-incompatible // indirect
|
||||
github.com/BurntSushi/toml v0.3.1 // indirect
|
||||
github.com/gin-contrib/sse v0.1.0 // indirect
|
||||
github.com/go-playground/locales v0.13.0 // indirect
|
||||
github.com/go-playground/universal-translator v0.17.0 // indirect
|
||||
github.com/go-playground/validator/v10 v10.2.0 // indirect
|
||||
github.com/golang/protobuf v1.3.3 // indirect
|
||||
github.com/json-iterator/go v1.1.9 // indirect
|
||||
github.com/leodido/go-urn v1.2.0 // indirect
|
||||
github.com/mattn/go-isatty v0.0.12 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
|
||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 // indirect
|
||||
github.com/ugorji/go/codec v1.1.7 // indirect
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42 // indirect
|
||||
gopkg.in/yaml.v2 v2.2.8 // indirect
|
||||
)
|
||||
|
||||
replace flswld.com/annie-user-api => ../annie-user-api
|
||||
|
||||
require flswld.com/water-api v0.0.0-incompatible
|
||||
|
||||
replace flswld.com/water-api => ../../water-api
|
||||
|
||||
// gin
|
||||
require github.com/gin-gonic/gin v1.6.3
|
||||
|
||||
// jwt
|
||||
require github.com/golang-jwt/jwt/v4 v4.4.0
|
||||
50
service/gm-hk4e/go.sum
Normal file
50
service/gm-hk4e/go.sum
Normal file
@@ -0,0 +1,50 @@
|
||||
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
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/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
|
||||
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
|
||||
github.com/gin-gonic/gin v1.6.3 h1:ahKqKTFpO5KTPHxWZjEdPScmYaGtLo8Y4DMHoEsnp14=
|
||||
github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M=
|
||||
github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A=
|
||||
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
|
||||
github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q=
|
||||
github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
|
||||
github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no=
|
||||
github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA=
|
||||
github.com/go-playground/validator/v10 v10.2.0 h1:KgJ0snyC2R9VXYN2rneOtQcw5aHQB1Vv0sFl1UcHBOY=
|
||||
github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI=
|
||||
github.com/golang-jwt/jwt/v4 v4.4.0 h1:EmVIxB5jzbllGIjiCV5JG4VylbK3KE400tLGLI1cdfU=
|
||||
github.com/golang-jwt/jwt/v4 v4.4.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
|
||||
github.com/golang/protobuf v1.3.3 h1:gyjaxf+svBWX08ZjK86iN9geUJF0H6gp2IRKX6Nf6/I=
|
||||
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns=
|
||||
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y=
|
||||
github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
|
||||
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
|
||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 h1:Esafd1046DLDQ0W1YjYsBW+p8U2u7vzgW2SQVmlNazg=
|
||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
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/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
|
||||
github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs=
|
||||
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42 h1:vEOn+mP2zCOVzKckCZy6YsCtDblrpj/w7B9nxGNELpg=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
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/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
|
||||
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
Reference in New Issue
Block a user