first commit
This commit is contained in:
commit
271dd8671f
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.idea
|
1
README.md
Normal file
1
README.md
Normal file
@ -0,0 +1 @@
|
||||
goctl api go -api .\game_open_api\app_user.api -dir .\game_open_api\ --style=goZero
|
47
docker-compose.yaml
Normal file
47
docker-compose.yaml
Normal file
@ -0,0 +1,47 @@
|
||||
version: "3"
|
||||
services:
|
||||
mysql:
|
||||
image: mysql
|
||||
container_name: mysql
|
||||
restart: always
|
||||
command: [
|
||||
'--character-set-server=utf8mb4',
|
||||
'--collation-server=utf8mb4_general_ci',
|
||||
'--explicit_defaults_for_timestamp=true',
|
||||
'--lower_case_table_names=1'
|
||||
]
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: youtu!0113
|
||||
MYSQL_INITDB_SKIP_TZINFO: "Asia/Shanghai"
|
||||
MYSQL_DATABASE: ecpm
|
||||
volumes:
|
||||
#数据目录,要确保先创建好
|
||||
- ./data/mysql/data:/var/lib/mysql
|
||||
- ./data/mysql/logs:/var/log/mysql
|
||||
##初始化的脚本,初始化我们存放的init.sql文件
|
||||
- ./sql:/docker-entrypoint-initdb.d/
|
||||
- ./data/mysql/conf:/etc/mysql/conf.d
|
||||
ports:
|
||||
- "3306:3306"
|
||||
healthcheck:
|
||||
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost", "-uyoutu", "-pyoutu!0113" ]
|
||||
interval: 6s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
#network_mode: host
|
||||
redis:
|
||||
image: redis
|
||||
restart: always
|
||||
hostname: redis
|
||||
container_name: redis
|
||||
privileged: true
|
||||
ports:
|
||||
- "6379:6379"
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
volumes:
|
||||
- ./data/redis:/data
|
||||
# - ./conf/redis.conf:/etc/redis/redis.conf
|
||||
- ./data/redis/logs:/logs
|
||||
# command: [ "redis-server","/etc/redis/redis.conf" ]
|
||||
|
29
game_open_api/app_user.api
Normal file
29
game_open_api/app_user.api
Normal file
@ -0,0 +1,29 @@
|
||||
syntax = "v1"
|
||||
|
||||
import (
|
||||
"game.api"
|
||||
"douyin.api"
|
||||
"wechat.api"
|
||||
)
|
||||
|
||||
type UserId {
|
||||
UserId uint64 `json:"userId"`
|
||||
}
|
||||
|
||||
type SetAppUserRequest {
|
||||
Id uint64 `json:"id"`
|
||||
Nickname string `json:"nickname"`
|
||||
Avatar string `json:"avatar"`
|
||||
}
|
||||
|
||||
@server (
|
||||
group: app_user
|
||||
prefix: /v1/app_user
|
||||
timeout: 3s // 对当前 Foo 语法块下的所有路由进行超时配置,不需要则请删除此行
|
||||
maxBytes: 1048576 // 对当前 Foo 语法块下的所有路由添加请求体大小控制,单位为 byte,goctl 版本 >= 1.5.0 才支持
|
||||
)
|
||||
service game_open_api-api {
|
||||
@handler appUserSetUser
|
||||
post /set_app_account (SetAppUserRequest) returns (UserId)
|
||||
}
|
||||
|
30
game_open_api/douyin.api
Normal file
30
game_open_api/douyin.api
Normal file
@ -0,0 +1,30 @@
|
||||
syntax = "v1"
|
||||
|
||||
|
||||
type DouyinCode2UserIdRequest {
|
||||
AppId string `form:"appId"`
|
||||
Code string `form:"code,optional"`
|
||||
AnonymousCode string `form:"anonymousCode,optional"`
|
||||
}
|
||||
|
||||
type GetEcpmRequest {
|
||||
AppId string `form:"appId"`
|
||||
UserId uint64 `form:"userId"`
|
||||
}
|
||||
|
||||
|
||||
@server(
|
||||
group: douyin
|
||||
prefix: /v1/douyin // 对当前 Foo 语法块下的所有路由,新增 /v1 路由前缀,不需要则请删除此行
|
||||
timeout: 3s // 对当前 Foo 语法块下的所有路由进行超时配置,不需要则请删除此行
|
||||
maxBytes: 1048576 // 对当前 Foo 语法块下的所有路由添加请求体大小控制,单位为 byte,goctl 版本 >= 1.5.0 才支持
|
||||
)
|
||||
|
||||
service game_open_api-api {
|
||||
@handler douyinCode2UserId
|
||||
get /code2userId (DouyinCode2UserIdRequest) returns (int64)
|
||||
|
||||
@handler getEcpm
|
||||
get /getEcpm (GetEcpmRequest) returns (bool)
|
||||
}
|
||||
|
8
game_open_api/etc/gameopenapi-api.yaml
Normal file
8
game_open_api/etc/gameopenapi-api.yaml
Normal file
@ -0,0 +1,8 @@
|
||||
Name: game_open_api-api
|
||||
Host: 0.0.0.0
|
||||
Port: 8888
|
||||
DB:
|
||||
DataSource: root:youtu!0113@tcp(localhost:3306)/ecpm?charset=utf8mb4&parseTime=True&loc=Local
|
||||
Cache:
|
||||
- Host: 127.0.0.1:6379
|
||||
type: node
|
26
game_open_api/game.api
Normal file
26
game_open_api/game.api
Normal file
@ -0,0 +1,26 @@
|
||||
syntax = "v1"
|
||||
|
||||
|
||||
|
||||
|
||||
type SetUserGameScoreRequest {
|
||||
AppId string `json:"appId"`
|
||||
Score uint64 `json:"score"`
|
||||
UserId uint64 `json:"userId"`
|
||||
}
|
||||
|
||||
@server (
|
||||
group: game
|
||||
prefix: /v1/game // 对当前 Foo 语法块下的所有路由,新增 /v1 路由前缀,不需要则请删除此行
|
||||
timeout: 3s // 对当前 Foo 语法块下的所有路由进行超时配置,不需要则请删除此行
|
||||
maxBytes: 1048576 // 对当前 Foo 语法块下的所有路由添加请求体大小控制,单位为 byte,goctl 版本 >= 1.5.0 才支持
|
||||
)
|
||||
service game_open_api-api {
|
||||
|
||||
@handler rankingList
|
||||
get /ranking/list
|
||||
|
||||
@handler rankingSetScore
|
||||
post /ranking/set_score (SetUserGameScoreRequest)
|
||||
}
|
||||
|
31
game_open_api/gameOpenApi-Api.go
Normal file
31
game_open_api/gameOpenApi-Api.go
Normal file
@ -0,0 +1,31 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
|
||||
"youtu_server/game_open_api/internal/config"
|
||||
"youtu_server/game_open_api/internal/handler"
|
||||
"youtu_server/game_open_api/internal/svc"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/conf"
|
||||
"github.com/zeromicro/go-zero/rest"
|
||||
)
|
||||
|
||||
var configFile = flag.String("f", "etc/gameOpenApi-Api.yaml", "the config file")
|
||||
|
||||
func main() {
|
||||
flag.Parse()
|
||||
|
||||
var c config.Config
|
||||
conf.MustLoad(*configFile, &c)
|
||||
|
||||
server := rest.MustNewServer(c.RestConf)
|
||||
defer server.Stop()
|
||||
|
||||
ctx := svc.NewServiceContext(c)
|
||||
handler.RegisterHandlers(server, ctx)
|
||||
|
||||
fmt.Printf("Starting server at %s:%d...\n", c.Host, c.Port)
|
||||
server.Start()
|
||||
}
|
35
game_open_api/internal/app_api_helper/app_api_helper.go
Normal file
35
game_open_api/internal/app_api_helper/app_api_helper.go
Normal file
@ -0,0 +1,35 @@
|
||||
package app_api_helper
|
||||
|
||||
import (
|
||||
"context"
|
||||
"gitea.youtukeji.com.cn/xiabin/douyin-openapi/cache"
|
||||
"gitea.youtukeji.com.cn/xiabin/youtu_ecpm/pkg/douyinapi"
|
||||
"gitea.youtukeji.com.cn/xiabin/youtu_ecpm/pkg/wechat_api"
|
||||
"sync"
|
||||
"youtu_server/game_open_api/model"
|
||||
)
|
||||
|
||||
var once sync.Once
|
||||
|
||||
var DouyinCli *douyinapi.DouYinOpenApiClient
|
||||
var WechatCli *wechat_api.WechatApi
|
||||
|
||||
func Init(ctx context.Context, appAccount model.AppAccountModel) {
|
||||
once.Do(func() {
|
||||
DouyinCli = douyinapi.NewDouYinOpenApiClient()
|
||||
WechatCli = wechat_api.NewWechatOpenApiClient()
|
||||
result, err := appAccount.FindAll(ctx)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
for _, v := range *result {
|
||||
if v.Type == 0 {
|
||||
DouyinCli.NewAndStoreDouYinOpenApi(v.AppID, v.Secret, v.EcpmValue.V, v.EcpmView.V, cache.NewMemory())
|
||||
} else {
|
||||
WechatCli.NewAndStoreWechatOpenApi(v.AppID, v.Secret, cache.NewMemory())
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
}
|
15
game_open_api/internal/config/config.go
Normal file
15
game_open_api/internal/config/config.go
Normal file
@ -0,0 +1,15 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"github.com/zeromicro/go-zero/core/stores/cache"
|
||||
"github.com/zeromicro/go-zero/rest"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
rest.RestConf
|
||||
|
||||
DB struct {
|
||||
DataSource string
|
||||
}
|
||||
Cache cache.CacheConf
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package app_user
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
"youtu_server/game_open_api/internal/logic/app_user"
|
||||
"youtu_server/game_open_api/internal/svc"
|
||||
"youtu_server/game_open_api/internal/types"
|
||||
)
|
||||
|
||||
func AppUserSetUserHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
var req types.SetAppUserRequest
|
||||
if err := httpx.Parse(r, &req); err != nil {
|
||||
httpx.ErrorCtx(r.Context(), w, err)
|
||||
return
|
||||
}
|
||||
|
||||
l := app_user.NewAppUserSetUserLogic(r.Context(), svcCtx)
|
||||
resp, err := l.AppUserSetUser(&req)
|
||||
if err != nil {
|
||||
httpx.ErrorCtx(r.Context(), w, err)
|
||||
} else {
|
||||
httpx.OkJsonCtx(r.Context(), w, resp)
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package douyin
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
"youtu_server/game_open_api/internal/logic/douyin"
|
||||
"youtu_server/game_open_api/internal/svc"
|
||||
"youtu_server/game_open_api/internal/types"
|
||||
)
|
||||
|
||||
func DouyinCode2UserIdHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
var req types.DouyinCode2UserIdRequest
|
||||
if err := httpx.Parse(r, &req); err != nil {
|
||||
httpx.ErrorCtx(r.Context(), w, err)
|
||||
return
|
||||
}
|
||||
|
||||
l := douyin.NewDouyinCode2UserIdLogic(r.Context(), svcCtx)
|
||||
resp, err := l.DouyinCode2UserId(&req)
|
||||
if err != nil {
|
||||
httpx.ErrorCtx(r.Context(), w, err)
|
||||
} else {
|
||||
httpx.OkJsonCtx(r.Context(), w, resp)
|
||||
}
|
||||
}
|
||||
}
|
28
game_open_api/internal/handler/douyin/getEcpmHandler.go
Normal file
28
game_open_api/internal/handler/douyin/getEcpmHandler.go
Normal file
@ -0,0 +1,28 @@
|
||||
package douyin
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
"youtu_server/game_open_api/internal/logic/douyin"
|
||||
"youtu_server/game_open_api/internal/svc"
|
||||
"youtu_server/game_open_api/internal/types"
|
||||
)
|
||||
|
||||
func GetEcpmHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
var req types.GetEcpmRequest
|
||||
if err := httpx.Parse(r, &req); err != nil {
|
||||
httpx.ErrorCtx(r.Context(), w, err)
|
||||
return
|
||||
}
|
||||
|
||||
l := douyin.NewGetEcpmLogic(r.Context(), svcCtx)
|
||||
resp, err := l.GetEcpm(&req)
|
||||
if err != nil {
|
||||
httpx.ErrorCtx(r.Context(), w, err)
|
||||
} else {
|
||||
httpx.OkJsonCtx(r.Context(), w, resp)
|
||||
}
|
||||
}
|
||||
}
|
21
game_open_api/internal/handler/game/rankingListHandler.go
Normal file
21
game_open_api/internal/handler/game/rankingListHandler.go
Normal file
@ -0,0 +1,21 @@
|
||||
package game
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
"youtu_server/game_open_api/internal/logic/game"
|
||||
"youtu_server/game_open_api/internal/svc"
|
||||
)
|
||||
|
||||
func RankingListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
l := game.NewRankingListLogic(r.Context(), svcCtx)
|
||||
err := l.RankingList()
|
||||
if err != nil {
|
||||
httpx.ErrorCtx(r.Context(), w, err)
|
||||
} else {
|
||||
httpx.Ok(w)
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package game
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
"youtu_server/game_open_api/internal/logic/game"
|
||||
"youtu_server/game_open_api/internal/svc"
|
||||
"youtu_server/game_open_api/internal/types"
|
||||
)
|
||||
|
||||
func RankingSetScoreHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
var req types.SetUserGameScoreRequest
|
||||
if err := httpx.Parse(r, &req); err != nil {
|
||||
httpx.ErrorCtx(r.Context(), w, err)
|
||||
return
|
||||
}
|
||||
|
||||
l := game.NewRankingSetScoreLogic(r.Context(), svcCtx)
|
||||
err := l.RankingSetScore(&req)
|
||||
if err != nil {
|
||||
httpx.ErrorCtx(r.Context(), w, err)
|
||||
} else {
|
||||
httpx.Ok(w)
|
||||
}
|
||||
}
|
||||
}
|
81
game_open_api/internal/handler/routes.go
Normal file
81
game_open_api/internal/handler/routes.go
Normal file
@ -0,0 +1,81 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
// goctl 1.7.5
|
||||
|
||||
package handler
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
app_user "youtu_server/game_open_api/internal/handler/app_user"
|
||||
douyin "youtu_server/game_open_api/internal/handler/douyin"
|
||||
game "youtu_server/game_open_api/internal/handler/game"
|
||||
wechat "youtu_server/game_open_api/internal/handler/wechat"
|
||||
"youtu_server/game_open_api/internal/svc"
|
||||
|
||||
"github.com/zeromicro/go-zero/rest"
|
||||
)
|
||||
|
||||
func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
server.AddRoutes(
|
||||
[]rest.Route{
|
||||
{
|
||||
Method: http.MethodPost,
|
||||
Path: "/set_app_account",
|
||||
Handler: app_user.AppUserSetUserHandler(serverCtx),
|
||||
},
|
||||
},
|
||||
rest.WithPrefix("/v1/app_user"),
|
||||
rest.WithTimeout(3000*time.Millisecond),
|
||||
rest.WithMaxBytes(1048576),
|
||||
)
|
||||
|
||||
server.AddRoutes(
|
||||
[]rest.Route{
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
Path: "/code2userId",
|
||||
Handler: douyin.DouyinCode2UserIdHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
Path: "/getEcpm",
|
||||
Handler: douyin.GetEcpmHandler(serverCtx),
|
||||
},
|
||||
},
|
||||
rest.WithPrefix("/v1/douyin"),
|
||||
rest.WithTimeout(3000*time.Millisecond),
|
||||
rest.WithMaxBytes(1048576),
|
||||
)
|
||||
|
||||
server.AddRoutes(
|
||||
[]rest.Route{
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
Path: "/ranking/list",
|
||||
Handler: game.RankingListHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodPost,
|
||||
Path: "/ranking/set_score",
|
||||
Handler: game.RankingSetScoreHandler(serverCtx),
|
||||
},
|
||||
},
|
||||
rest.WithPrefix("/v1/game"),
|
||||
rest.WithTimeout(3000*time.Millisecond),
|
||||
rest.WithMaxBytes(1048576),
|
||||
)
|
||||
|
||||
server.AddRoutes(
|
||||
[]rest.Route{
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
Path: "/code2userId",
|
||||
Handler: wechat.WechatCode2UserIdHandler(serverCtx),
|
||||
},
|
||||
},
|
||||
rest.WithPrefix("/v1/wechat"),
|
||||
rest.WithTimeout(3000*time.Millisecond),
|
||||
rest.WithMaxBytes(1048576),
|
||||
)
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package wechat
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
"youtu_server/game_open_api/internal/logic/wechat"
|
||||
"youtu_server/game_open_api/internal/svc"
|
||||
"youtu_server/game_open_api/internal/types"
|
||||
)
|
||||
|
||||
func WechatCode2UserIdHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
var req types.WechatCode2UserIdRequest
|
||||
if err := httpx.Parse(r, &req); err != nil {
|
||||
httpx.ErrorCtx(r.Context(), w, err)
|
||||
return
|
||||
}
|
||||
|
||||
l := wechat.NewWechatCode2UserIdLogic(r.Context(), svcCtx)
|
||||
resp, err := l.WechatCode2UserId(&req)
|
||||
if err != nil {
|
||||
httpx.ErrorCtx(r.Context(), w, err)
|
||||
} else {
|
||||
httpx.OkJsonCtx(r.Context(), w, resp)
|
||||
}
|
||||
}
|
||||
}
|
35
game_open_api/internal/logic/app_user/appUserSetUserLogic.go
Normal file
35
game_open_api/internal/logic/app_user/appUserSetUserLogic.go
Normal file
@ -0,0 +1,35 @@
|
||||
package app_user
|
||||
|
||||
import (
|
||||
"context"
|
||||
"youtu_server/game_open_api/model"
|
||||
|
||||
"youtu_server/game_open_api/internal/svc"
|
||||
"youtu_server/game_open_api/internal/types"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type AppUserSetUserLogic struct {
|
||||
logx.Logger
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
}
|
||||
|
||||
func NewAppUserSetUserLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AppUserSetUserLogic {
|
||||
return &AppUserSetUserLogic{
|
||||
Logger: logx.WithContext(ctx),
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
}
|
||||
}
|
||||
|
||||
func (l *AppUserSetUserLogic) AppUserSetUser(req *types.SetAppUserRequest) (resp *types.UserId, err error) {
|
||||
// todo: add your logic here and delete this line
|
||||
err = l.svcCtx.AppUser.UpdateNicknameAvatar(l.ctx, &model.AppUser{
|
||||
Id: req.Id,
|
||||
Nickname: req.Nickname,
|
||||
Avatar: req.Avatar,
|
||||
})
|
||||
return
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
package douyin
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"youtu_server/game_open_api/internal/app_api_helper"
|
||||
"youtu_server/game_open_api/model"
|
||||
|
||||
"youtu_server/game_open_api/internal/svc"
|
||||
"youtu_server/game_open_api/internal/types"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type DouyinCode2UserIdLogic struct {
|
||||
logx.Logger
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
}
|
||||
|
||||
func NewDouyinCode2UserIdLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DouyinCode2UserIdLogic {
|
||||
app_api_helper.Init(ctx, svcCtx.AppAccount)
|
||||
return &DouyinCode2UserIdLogic{
|
||||
Logger: logx.WithContext(ctx),
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
}
|
||||
}
|
||||
|
||||
func (l *DouyinCode2UserIdLogic) DouyinCode2UserId(req *types.DouyinCode2UserIdRequest) (resp int64, err error) {
|
||||
douyinCli, err := app_api_helper.DouyinCli.GetDouYinOpenApi(req.AppId)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
res, err := douyinCli.Api.Code2Session(req.Code, req.AnonymousCode)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
if res.Errcode != 0 {
|
||||
err = errors.New(res.Errmsg)
|
||||
return
|
||||
}
|
||||
|
||||
accountId, err := l.svcCtx.AppAccount.FindIdByAppId(l.ctx, req.AppId)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
aui := &model.AppUser{
|
||||
AppAccountId: accountId,
|
||||
Openid: res.Openid,
|
||||
Unionid: res.Unionid,
|
||||
AnonymousOpenid: res.AnonymousOpenid,
|
||||
}
|
||||
_, err = l.svcCtx.AppUser.Insert(l.ctx, aui)
|
||||
return
|
||||
}
|
55
game_open_api/internal/logic/douyin/getEcpmLogic.go
Normal file
55
game_open_api/internal/logic/douyin/getEcpmLogic.go
Normal file
@ -0,0 +1,55 @@
|
||||
package douyin
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
"youtu_server/game_open_api/internal/app_api_helper"
|
||||
|
||||
"youtu_server/game_open_api/internal/svc"
|
||||
"youtu_server/game_open_api/internal/types"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type GetEcpmLogic struct {
|
||||
logx.Logger
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
}
|
||||
|
||||
func NewGetEcpmLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetEcpmLogic {
|
||||
app_api_helper.Init(ctx, svcCtx.AppAccount)
|
||||
return &GetEcpmLogic{
|
||||
Logger: logx.WithContext(ctx),
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
}
|
||||
}
|
||||
|
||||
func (l *GetEcpmLogic) GetEcpm(req *types.GetEcpmRequest) (result bool, errNeverNil error) {
|
||||
user, err := l.svcCtx.AppUser.FindOne(l.ctx, req.UserId)
|
||||
if err != nil {
|
||||
l.Logger.Error(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
res, err := app_api_helper.DouyinCli.GetEcpmData(req.AppId, user.Openid, time.Now().Format(time.DateOnly))
|
||||
if err != nil {
|
||||
l.Logger.Error(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
ecpm, err := app_api_helper.DouyinCli.GetEcpm(res)
|
||||
if err != nil {
|
||||
l.Logger.Error(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
if ecpm > float64(app_api_helper.DouyinCli.GetEcpmValue(req.AppId)) && len(res) > int(app_api_helper.DouyinCli.GetEcpmViewCount(req.AppId)) {
|
||||
result = true
|
||||
} else {
|
||||
result = false
|
||||
}
|
||||
|
||||
return
|
||||
}
|
28
game_open_api/internal/logic/game/rankingListLogic.go
Normal file
28
game_open_api/internal/logic/game/rankingListLogic.go
Normal file
@ -0,0 +1,28 @@
|
||||
package game
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
"youtu_server/game_open_api/internal/svc"
|
||||
)
|
||||
|
||||
type RankingListLogic struct {
|
||||
logx.Logger
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
}
|
||||
|
||||
func NewRankingListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *RankingListLogic {
|
||||
return &RankingListLogic{
|
||||
Logger: logx.WithContext(ctx),
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
}
|
||||
}
|
||||
|
||||
func (l *RankingListLogic) RankingList() error {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return nil
|
||||
}
|
39
game_open_api/internal/logic/game/rankingSetScoreLogic.go
Normal file
39
game_open_api/internal/logic/game/rankingSetScoreLogic.go
Normal file
@ -0,0 +1,39 @@
|
||||
package game
|
||||
|
||||
import (
|
||||
"context"
|
||||
"youtu_server/game_open_api/model"
|
||||
|
||||
"youtu_server/game_open_api/internal/svc"
|
||||
"youtu_server/game_open_api/internal/types"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type RankingSetScoreLogic struct {
|
||||
logx.Logger
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
}
|
||||
|
||||
func NewRankingSetScoreLogic(ctx context.Context, svcCtx *svc.ServiceContext) *RankingSetScoreLogic {
|
||||
return &RankingSetScoreLogic{
|
||||
Logger: logx.WithContext(ctx),
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
}
|
||||
}
|
||||
|
||||
func (l *RankingSetScoreLogic) RankingSetScore(req *types.SetUserGameScoreRequest) error {
|
||||
appId, err := l.svcCtx.AppAccount.FindIdByAppId(l.ctx, req.AppId)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_, err = l.svcCtx.GameScore.Insert(l.ctx, &model.GameScore{
|
||||
AppUserId: req.UserId,
|
||||
AppAccount: appId,
|
||||
Score: req.Score,
|
||||
})
|
||||
|
||||
return err
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package wechat
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"youtu_server/game_open_api/internal/app_api_helper"
|
||||
"youtu_server/game_open_api/model"
|
||||
|
||||
"youtu_server/game_open_api/internal/svc"
|
||||
"youtu_server/game_open_api/internal/types"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type WechatCode2UserIdLogic struct {
|
||||
logx.Logger
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
}
|
||||
|
||||
func NewWechatCode2UserIdLogic(ctx context.Context, svcCtx *svc.ServiceContext) *WechatCode2UserIdLogic {
|
||||
app_api_helper.Init(ctx, svcCtx.AppAccount)
|
||||
return &WechatCode2UserIdLogic{
|
||||
Logger: logx.WithContext(ctx),
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
}
|
||||
}
|
||||
|
||||
func (l *WechatCode2UserIdLogic) WechatCode2UserId(req *types.WechatCode2UserIdRequest) (resp uint64, err error) {
|
||||
wechatCli, err := app_api_helper.WechatCli.GetWechatOpenApi(req.AppId)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
res, err := wechatCli.GetAuth().Code2Session(req.Code)
|
||||
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
if res.ErrCode != 0 {
|
||||
err = errors.New(res.ErrMsg)
|
||||
return
|
||||
}
|
||||
|
||||
accountId, err := l.svcCtx.AppAccount.FindIdByAppId(l.ctx, req.AppId)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
aui := &model.AppUser{
|
||||
AppAccountId: accountId,
|
||||
Openid: res.OpenID,
|
||||
Unionid: res.UnionID,
|
||||
}
|
||||
|
||||
//todo 校验唯一
|
||||
|
||||
_, err = l.svcCtx.AppUser.Insert(l.ctx, aui)
|
||||
|
||||
return
|
||||
}
|
23
game_open_api/internal/svc/servicecontext.go
Normal file
23
game_open_api/internal/svc/servicecontext.go
Normal file
@ -0,0 +1,23 @@
|
||||
package svc
|
||||
|
||||
import (
|
||||
"github.com/zeromicro/go-zero/core/stores/sqlx"
|
||||
"youtu_server/game_open_api/internal/config"
|
||||
"youtu_server/game_open_api/model"
|
||||
)
|
||||
|
||||
type ServiceContext struct {
|
||||
Config config.Config
|
||||
AppUser model.AppUserModel
|
||||
GameScore model.GameScoreModel
|
||||
AppAccount model.AppAccountModel
|
||||
}
|
||||
|
||||
func NewServiceContext(c config.Config) *ServiceContext {
|
||||
return &ServiceContext{
|
||||
Config: c,
|
||||
AppUser: model.NewAppUserModel(sqlx.NewMysql(c.DB.DataSource), c.Cache),
|
||||
GameScore: model.NewGameScoreModel(sqlx.NewMysql(c.DB.DataSource), c.Cache),
|
||||
AppAccount: model.NewAppAccountModel(sqlx.NewMysql(c.DB.DataSource), c.Cache),
|
||||
}
|
||||
}
|
36
game_open_api/internal/types/types.go
Normal file
36
game_open_api/internal/types/types.go
Normal file
@ -0,0 +1,36 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
// goctl 1.7.5
|
||||
|
||||
package types
|
||||
|
||||
type DouyinCode2UserIdRequest struct {
|
||||
AppId string `form:"appId"`
|
||||
Code string `form:"code,optional"`
|
||||
AnonymousCode string `form:"anonymousCode,optional"`
|
||||
}
|
||||
|
||||
type GetEcpmRequest struct {
|
||||
AppId string `form:"appId"`
|
||||
UserId uint64 `form:"userId"`
|
||||
}
|
||||
|
||||
type SetAppUserRequest struct {
|
||||
Id uint64 `json:"id"`
|
||||
Nickname string `json:"nickname"`
|
||||
Avatar string `json:"avatar"`
|
||||
}
|
||||
|
||||
type SetUserGameScoreRequest struct {
|
||||
AppId string `json:"appId"`
|
||||
Score uint64 `json:"score"`
|
||||
UserId uint64 `json:"userId"`
|
||||
}
|
||||
|
||||
type UserId struct {
|
||||
UserId uint64 `json:"userId"`
|
||||
}
|
||||
|
||||
type WechatCode2UserIdRequest struct {
|
||||
AppId string `form:"appId"`
|
||||
Code string `form:"code"`
|
||||
}
|
65
game_open_api/model/appaccountmodel.go
Normal file
65
game_open_api/model/appaccountmodel.go
Normal file
@ -0,0 +1,65 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"github.com/zeromicro/go-zero/core/stores/cache"
|
||||
"github.com/zeromicro/go-zero/core/stores/sqlc"
|
||||
"github.com/zeromicro/go-zero/core/stores/sqlx"
|
||||
)
|
||||
|
||||
var _ AppAccountModel = (*customAppAccountModel)(nil)
|
||||
|
||||
type (
|
||||
// AppAccountModel is an interface to be customized, add more methods here,
|
||||
// and implement the added methods in customAppAccountModel.
|
||||
AppAccountModel interface {
|
||||
appAccountModel
|
||||
}
|
||||
|
||||
customAppAccountModel struct {
|
||||
*defaultAppAccountModel
|
||||
}
|
||||
|
||||
appAccountModel interface {
|
||||
Insert(ctx context.Context, data *AppAccount) (sql.Result, error)
|
||||
FindOne(ctx context.Context, id uint64) (*AppAccount, error)
|
||||
Update(ctx context.Context, data *AppAccount) error
|
||||
Delete(ctx context.Context, id uint64) error
|
||||
FindIdByAppId(ctx context.Context, appId string) (uint64, error)
|
||||
FindAll(ctx context.Context) (*[]*GameAppConfig, error)
|
||||
}
|
||||
)
|
||||
|
||||
// NewAppAccountModel returns a model for the database table.
|
||||
func NewAppAccountModel(conn sqlx.SqlConn, c cache.CacheConf, opts ...cache.Option) AppAccountModel {
|
||||
return &customAppAccountModel{
|
||||
defaultAppAccountModel: newAppAccountModel(conn, c, opts...),
|
||||
}
|
||||
}
|
||||
|
||||
type GameAppConfig struct {
|
||||
AppID string `db:"app_id"`
|
||||
Secret string `db:"secret"`
|
||||
EcpmValue sql.Null[uint32] `db:"ecpm_value"` // 值
|
||||
EcpmView sql.Null[uint32] `db:"ecpm_view"` // 浏览次数
|
||||
Type uint64 `db:"type"` // 类型(0:抖音,1:微信)
|
||||
}
|
||||
|
||||
func (m *defaultAppAccountModel) FindAll(ctx context.Context) (*[]*GameAppConfig, error) {
|
||||
ecpmAppAccountIdKey := fmt.Sprintf("%s%v", cacheEcpmAppAccountIdPrefix, "*")
|
||||
var resp []*GameAppConfig
|
||||
err := m.QueryRowCtx(ctx, &resp, ecpmAppAccountIdKey, func(ctx context.Context, conn sqlx.SqlConn, v any) error {
|
||||
query := "select `app_id`,`secret`,`ecpm_value`,`ecpm_view`,`type` from `app_account` left join douyin_ecpm_config on app_account.id = douyin_ecpm_config.app_account_id"
|
||||
return conn.QueryRowsCtx(ctx, v, query)
|
||||
})
|
||||
switch err {
|
||||
case nil:
|
||||
return &resp, nil
|
||||
case sqlc.ErrNotFound:
|
||||
return nil, ErrNotFound
|
||||
default:
|
||||
return nil, err
|
||||
}
|
||||
}
|
124
game_open_api/model/appaccountmodel_gen.go
Normal file
124
game_open_api/model/appaccountmodel_gen.go
Normal file
@ -0,0 +1,124 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
// versions:
|
||||
// goctl version: 1.7.5
|
||||
|
||||
package model
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/stores/builder"
|
||||
"github.com/zeromicro/go-zero/core/stores/cache"
|
||||
"github.com/zeromicro/go-zero/core/stores/sqlc"
|
||||
"github.com/zeromicro/go-zero/core/stores/sqlx"
|
||||
"github.com/zeromicro/go-zero/core/stringx"
|
||||
)
|
||||
|
||||
var (
|
||||
appAccountFieldNames = builder.RawFieldNames(&AppAccount{})
|
||||
appAccountRows = strings.Join(appAccountFieldNames, ",")
|
||||
appAccountRowsExpectAutoSet = strings.Join(stringx.Remove(appAccountFieldNames, "`id`", "`create_at`", "`create_time`", "`created_at`", "`update_at`", "`update_time`", "`updated_at`"), ",")
|
||||
appAccountRowsWithPlaceHolder = strings.Join(stringx.Remove(appAccountFieldNames, "`id`", "`create_at`", "`create_time`", "`created_at`", "`update_at`", "`update_time`", "`updated_at`"), "=?,") + "=?"
|
||||
|
||||
cacheEcpmAppAccountIdPrefix = "cache:ecpm:appAccount:id:"
|
||||
)
|
||||
|
||||
type (
|
||||
defaultAppAccountModel struct {
|
||||
sqlc.CachedConn
|
||||
table string
|
||||
}
|
||||
|
||||
AppAccount struct {
|
||||
Id uint64 `db:"id"`
|
||||
Type uint64 `db:"type"` // 类型(0:抖音,1:微信)
|
||||
AppId string `db:"app_id"`
|
||||
Secret string `db:"secret"`
|
||||
Remark sql.NullString `db:"remark"` // 备注
|
||||
DeletedAt sql.NullString `db:"deleted_at"`
|
||||
}
|
||||
)
|
||||
|
||||
func newAppAccountModel(conn sqlx.SqlConn, c cache.CacheConf, opts ...cache.Option) *defaultAppAccountModel {
|
||||
return &defaultAppAccountModel{
|
||||
CachedConn: sqlc.NewConn(conn, c, opts...),
|
||||
table: "`app_account`",
|
||||
}
|
||||
}
|
||||
|
||||
func (m *defaultAppAccountModel) Delete(ctx context.Context, id uint64) error {
|
||||
ecpmAppAccountIdKey := fmt.Sprintf("%s%v", cacheEcpmAppAccountIdPrefix, id)
|
||||
_, err := m.ExecCtx(ctx, func(ctx context.Context, conn sqlx.SqlConn) (result sql.Result, err error) {
|
||||
query := fmt.Sprintf("delete from %s where `id` = ?", m.table)
|
||||
return conn.ExecCtx(ctx, query, id)
|
||||
}, ecpmAppAccountIdKey)
|
||||
return err
|
||||
}
|
||||
|
||||
func (m *defaultAppAccountModel) FindOne(ctx context.Context, id uint64) (*AppAccount, error) {
|
||||
ecpmAppAccountIdKey := fmt.Sprintf("%s%v", cacheEcpmAppAccountIdPrefix, id)
|
||||
var resp AppAccount
|
||||
err := m.QueryRowCtx(ctx, &resp, ecpmAppAccountIdKey, func(ctx context.Context, conn sqlx.SqlConn, v any) error {
|
||||
query := fmt.Sprintf("select %s from %s where `id` = ? limit 1", appAccountRows, m.table)
|
||||
return conn.QueryRowCtx(ctx, v, query, id)
|
||||
})
|
||||
switch err {
|
||||
case nil:
|
||||
return &resp, nil
|
||||
case sqlc.ErrNotFound:
|
||||
return nil, ErrNotFound
|
||||
default:
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
func (m *defaultAppAccountModel) Insert(ctx context.Context, data *AppAccount) (sql.Result, error) {
|
||||
ecpmAppAccountIdKey := fmt.Sprintf("%s%v", cacheEcpmAppAccountIdPrefix, data.Id)
|
||||
ret, err := m.ExecCtx(ctx, func(ctx context.Context, conn sqlx.SqlConn) (result sql.Result, err error) {
|
||||
query := fmt.Sprintf("insert into %s (%s) values (?, ?, ?, ?, ?)", m.table, appAccountRowsExpectAutoSet)
|
||||
return conn.ExecCtx(ctx, query, data.Type, data.AppId, data.Secret, data.Remark, data.DeletedAt)
|
||||
}, ecpmAppAccountIdKey)
|
||||
return ret, err
|
||||
}
|
||||
|
||||
func (m *defaultAppAccountModel) Update(ctx context.Context, data *AppAccount) error {
|
||||
ecpmAppAccountIdKey := fmt.Sprintf("%s%v", cacheEcpmAppAccountIdPrefix, data.Id)
|
||||
_, err := m.ExecCtx(ctx, func(ctx context.Context, conn sqlx.SqlConn) (result sql.Result, err error) {
|
||||
query := fmt.Sprintf("update %s set %s where `id` = ?", m.table, appAccountRowsWithPlaceHolder)
|
||||
return conn.ExecCtx(ctx, query, data.Type, data.AppId, data.Secret, data.Remark, data.DeletedAt, data.Id)
|
||||
}, ecpmAppAccountIdKey)
|
||||
return err
|
||||
}
|
||||
|
||||
func (m *defaultAppAccountModel) FindIdByAppId(ctx context.Context, appId string) (uint64, error) {
|
||||
ecpmAppAccountIdKey := fmt.Sprintf("%s%v", cacheEcpmAppAccountIdPrefix, appId)
|
||||
var id uint64
|
||||
err := m.QueryRowCtx(ctx, &id, ecpmAppAccountIdKey, func(ctx context.Context, conn sqlx.SqlConn, v any) error {
|
||||
query := fmt.Sprintf("select id from %s where `app_id` = ? limit 1", m.table)
|
||||
return conn.QueryRowCtx(ctx, v, query, appId)
|
||||
})
|
||||
switch err {
|
||||
case nil:
|
||||
return id, nil
|
||||
case sqlc.ErrNotFound:
|
||||
return 0, ErrNotFound
|
||||
default:
|
||||
return 0, err
|
||||
}
|
||||
}
|
||||
|
||||
func (m *defaultAppAccountModel) formatPrimary(primary any) string {
|
||||
return fmt.Sprintf("%s%v", cacheEcpmAppAccountIdPrefix, primary)
|
||||
}
|
||||
|
||||
func (m *defaultAppAccountModel) queryPrimary(ctx context.Context, conn sqlx.SqlConn, v, primary any) error {
|
||||
query := fmt.Sprintf("select %s from %s where `id` = ? limit 1", appAccountRows, m.table)
|
||||
return conn.QueryRowCtx(ctx, v, query, primary)
|
||||
}
|
||||
|
||||
func (m *defaultAppAccountModel) tableName() string {
|
||||
return m.table
|
||||
}
|
27
game_open_api/model/appusermodel.go
Normal file
27
game_open_api/model/appusermodel.go
Normal file
@ -0,0 +1,27 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/zeromicro/go-zero/core/stores/cache"
|
||||
"github.com/zeromicro/go-zero/core/stores/sqlx"
|
||||
)
|
||||
|
||||
var _ AppUserModel = (*customAppUserModel)(nil)
|
||||
|
||||
type (
|
||||
// AppUserModel is an interface to be customized, add more methods here,
|
||||
// and implement the added methods in customAppUserModel.
|
||||
AppUserModel interface {
|
||||
appUserModel
|
||||
}
|
||||
|
||||
customAppUserModel struct {
|
||||
*defaultAppUserModel
|
||||
}
|
||||
)
|
||||
|
||||
// NewAppUserModel returns a model for the database table.
|
||||
func NewAppUserModel(conn sqlx.SqlConn, c cache.CacheConf, opts ...cache.Option) AppUserModel {
|
||||
return &customAppUserModel{
|
||||
defaultAppUserModel: newAppUserModel(conn, c, opts...),
|
||||
}
|
||||
}
|
125
game_open_api/model/appusermodel_gen.go
Normal file
125
game_open_api/model/appusermodel_gen.go
Normal file
@ -0,0 +1,125 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
// versions:
|
||||
// goctl version: 1.7.5
|
||||
|
||||
package model
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/stores/builder"
|
||||
"github.com/zeromicro/go-zero/core/stores/cache"
|
||||
"github.com/zeromicro/go-zero/core/stores/sqlc"
|
||||
"github.com/zeromicro/go-zero/core/stores/sqlx"
|
||||
"github.com/zeromicro/go-zero/core/stringx"
|
||||
)
|
||||
|
||||
var (
|
||||
appUserFieldNames = builder.RawFieldNames(&AppUser{})
|
||||
appUserRows = strings.Join(appUserFieldNames, ",")
|
||||
appUserRowsExpectAutoSet = strings.Join(stringx.Remove(appUserFieldNames, "`id`", "`create_at`", "`create_time`", "`created_at`", "`update_at`", "`update_time`", "`updated_at`"), ",")
|
||||
appUserRowsWithPlaceHolder = strings.Join(stringx.Remove(appUserFieldNames, "`id`", "`create_at`", "`create_time`", "`created_at`", "`update_at`", "`update_time`", "`updated_at`"), "=?,") + "=?"
|
||||
|
||||
cacheEcpmAppUserIdPrefix = "cache:ecpm:appUser:id:"
|
||||
)
|
||||
|
||||
type (
|
||||
appUserModel interface {
|
||||
Insert(ctx context.Context, data *AppUser) (sql.Result, error)
|
||||
FindOne(ctx context.Context, id uint64) (*AppUser, error)
|
||||
Update(ctx context.Context, data *AppUser) error
|
||||
Delete(ctx context.Context, id uint64) error
|
||||
UpdateNicknameAvatar(ctx context.Context, data *AppUser) error
|
||||
}
|
||||
|
||||
defaultAppUserModel struct {
|
||||
sqlc.CachedConn
|
||||
table string
|
||||
}
|
||||
|
||||
AppUser struct {
|
||||
Id uint64 `db:"id"`
|
||||
AppAccountId uint64 `db:"app_account_id"` // app_account表外键
|
||||
Openid string `db:"openid"`
|
||||
Unionid string `db:"unionid"`
|
||||
Nickname string `db:"nickname"` // 昵称
|
||||
Avatar string `db:"avatar"` // 头像
|
||||
AnonymousOpenid string `db:"anonymous_openid"` // 匿名openid
|
||||
}
|
||||
)
|
||||
|
||||
func newAppUserModel(conn sqlx.SqlConn, c cache.CacheConf, opts ...cache.Option) *defaultAppUserModel {
|
||||
return &defaultAppUserModel{
|
||||
CachedConn: sqlc.NewConn(conn, c, opts...),
|
||||
table: "`app_user`",
|
||||
}
|
||||
}
|
||||
|
||||
func (m *defaultAppUserModel) Delete(ctx context.Context, id uint64) error {
|
||||
ecpmAppUserIdKey := fmt.Sprintf("%s%v", cacheEcpmAppUserIdPrefix, id)
|
||||
_, err := m.ExecCtx(ctx, func(ctx context.Context, conn sqlx.SqlConn) (result sql.Result, err error) {
|
||||
query := fmt.Sprintf("delete from %s where `id` = ?", m.table)
|
||||
return conn.ExecCtx(ctx, query, id)
|
||||
}, ecpmAppUserIdKey)
|
||||
return err
|
||||
}
|
||||
|
||||
func (m *defaultAppUserModel) FindOne(ctx context.Context, id uint64) (*AppUser, error) {
|
||||
ecpmAppUserIdKey := fmt.Sprintf("%s%v", cacheEcpmAppUserIdPrefix, id)
|
||||
var resp AppUser
|
||||
err := m.QueryRowCtx(ctx, &resp, ecpmAppUserIdKey, func(ctx context.Context, conn sqlx.SqlConn, v any) error {
|
||||
query := fmt.Sprintf("select %s from %s where `id` = ? limit 1", appUserRows, m.table)
|
||||
return conn.QueryRowCtx(ctx, v, query, id)
|
||||
})
|
||||
switch err {
|
||||
case nil:
|
||||
return &resp, nil
|
||||
case sqlc.ErrNotFound:
|
||||
return nil, ErrNotFound
|
||||
default:
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
func (m *defaultAppUserModel) Insert(ctx context.Context, data *AppUser) (sql.Result, error) {
|
||||
ecpmAppUserIdKey := fmt.Sprintf("%s%v", cacheEcpmAppUserIdPrefix, data.Id)
|
||||
ret, err := m.ExecCtx(ctx, func(ctx context.Context, conn sqlx.SqlConn) (result sql.Result, err error) {
|
||||
query := fmt.Sprintf("insert into %s (%s) values (?, ?, ?, ?, ?, ?)", m.table, appUserRowsExpectAutoSet)
|
||||
return conn.ExecCtx(ctx, query, data.AppAccountId, data.Openid, data.Unionid, data.Nickname, data.Avatar, data.AnonymousOpenid)
|
||||
}, ecpmAppUserIdKey)
|
||||
return ret, err
|
||||
}
|
||||
|
||||
func (m *defaultAppUserModel) Update(ctx context.Context, data *AppUser) error {
|
||||
ecpmAppUserIdKey := fmt.Sprintf("%s%v", cacheEcpmAppUserIdPrefix, data.Id)
|
||||
_, err := m.ExecCtx(ctx, func(ctx context.Context, conn sqlx.SqlConn) (result sql.Result, err error) {
|
||||
query := fmt.Sprintf("update %s set %s where `id` = ?", m.table, appUserRowsWithPlaceHolder)
|
||||
return conn.ExecCtx(ctx, query, data.AppAccountId, data.Openid, data.Unionid, data.Nickname, data.Avatar, data.AnonymousOpenid, data.Id)
|
||||
}, ecpmAppUserIdKey)
|
||||
return err
|
||||
}
|
||||
|
||||
func (m *defaultAppUserModel) UpdateNicknameAvatar(ctx context.Context, data *AppUser) error {
|
||||
ecpmAppUserIdKey := fmt.Sprintf("%s%v", cacheEcpmAppUserIdPrefix, data.Id)
|
||||
_, err := m.ExecCtx(ctx, func(ctx context.Context, conn sqlx.SqlConn) (result sql.Result, err error) {
|
||||
query := fmt.Sprintf("update %s set %s where `id` = ?", m.table, "`nickname`=?,`avatar`=?")
|
||||
return conn.ExecCtx(ctx, query, data.Nickname, data.Avatar, data.Id)
|
||||
}, ecpmAppUserIdKey)
|
||||
return err
|
||||
}
|
||||
|
||||
func (m *defaultAppUserModel) formatPrimary(primary any) string {
|
||||
return fmt.Sprintf("%s%v", cacheEcpmAppUserIdPrefix, primary)
|
||||
}
|
||||
|
||||
func (m *defaultAppUserModel) queryPrimary(ctx context.Context, conn sqlx.SqlConn, v, primary any) error {
|
||||
query := fmt.Sprintf("select %s from %s where `id` = ? limit 1", appUserRows, m.table)
|
||||
return conn.QueryRowCtx(ctx, v, query, primary)
|
||||
}
|
||||
|
||||
func (m *defaultAppUserModel) tableName() string {
|
||||
return m.table
|
||||
}
|
27
game_open_api/model/douyinecpmconfigmodel.go
Normal file
27
game_open_api/model/douyinecpmconfigmodel.go
Normal file
@ -0,0 +1,27 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/zeromicro/go-zero/core/stores/cache"
|
||||
"github.com/zeromicro/go-zero/core/stores/sqlx"
|
||||
)
|
||||
|
||||
var _ DouyinEcpmConfigModel = (*customDouyinEcpmConfigModel)(nil)
|
||||
|
||||
type (
|
||||
// DouyinEcpmConfigModel is an interface to be customized, add more methods here,
|
||||
// and implement the added methods in customDouyinEcpmConfigModel.
|
||||
DouyinEcpmConfigModel interface {
|
||||
douyinEcpmConfigModel
|
||||
}
|
||||
|
||||
customDouyinEcpmConfigModel struct {
|
||||
*defaultDouyinEcpmConfigModel
|
||||
}
|
||||
)
|
||||
|
||||
// NewDouyinEcpmConfigModel returns a model for the database table.
|
||||
func NewDouyinEcpmConfigModel(conn sqlx.SqlConn, c cache.CacheConf, opts ...cache.Option) DouyinEcpmConfigModel {
|
||||
return &customDouyinEcpmConfigModel{
|
||||
defaultDouyinEcpmConfigModel: newDouyinEcpmConfigModel(conn, c, opts...),
|
||||
}
|
||||
}
|
112
game_open_api/model/douyinecpmconfigmodel_gen.go
Normal file
112
game_open_api/model/douyinecpmconfigmodel_gen.go
Normal file
@ -0,0 +1,112 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
// versions:
|
||||
// goctl version: 1.7.5
|
||||
|
||||
package model
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/stores/builder"
|
||||
"github.com/zeromicro/go-zero/core/stores/cache"
|
||||
"github.com/zeromicro/go-zero/core/stores/sqlc"
|
||||
"github.com/zeromicro/go-zero/core/stores/sqlx"
|
||||
"github.com/zeromicro/go-zero/core/stringx"
|
||||
)
|
||||
|
||||
var (
|
||||
douyinEcpmConfigFieldNames = builder.RawFieldNames(&DouyinEcpmConfig{})
|
||||
douyinEcpmConfigRows = strings.Join(douyinEcpmConfigFieldNames, ",")
|
||||
douyinEcpmConfigRowsExpectAutoSet = strings.Join(stringx.Remove(douyinEcpmConfigFieldNames, "`id`", "`create_at`", "`create_time`", "`created_at`", "`update_at`", "`update_time`", "`updated_at`"), ",")
|
||||
douyinEcpmConfigRowsWithPlaceHolder = strings.Join(stringx.Remove(douyinEcpmConfigFieldNames, "`id`", "`create_at`", "`create_time`", "`created_at`", "`update_at`", "`update_time`", "`updated_at`"), "=?,") + "=?"
|
||||
|
||||
cacheEcpmDouyinEcpmConfigIdPrefix = "cache:ecpm:douyinEcpmConfig:id:"
|
||||
)
|
||||
|
||||
type (
|
||||
douyinEcpmConfigModel interface {
|
||||
Insert(ctx context.Context, data *DouyinEcpmConfig) (sql.Result, error)
|
||||
FindOne(ctx context.Context, id uint64) (*DouyinEcpmConfig, error)
|
||||
Update(ctx context.Context, data *DouyinEcpmConfig) error
|
||||
Delete(ctx context.Context, id uint64) error
|
||||
}
|
||||
|
||||
defaultDouyinEcpmConfigModel struct {
|
||||
sqlc.CachedConn
|
||||
table string
|
||||
}
|
||||
|
||||
DouyinEcpmConfig struct {
|
||||
Id uint64 `db:"id"`
|
||||
AppAccountId uint64 `db:"app_account_id"`
|
||||
EcpmValue uint64 `db:"ecpm_value"` // 值
|
||||
EcpmView uint64 `db:"ecpm_view"` // 浏览次数
|
||||
}
|
||||
)
|
||||
|
||||
func newDouyinEcpmConfigModel(conn sqlx.SqlConn, c cache.CacheConf, opts ...cache.Option) *defaultDouyinEcpmConfigModel {
|
||||
return &defaultDouyinEcpmConfigModel{
|
||||
CachedConn: sqlc.NewConn(conn, c, opts...),
|
||||
table: "`douyin_ecpm_config`",
|
||||
}
|
||||
}
|
||||
|
||||
func (m *defaultDouyinEcpmConfigModel) Delete(ctx context.Context, id uint64) error {
|
||||
ecpmDouyinEcpmConfigIdKey := fmt.Sprintf("%s%v", cacheEcpmDouyinEcpmConfigIdPrefix, id)
|
||||
_, err := m.ExecCtx(ctx, func(ctx context.Context, conn sqlx.SqlConn) (result sql.Result, err error) {
|
||||
query := fmt.Sprintf("delete from %s where `id` = ?", m.table)
|
||||
return conn.ExecCtx(ctx, query, id)
|
||||
}, ecpmDouyinEcpmConfigIdKey)
|
||||
return err
|
||||
}
|
||||
|
||||
func (m *defaultDouyinEcpmConfigModel) FindOne(ctx context.Context, id uint64) (*DouyinEcpmConfig, error) {
|
||||
ecpmDouyinEcpmConfigIdKey := fmt.Sprintf("%s%v", cacheEcpmDouyinEcpmConfigIdPrefix, id)
|
||||
var resp DouyinEcpmConfig
|
||||
err := m.QueryRowCtx(ctx, &resp, ecpmDouyinEcpmConfigIdKey, func(ctx context.Context, conn sqlx.SqlConn, v any) error {
|
||||
query := fmt.Sprintf("select %s from %s where `id` = ? limit 1", douyinEcpmConfigRows, m.table)
|
||||
return conn.QueryRowCtx(ctx, v, query, id)
|
||||
})
|
||||
switch err {
|
||||
case nil:
|
||||
return &resp, nil
|
||||
case sqlc.ErrNotFound:
|
||||
return nil, ErrNotFound
|
||||
default:
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
func (m *defaultDouyinEcpmConfigModel) Insert(ctx context.Context, data *DouyinEcpmConfig) (sql.Result, error) {
|
||||
ecpmDouyinEcpmConfigIdKey := fmt.Sprintf("%s%v", cacheEcpmDouyinEcpmConfigIdPrefix, data.Id)
|
||||
ret, err := m.ExecCtx(ctx, func(ctx context.Context, conn sqlx.SqlConn) (result sql.Result, err error) {
|
||||
query := fmt.Sprintf("insert into %s (%s) values (?, ?, ?)", m.table, douyinEcpmConfigRowsExpectAutoSet)
|
||||
return conn.ExecCtx(ctx, query, data.AppAccountId, data.EcpmValue, data.EcpmView)
|
||||
}, ecpmDouyinEcpmConfigIdKey)
|
||||
return ret, err
|
||||
}
|
||||
|
||||
func (m *defaultDouyinEcpmConfigModel) Update(ctx context.Context, data *DouyinEcpmConfig) error {
|
||||
ecpmDouyinEcpmConfigIdKey := fmt.Sprintf("%s%v", cacheEcpmDouyinEcpmConfigIdPrefix, data.Id)
|
||||
_, err := m.ExecCtx(ctx, func(ctx context.Context, conn sqlx.SqlConn) (result sql.Result, err error) {
|
||||
query := fmt.Sprintf("update %s set %s where `id` = ?", m.table, douyinEcpmConfigRowsWithPlaceHolder)
|
||||
return conn.ExecCtx(ctx, query, data.AppAccountId, data.EcpmValue, data.EcpmView, data.Id)
|
||||
}, ecpmDouyinEcpmConfigIdKey)
|
||||
return err
|
||||
}
|
||||
|
||||
func (m *defaultDouyinEcpmConfigModel) formatPrimary(primary any) string {
|
||||
return fmt.Sprintf("%s%v", cacheEcpmDouyinEcpmConfigIdPrefix, primary)
|
||||
}
|
||||
|
||||
func (m *defaultDouyinEcpmConfigModel) queryPrimary(ctx context.Context, conn sqlx.SqlConn, v, primary any) error {
|
||||
query := fmt.Sprintf("select %s from %s where `id` = ? limit 1", douyinEcpmConfigRows, m.table)
|
||||
return conn.QueryRowCtx(ctx, v, query, primary)
|
||||
}
|
||||
|
||||
func (m *defaultDouyinEcpmConfigModel) tableName() string {
|
||||
return m.table
|
||||
}
|
27
game_open_api/model/gamescoremodel.go
Normal file
27
game_open_api/model/gamescoremodel.go
Normal file
@ -0,0 +1,27 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/zeromicro/go-zero/core/stores/cache"
|
||||
"github.com/zeromicro/go-zero/core/stores/sqlx"
|
||||
)
|
||||
|
||||
var _ GameScoreModel = (*customGameScoreModel)(nil)
|
||||
|
||||
type (
|
||||
// GameScoreModel is an interface to be customized, add more methods here,
|
||||
// and implement the added methods in customGameScoreModel.
|
||||
GameScoreModel interface {
|
||||
gameScoreModel
|
||||
}
|
||||
|
||||
customGameScoreModel struct {
|
||||
*defaultGameScoreModel
|
||||
}
|
||||
)
|
||||
|
||||
// NewGameScoreModel returns a model for the database table.
|
||||
func NewGameScoreModel(conn sqlx.SqlConn, c cache.CacheConf, opts ...cache.Option) GameScoreModel {
|
||||
return &customGameScoreModel{
|
||||
defaultGameScoreModel: newGameScoreModel(conn, c, opts...),
|
||||
}
|
||||
}
|
146
game_open_api/model/gamescoremodel_gen.go
Normal file
146
game_open_api/model/gamescoremodel_gen.go
Normal file
@ -0,0 +1,146 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
// versions:
|
||||
// goctl version: 1.7.5
|
||||
|
||||
package model
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/stores/builder"
|
||||
"github.com/zeromicro/go-zero/core/stores/cache"
|
||||
"github.com/zeromicro/go-zero/core/stores/sqlc"
|
||||
"github.com/zeromicro/go-zero/core/stores/sqlx"
|
||||
"github.com/zeromicro/go-zero/core/stringx"
|
||||
)
|
||||
|
||||
var (
|
||||
gameScoreFieldNames = builder.RawFieldNames(&GameScore{})
|
||||
gameScoreRows = strings.Join(gameScoreFieldNames, ",")
|
||||
gameScoreRowsExpectAutoSet = strings.Join(stringx.Remove(gameScoreFieldNames, "`create_at`", "`create_time`", "`created_at`", "`update_at`", "`update_time`", "`updated_at`"), ",")
|
||||
gameScoreRowsWithPlaceHolder = strings.Join(stringx.Remove(gameScoreFieldNames, "`app_user_id`", "`create_at`", "`create_time`", "`created_at`", "`update_at`", "`update_time`", "`updated_at`"), "=?,") + "=?"
|
||||
|
||||
cacheEcpmGameScoreAppUserIdPrefix = "cache:ecpm:gameScore:appUserId:"
|
||||
cacheEcpmGameScoreAppUserIdAppAccountPrefix = "cache:ecpm:gameScore:appUserId:appAccount:"
|
||||
)
|
||||
|
||||
type (
|
||||
gameScoreModel interface {
|
||||
Insert(ctx context.Context, data *GameScore) (sql.Result, error)
|
||||
FindOne(ctx context.Context, appUserId uint64) (*GameScore, error)
|
||||
FindOneByAppUserIdAppAccount(ctx context.Context, appUserId uint64, appAccount uint64) (*GameScore, error)
|
||||
Update(ctx context.Context, data *GameScore) error
|
||||
Delete(ctx context.Context, appUserId uint64) error
|
||||
}
|
||||
|
||||
defaultGameScoreModel struct {
|
||||
sqlc.CachedConn
|
||||
table string
|
||||
}
|
||||
|
||||
GameScore struct {
|
||||
AppUserId uint64 `db:"app_user_id"`
|
||||
AppAccount uint64 `db:"app_account"`
|
||||
Score uint64 `db:"score"`
|
||||
}
|
||||
)
|
||||
|
||||
func newGameScoreModel(conn sqlx.SqlConn, c cache.CacheConf, opts ...cache.Option) *defaultGameScoreModel {
|
||||
return &defaultGameScoreModel{
|
||||
CachedConn: sqlc.NewConn(conn, c, opts...),
|
||||
table: "`game_score`",
|
||||
}
|
||||
}
|
||||
|
||||
func (m *defaultGameScoreModel) Delete(ctx context.Context, appUserId uint64) error {
|
||||
data, err := m.FindOne(ctx, appUserId)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
ecpmGameScoreAppUserIdAppAccountKey := fmt.Sprintf("%s%v:%v", cacheEcpmGameScoreAppUserIdAppAccountPrefix, data.AppUserId, data.AppAccount)
|
||||
ecpmGameScoreAppUserIdKey := fmt.Sprintf("%s%v", cacheEcpmGameScoreAppUserIdPrefix, appUserId)
|
||||
_, err = m.ExecCtx(ctx, func(ctx context.Context, conn sqlx.SqlConn) (result sql.Result, err error) {
|
||||
query := fmt.Sprintf("delete from %s where `app_user_id` = ?", m.table)
|
||||
return conn.ExecCtx(ctx, query, appUserId)
|
||||
}, ecpmGameScoreAppUserIdAppAccountKey, ecpmGameScoreAppUserIdKey)
|
||||
return err
|
||||
}
|
||||
|
||||
func (m *defaultGameScoreModel) FindOne(ctx context.Context, appUserId uint64) (*GameScore, error) {
|
||||
ecpmGameScoreAppUserIdKey := fmt.Sprintf("%s%v", cacheEcpmGameScoreAppUserIdPrefix, appUserId)
|
||||
var resp GameScore
|
||||
err := m.QueryRowCtx(ctx, &resp, ecpmGameScoreAppUserIdKey, func(ctx context.Context, conn sqlx.SqlConn, v any) error {
|
||||
query := fmt.Sprintf("select %s from %s where `app_user_id` = ? limit 1", gameScoreRows, m.table)
|
||||
return conn.QueryRowCtx(ctx, v, query, appUserId)
|
||||
})
|
||||
switch err {
|
||||
case nil:
|
||||
return &resp, nil
|
||||
case sqlc.ErrNotFound:
|
||||
return nil, ErrNotFound
|
||||
default:
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
func (m *defaultGameScoreModel) FindOneByAppUserIdAppAccount(ctx context.Context, appUserId uint64, appAccount uint64) (*GameScore, error) {
|
||||
ecpmGameScoreAppUserIdAppAccountKey := fmt.Sprintf("%s%v:%v", cacheEcpmGameScoreAppUserIdAppAccountPrefix, appUserId, appAccount)
|
||||
var resp GameScore
|
||||
err := m.QueryRowIndexCtx(ctx, &resp, ecpmGameScoreAppUserIdAppAccountKey, m.formatPrimary, func(ctx context.Context, conn sqlx.SqlConn, v any) (i any, e error) {
|
||||
query := fmt.Sprintf("select %s from %s where `app_user_id` = ? and `app_account` = ? limit 1", gameScoreRows, m.table)
|
||||
if err := conn.QueryRowCtx(ctx, &resp, query, appUserId, appAccount); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp.AppUserId, nil
|
||||
}, m.queryPrimary)
|
||||
switch err {
|
||||
case nil:
|
||||
return &resp, nil
|
||||
case sqlc.ErrNotFound:
|
||||
return nil, ErrNotFound
|
||||
default:
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
func (m *defaultGameScoreModel) Insert(ctx context.Context, data *GameScore) (sql.Result, error) {
|
||||
ecpmGameScoreAppUserIdAppAccountKey := fmt.Sprintf("%s%v:%v", cacheEcpmGameScoreAppUserIdAppAccountPrefix, data.AppUserId, data.AppAccount)
|
||||
ecpmGameScoreAppUserIdKey := fmt.Sprintf("%s%v", cacheEcpmGameScoreAppUserIdPrefix, data.AppUserId)
|
||||
ret, err := m.ExecCtx(ctx, func(ctx context.Context, conn sqlx.SqlConn) (result sql.Result, err error) {
|
||||
query := fmt.Sprintf("insert into %s (%s) values (?, ?, ?)", m.table, gameScoreRowsExpectAutoSet)
|
||||
return conn.ExecCtx(ctx, query, data.AppUserId, data.AppAccount, data.Score)
|
||||
}, ecpmGameScoreAppUserIdAppAccountKey, ecpmGameScoreAppUserIdKey)
|
||||
return ret, err
|
||||
}
|
||||
|
||||
func (m *defaultGameScoreModel) Update(ctx context.Context, newData *GameScore) error {
|
||||
data, err := m.FindOne(ctx, newData.AppUserId)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
ecpmGameScoreAppUserIdAppAccountKey := fmt.Sprintf("%s%v:%v", cacheEcpmGameScoreAppUserIdAppAccountPrefix, data.AppUserId, data.AppAccount)
|
||||
ecpmGameScoreAppUserIdKey := fmt.Sprintf("%s%v", cacheEcpmGameScoreAppUserIdPrefix, data.AppUserId)
|
||||
_, err = m.ExecCtx(ctx, func(ctx context.Context, conn sqlx.SqlConn) (result sql.Result, err error) {
|
||||
query := fmt.Sprintf("update %s set %s where `app_user_id` = ?", m.table, gameScoreRowsWithPlaceHolder)
|
||||
return conn.ExecCtx(ctx, query, newData.AppAccount, newData.Score, newData.AppUserId)
|
||||
}, ecpmGameScoreAppUserIdAppAccountKey, ecpmGameScoreAppUserIdKey)
|
||||
return err
|
||||
}
|
||||
|
||||
func (m *defaultGameScoreModel) formatPrimary(primary any) string {
|
||||
return fmt.Sprintf("%s%v", cacheEcpmGameScoreAppUserIdPrefix, primary)
|
||||
}
|
||||
|
||||
func (m *defaultGameScoreModel) queryPrimary(ctx context.Context, conn sqlx.SqlConn, v, primary any) error {
|
||||
query := fmt.Sprintf("select %s from %s where `app_user_id` = ? limit 1", gameScoreRows, m.table)
|
||||
return conn.QueryRowCtx(ctx, v, query, primary)
|
||||
}
|
||||
|
||||
func (m *defaultGameScoreModel) tableName() string {
|
||||
return m.table
|
||||
}
|
5
game_open_api/model/vars.go
Normal file
5
game_open_api/model/vars.go
Normal file
@ -0,0 +1,5 @@
|
||||
package model
|
||||
|
||||
import "github.com/zeromicro/go-zero/core/stores/sqlx"
|
||||
|
||||
var ErrNotFound = sqlx.ErrNotFound
|
20
game_open_api/wechat.api
Normal file
20
game_open_api/wechat.api
Normal file
@ -0,0 +1,20 @@
|
||||
syntax = "v1"
|
||||
|
||||
type WechatCode2UserIdRequest {
|
||||
AppId string `form:"appId"`
|
||||
Code string `form:"code"`
|
||||
}
|
||||
|
||||
@server (
|
||||
group: wechat
|
||||
prefix: /v1/wechat // 对当前 Foo 语法块下的所有路由,新增 /v1 路由前缀,不需要则请删除此行
|
||||
timeout: 3s // 对当前 Foo 语法块下的所有路由进行超时配置,不需要则请删除此行
|
||||
maxBytes: 1048576 // 对当前 Foo 语法块下的所有路由添加请求体大小控制,单位为 byte,goctl 版本 >= 1.5.0 才支持
|
||||
)
|
||||
|
||||
service game_open_api-api {
|
||||
|
||||
@handler wechatCode2UserId
|
||||
get /code2userId (WechatCode2UserIdRequest) returns (uint64 )
|
||||
}
|
||||
|
71
go.mod
Normal file
71
go.mod
Normal file
@ -0,0 +1,71 @@
|
||||
module youtu_server
|
||||
|
||||
go 1.23.4
|
||||
|
||||
require (
|
||||
gitea.youtukeji.com.cn/xiabin/douyin-openapi v0.0.4
|
||||
gitea.youtukeji.com.cn/xiabin/youtu_ecpm v0.0.2
|
||||
github.com/zeromicro/go-zero v1.7.6
|
||||
)
|
||||
|
||||
require (
|
||||
filippo.io/edwards25519 v1.1.0 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/bradfitz/gomemcache v0.0.0-20220106215444-fb4bf637b56d // indirect
|
||||
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
||||
github.com/fatih/color v1.18.0 // indirect
|
||||
github.com/fatih/structs v1.1.0 // indirect
|
||||
github.com/go-logr/logr v1.4.2 // indirect
|
||||
github.com/go-logr/stdr v1.2.2 // indirect
|
||||
github.com/go-redis/redis/v8 v8.11.5 // indirect
|
||||
github.com/go-sql-driver/mysql v1.8.1 // indirect
|
||||
github.com/golang-jwt/jwt/v4 v4.5.1 // indirect
|
||||
github.com/google/uuid v1.6.0 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect
|
||||
github.com/jinzhu/inflection v1.0.0 // indirect
|
||||
github.com/jinzhu/now v1.1.5 // indirect
|
||||
github.com/klauspost/compress v1.17.9 // indirect
|
||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
||||
github.com/openzipkin/zipkin-go v0.4.3 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
|
||||
github.com/prometheus/client_golang v1.20.5 // indirect
|
||||
github.com/prometheus/client_model v0.6.1 // indirect
|
||||
github.com/prometheus/common v0.55.0 // indirect
|
||||
github.com/prometheus/procfs v0.15.1 // indirect
|
||||
github.com/redis/go-redis/v9 v9.7.0 // indirect
|
||||
github.com/silenceper/wechat/v2 v2.1.7 // indirect
|
||||
github.com/sirupsen/logrus v1.9.0 // indirect
|
||||
github.com/spaolacci/murmur3 v1.1.0 // indirect
|
||||
github.com/spf13/cast v1.7.1 // indirect
|
||||
github.com/tidwall/gjson v1.14.1 // indirect
|
||||
github.com/tidwall/match v1.1.1 // indirect
|
||||
github.com/tidwall/pretty v1.2.0 // indirect
|
||||
go.opentelemetry.io/otel v1.29.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/jaeger v1.17.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/zipkin v1.24.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.29.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.29.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.29.0 // indirect
|
||||
go.opentelemetry.io/proto/otlp v1.3.1 // indirect
|
||||
go.uber.org/automaxprocs v1.6.0 // indirect
|
||||
golang.org/x/crypto v0.32.0 // indirect
|
||||
golang.org/x/net v0.34.0 // indirect
|
||||
golang.org/x/sys v0.29.0 // indirect
|
||||
golang.org/x/text v0.21.0 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20241223144023-3abc09e42ca8 // indirect
|
||||
google.golang.org/grpc v1.67.3 // indirect
|
||||
google.golang.org/protobuf v1.36.3 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gorm.io/gorm v1.25.12 // indirect
|
||||
)
|
282
go.sum
Normal file
282
go.sum
Normal file
@ -0,0 +1,282 @@
|
||||
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
|
||||
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
|
||||
gitea.youtukeji.com.cn/xiabin/douyin-openapi v0.0.4 h1:xQmWix8yK+OlCJQlpNl5RiLRwbh+kli8YCcStZfdWCU=
|
||||
gitea.youtukeji.com.cn/xiabin/douyin-openapi v0.0.4/go.mod h1:7d5OkLrsgX/iI4E9nVi2hYC2vvLrDi/QKCuTF4S/k6g=
|
||||
gitea.youtukeji.com.cn/xiabin/youtu_ecpm v0.0.2 h1:i9BbGtp5SZuZxtHqaMg+3SPjrNNSvkWx0xr64n4eruQ=
|
||||
gitea.youtukeji.com.cn/xiabin/youtu_ecpm v0.0.2/go.mod h1:YkSYZfYADDMBQ5dunlhLueYKWBlb6sk2sWWXrJ7Nj6s=
|
||||
github.com/DATA-DOG/go-sqlmock v1.5.2 h1:OcvFkGmslmlZibjAjaHm3L//6LiuBgolP7OputlJIzU=
|
||||
github.com/DATA-DOG/go-sqlmock v1.5.2/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ+JlNzwDqpNU=
|
||||
github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc=
|
||||
github.com/alicebob/gopher-json v0.0.0-20230218143504-906a9b012302 h1:uvdUDbHQHO85qeSydJtItA4T55Pw6BtAejd0APRJOCE=
|
||||
github.com/alicebob/gopher-json v0.0.0-20230218143504-906a9b012302/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc=
|
||||
github.com/alicebob/miniredis/v2 v2.30.0/go.mod h1:84TWKZlxYkfgMucPBf5SOQBYJceZeQRFIaQgNMiCX6Q=
|
||||
github.com/alicebob/miniredis/v2 v2.34.0 h1:mBFWMaJSNL9RwdGRyEDoAAv8OQc5UlEhLDQggTglU/0=
|
||||
github.com/alicebob/miniredis/v2 v2.34.0/go.mod h1:kWShP4b58T1CW0Y5dViCd5ztzrDqRWqM3nksiyXk5s8=
|
||||
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
||||
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
||||
github.com/bradfitz/gomemcache v0.0.0-20220106215444-fb4bf637b56d h1:pVrfxiGfwelyab6n21ZBkbkmbevaf+WvMIiR7sr97hw=
|
||||
github.com/bradfitz/gomemcache v0.0.0-20220106215444-fb4bf637b56d/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA=
|
||||
github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=
|
||||
github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c=
|
||||
github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA=
|
||||
github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0=
|
||||
github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
|
||||
github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
|
||||
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
|
||||
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
||||
github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
|
||||
github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU=
|
||||
github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo=
|
||||
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
|
||||
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
|
||||
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M=
|
||||
github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
|
||||
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
|
||||
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
|
||||
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
|
||||
github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y=
|
||||
github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg=
|
||||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
|
||||
github.com/golang-jwt/jwt/v4 v4.5.1 h1:JdqV9zKUdtaa9gdPlywC3aeoEsR681PlKC+4F5gQgeo=
|
||||
github.com/golang-jwt/jwt/v4 v4.5.1/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
||||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
||||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k=
|
||||
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw=
|
||||
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
|
||||
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
|
||||
github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=
|
||||
github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
||||
github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA=
|
||||
github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
|
||||
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
||||
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
|
||||
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
|
||||
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
|
||||
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
|
||||
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
||||
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
||||
github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms=
|
||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
|
||||
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
|
||||
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
|
||||
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
|
||||
github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
|
||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||
github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
|
||||
github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs=
|
||||
github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI=
|
||||
github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M=
|
||||
github.com/openzipkin/zipkin-go v0.4.3 h1:9EGwpqkgnwdEIJ+Od7QVSEIH+ocmm5nPat0G7sjsSdg=
|
||||
github.com/openzipkin/zipkin-go v0.4.3/go.mod h1:M9wCJZFWCo2RiY+o1eBCEMe0Dp2S5LDHcMZmk3RmK7c=
|
||||
github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M=
|
||||
github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g=
|
||||
github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U=
|
||||
github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y=
|
||||
github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE=
|
||||
github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E=
|
||||
github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY=
|
||||
github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc=
|
||||
github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8=
|
||||
github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc=
|
||||
github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk=
|
||||
github.com/redis/go-redis/v9 v9.7.0 h1:HhLSs+B6O021gwzl+locl0zEDnyNkxMtf/Z3NNBMa9E=
|
||||
github.com/redis/go-redis/v9 v9.7.0/go.mod h1:f6zhXITC7JUJIlPEiBOTXxJgPLdZcA93GewI7inzyWw=
|
||||
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
|
||||
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
|
||||
github.com/silenceper/wechat/v2 v2.1.7 h1:v4AC4pa6NRm7Pa2FJnmWABOxZ9hx3IIo20xKT4t1msY=
|
||||
github.com/silenceper/wechat/v2 v2.1.7/go.mod h1:7Iu3EhQYVtDUJAj+ZVRy8yom75ga7aDWv8RurLkVm0s=
|
||||
github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0=
|
||||
github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
|
||||
github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
|
||||
github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
|
||||
github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
|
||||
github.com/spf13/cast v1.7.1 h1:cuNEagBQEHWN1FnbGEjCXL2szYEXqfJPbP2HNUaca9Y=
|
||||
github.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
|
||||
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
|
||||
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||
github.com/tidwall/gjson v1.14.1 h1:iymTbGkQBhveq21bEvAQ81I0LEBork8BFe1CUZXdyuo=
|
||||
github.com/tidwall/gjson v1.14.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
|
||||
github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA=
|
||||
github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=
|
||||
github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs=
|
||||
github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw=
|
||||
github.com/yuin/gopher-lua v1.1.1 h1:kYKnWBjvbNP4XLT3+bPEwAXJx262OhaHDWDVOPjL46M=
|
||||
github.com/yuin/gopher-lua v1.1.1/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw=
|
||||
github.com/zeromicro/go-zero v1.7.6 h1:SArK4xecdrpVY3ZFJcbc0IZCx+NuWyHNjCv9f1+Gwrc=
|
||||
github.com/zeromicro/go-zero v1.7.6/go.mod h1:SmGykRm5e0Z4CGNj+GaSKDffaHzQV56fel0FkymTLlE=
|
||||
go.opentelemetry.io/otel v1.29.0 h1:PdomN/Al4q/lN6iBJEN3AwPvUiHPMlt93c8bqTG5Llw=
|
||||
go.opentelemetry.io/otel v1.29.0/go.mod h1:N/WtXPs1CNCUEx+Agz5uouwCba+i+bJGFicT8SR4NP8=
|
||||
go.opentelemetry.io/otel/exporters/jaeger v1.17.0 h1:D7UpUy2Xc2wsi1Ras6V40q806WM07rqoCWzXu7Sqy+4=
|
||||
go.opentelemetry.io/otel/exporters/jaeger v1.17.0/go.mod h1:nPCqOnEH9rNLKqH/+rrUjiMzHJdV1BlpKcTwRTyKkKI=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm4ooDBZVb01IhLB4InpomhRw8=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 h1:Mw5xcxMwlqoJd97vwPxA8isEaIoxsta9/Q51+TTJLGE=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0/go.mod h1:CQNu9bj7o7mC6U7+CA/schKEYakYXWr79ucDHTMGhCM=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM=
|
||||
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 h1:s0PHtIkN+3xrbDOpt2M8OTG92cWqUESvzh2MxiR5xY8=
|
||||
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0/go.mod h1:hZlFbDbRt++MMPCCfSJfmhkGIWnX1h3XjkfxZUjLrIA=
|
||||
go.opentelemetry.io/otel/exporters/zipkin v1.24.0 h1:3evrL5poBuh1KF51D9gO/S+N/1msnm4DaBqs/rpXUqY=
|
||||
go.opentelemetry.io/otel/exporters/zipkin v1.24.0/go.mod h1:0EHgD8R0+8yRhUYJOGR8Hfg2dpiJQxDOszd5smVO9wM=
|
||||
go.opentelemetry.io/otel/metric v1.29.0 h1:vPf/HFWTNkPu1aYeIsc98l4ktOQaL6LeSoeV2g+8YLc=
|
||||
go.opentelemetry.io/otel/metric v1.29.0/go.mod h1:auu/QWieFVWx+DmQOUMgj0F8LHWdgalxXqvp7BII/W8=
|
||||
go.opentelemetry.io/otel/sdk v1.29.0 h1:vkqKjk7gwhS8VaWb0POZKmIEDimRCMsopNYnriHyryo=
|
||||
go.opentelemetry.io/otel/sdk v1.29.0/go.mod h1:pM8Dx5WKnvxLCb+8lG1PRNIDxu9g9b9g59Qr7hfAAok=
|
||||
go.opentelemetry.io/otel/trace v1.29.0 h1:J/8ZNK4XgR7a21DZUAsbF8pZ5Jcw1VhACmnYt39JTi4=
|
||||
go.opentelemetry.io/otel/trace v1.29.0/go.mod h1:eHl3w0sp3paPkYstJOmAimxhiFXPg+MMTlEh3nsQgWQ=
|
||||
go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0=
|
||||
go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8=
|
||||
go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs=
|
||||
go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc=
|
||||
golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0=
|
||||
golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/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-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU=
|
||||
golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
|
||||
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576 h1:CkkIfIt50+lT6NHAVoRYEyAvQGFM7xEwXUUywFvEb3Q=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576/go.mod h1:1R3kvZ1dtP3+4p4d3G8uJ8rFk/fWlScl38vanWACI08=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20241223144023-3abc09e42ca8 h1:TqExAhdPaB60Ux47Cn0oLV07rGnxZzIsaRhQaqS666A=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20241223144023-3abc09e42ca8/go.mod h1:lcTa1sDdWEIHMWlITnIczmw5w60CF9ffkb8Z+DVmmjA=
|
||||
google.golang.org/grpc v1.67.3 h1:OgPcDAFKHnH8X3O4WcO4XUc8GRDeKsKReqbQtiCj7N8=
|
||||
google.golang.org/grpc v1.67.3/go.mod h1:YGaHCc6Oap+FzBJTZLBzkGSYt/cvGPFTPxkn7QfSU8s=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
||||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
||||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.36.3 h1:82DV7MYdb8anAVi3qge1wSnMDrnKK7ebr+I0hHRN1BU=
|
||||
google.golang.org/protobuf v1.36.3/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/h2non/gock.v1 v1.1.2 h1:jBbHXgGBK/AoPVfJh5x4r/WxIrElvbLel8TCZkkZJoY=
|
||||
gopkg.in/h2non/gock.v1 v1.1.2/go.mod h1:n7UGz/ckNChHiK05rDoiC4MYSunEC/lyaUm2WWaDva0=
|
||||
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/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gorm.io/gorm v1.25.12 h1:I0u8i2hWQItBq1WfE0o2+WuL9+8L21K9e2HHSTE/0f8=
|
||||
gorm.io/gorm v1.25.12/go.mod h1:xh7N7RHfYlNc5EmcI/El95gXusucDrQnHXe0+CgWcLQ=
|
||||
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A=
|
||||
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
|
Loading…
x
Reference in New Issue
Block a user