From 0e0bc047aeaa0f11189cf5724984ba08962cdc9f Mon Sep 17 00:00:00 2001 From: sunxiaolong Date: Wed, 15 Nov 2023 14:31:37 +0800 Subject: [PATCH] =?UTF-8?q?:git:=E6=8F=90=E4=BA=A4git=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitattributes | 1 + .gitignore | 19 + Makefile | 6 + README.MD | 4 + api/common/common.go | 15 + api/common/v1/captcha.go | 13 + api/user_center/user_center.go | 16 + api/user_center/user_login.go | 16 + api/user_center/v1/login.go | 19 + go.mod | 32 ++ go.sum | 67 ++++ hack/config.yaml | 11 + hack/hack-cli.mk | 19 + hack/hack.mk | 75 ++++ internal/cmd/cmd.go | 31 ++ internal/consts/consts.go | 1 + internal/controller/common/common.go | 5 + internal/controller/common/common_new.go | 15 + .../common/common_v1_get_captcha.go | 25 ++ .../controller/user_center/user_center.go | 5 + .../controller/user_center/user_center_new.go | 15 + .../user_center/user_center_v1_login.go | 14 + .../user_center/user_center_v1_logout.go | 14 + internal/dao/.gitkeep | 0 internal/dao/internal/road_info.go | 125 +++++++ internal/dao/internal/sys_auth_rule.go | 95 +++++ internal/dao/internal/user.go | 87 +++++ internal/dao/internal/user_login_log.go | 83 +++++ internal/dao/road_info.go | 27 ++ internal/dao/sys_auth_rule.go | 27 ++ internal/dao/user.go | 27 ++ internal/dao/user_login_log.go | 27 ++ internal/logic/.gitkeep | 0 internal/logic/logic.go | 9 + internal/logic/user_center/user_center.go | 2 + internal/model/.gitkeep | 0 internal/model/do/.gitkeep | 0 internal/model/do/road_info.go | 42 +++ internal/model/do/sys_auth_rule.go | 27 ++ internal/model/do/user.go | 23 ++ internal/model/do/user_login_log.go | 21 ++ internal/model/entity/.gitkeep | 0 internal/model/entity/road_info.go | 40 ++ internal/model/entity/sys_auth_rule.go | 25 ++ internal/model/entity/user.go | 21 ++ internal/model/entity/user_login_log.go | 19 + internal/packed/packed.go | 1 + internal/service/.gitkeep | 0 internal/service/captcha.go | 32 ++ main.go | 15 + .../deploy/kustomize/base/deployment.yaml | 21 ++ .../deploy/kustomize/base/kustomization.yaml | 8 + manifest/deploy/kustomize/base/service.yaml | 12 + .../kustomize/overlays/develop/configmap.yaml | 14 + .../overlays/develop/deployment.yaml | 10 + .../overlays/develop/kustomization.yaml | 14 + manifest/docker/Dockerfile | 16 + manifest/docker/docker.sh | 8 + manifest/i18n/.gitkeep | 0 manifest/protobuf/.keep-if-necessary | 0 resource/log/server/2023-11-15.log | 342 ++++++++++++++++++ resource/public/html/.gitkeep | 0 resource/public/plugin/.gitkeep | 0 resource/public/resource/css/.gitkeep | 0 resource/public/resource/image/.gitkeep | 0 resource/public/resource/js/.gitkeep | 0 resource/template/.gitkeep | 0 utility/.gitkeep | 0 68 files changed, 1658 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 README.MD create mode 100644 api/common/common.go create mode 100644 api/common/v1/captcha.go create mode 100644 api/user_center/user_center.go create mode 100644 api/user_center/user_login.go create mode 100644 api/user_center/v1/login.go create mode 100644 go.mod create mode 100644 go.sum create mode 100644 hack/config.yaml create mode 100644 hack/hack-cli.mk create mode 100644 hack/hack.mk create mode 100644 internal/cmd/cmd.go create mode 100644 internal/consts/consts.go create mode 100644 internal/controller/common/common.go create mode 100644 internal/controller/common/common_new.go create mode 100644 internal/controller/common/common_v1_get_captcha.go create mode 100644 internal/controller/user_center/user_center.go create mode 100644 internal/controller/user_center/user_center_new.go create mode 100644 internal/controller/user_center/user_center_v1_login.go create mode 100644 internal/controller/user_center/user_center_v1_logout.go create mode 100644 internal/dao/.gitkeep create mode 100644 internal/dao/internal/road_info.go create mode 100644 internal/dao/internal/sys_auth_rule.go create mode 100644 internal/dao/internal/user.go create mode 100644 internal/dao/internal/user_login_log.go create mode 100644 internal/dao/road_info.go create mode 100644 internal/dao/sys_auth_rule.go create mode 100644 internal/dao/user.go create mode 100644 internal/dao/user_login_log.go create mode 100644 internal/logic/.gitkeep create mode 100644 internal/logic/logic.go create mode 100644 internal/model/.gitkeep create mode 100644 internal/model/do/.gitkeep create mode 100644 internal/model/do/road_info.go create mode 100644 internal/model/do/sys_auth_rule.go create mode 100644 internal/model/do/user.go create mode 100644 internal/model/do/user_login_log.go create mode 100644 internal/model/entity/.gitkeep create mode 100644 internal/model/entity/road_info.go create mode 100644 internal/model/entity/sys_auth_rule.go create mode 100644 internal/model/entity/user.go create mode 100644 internal/model/entity/user_login_log.go create mode 100644 internal/packed/packed.go create mode 100644 internal/service/.gitkeep create mode 100644 internal/service/captcha.go create mode 100644 main.go create mode 100644 manifest/deploy/kustomize/base/deployment.yaml create mode 100644 manifest/deploy/kustomize/base/kustomization.yaml create mode 100644 manifest/deploy/kustomize/base/service.yaml create mode 100644 manifest/deploy/kustomize/overlays/develop/configmap.yaml create mode 100644 manifest/deploy/kustomize/overlays/develop/deployment.yaml create mode 100644 manifest/deploy/kustomize/overlays/develop/kustomization.yaml create mode 100644 manifest/docker/Dockerfile create mode 100644 manifest/docker/docker.sh create mode 100644 manifest/i18n/.gitkeep create mode 100644 manifest/protobuf/.keep-if-necessary create mode 100644 resource/log/server/2023-11-15.log create mode 100644 resource/public/html/.gitkeep create mode 100644 resource/public/plugin/.gitkeep create mode 100644 resource/public/resource/css/.gitkeep create mode 100644 resource/public/resource/image/.gitkeep create mode 100644 resource/public/resource/js/.gitkeep create mode 100644 resource/template/.gitkeep create mode 100644 utility/.gitkeep diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..1fbf887f --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* linguist-language=GO \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..18646b63 --- /dev/null +++ b/.gitignore @@ -0,0 +1,19 @@ +.buildpath +.hgignore.swp +.project +.orig +.swp +.idea/ +.settings/ +.vscode/ +bin/ +**/.DS_Store +gf +main +main.exe +output/ +manifest/output/ +temp/ +temp.yaml +bin +**/config/config.yaml \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..939fef73 --- /dev/null +++ b/Makefile @@ -0,0 +1,6 @@ +ROOT_DIR = $(shell pwd) +NAMESPACE = "default" +DEPLOY_NAME = "template-single" +DOCKER_NAME = "template-single" + +include ./hack/hack.mk \ No newline at end of file diff --git a/README.MD b/README.MD new file mode 100644 index 00000000..83405ed6 --- /dev/null +++ b/README.MD @@ -0,0 +1,4 @@ +# GoFrame Template For SingleRepo + +Quick Start: +- https://goframe.org/pages/viewpage.action?pageId=1114399 \ No newline at end of file diff --git a/api/common/common.go b/api/common/common.go new file mode 100644 index 00000000..8f4a20d7 --- /dev/null +++ b/api/common/common.go @@ -0,0 +1,15 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package common + +import ( + "context" + + "kami/api/common/v1" +) + +type ICommonV1 interface { + GetCaptcha(ctx context.Context, req *v1.GetCaptchaReq) (res *v1.GetCaptchaRes, err error) +} diff --git a/api/common/v1/captcha.go b/api/common/v1/captcha.go new file mode 100644 index 00000000..05b08abf --- /dev/null +++ b/api/common/v1/captcha.go @@ -0,0 +1,13 @@ +package v1 + +import "github.com/gogf/gf/v2/frame/g" + +type GetCaptchaReq struct { + g.Meta `path:"/captcha" tags:"验证码接口" method:"get" summary:"获取验证码接口"` +} + +type GetCaptchaRes struct { + g.Meta `mime:"text/*"` + Key string `json:"key"` + Img string `json:"img"` +} diff --git a/api/user_center/user_center.go b/api/user_center/user_center.go new file mode 100644 index 00000000..92f7fdc8 --- /dev/null +++ b/api/user_center/user_center.go @@ -0,0 +1,16 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package user_center + +import ( + "context" + + "kami/api/user_center/v1" +) + +type IUserCenterV1 interface { + Login(ctx context.Context, req *v1.LoginReq) (res *v1.LoginRes, err error) + Logout(ctx context.Context, req *v1.LogoutReq) (res *v1.LogoutRes, err error) +} diff --git a/api/user_center/user_login.go b/api/user_center/user_login.go new file mode 100644 index 00000000..d5fe0536 --- /dev/null +++ b/api/user_center/user_login.go @@ -0,0 +1,16 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package user_center + +import ( + "context" + + "kami/api/user_center/v1" +) + +type IUserLoginV1 interface { + Login(ctx context.Context, req *v1.LoginReq) (res *v1.LoginRes, err error) + Logout(ctx context.Context, req *v1.LogoutReq) (res *v1.LogoutRes, err error) +} diff --git a/api/user_center/v1/login.go b/api/user_center/v1/login.go new file mode 100644 index 00000000..9b18f6c8 --- /dev/null +++ b/api/user_center/v1/login.go @@ -0,0 +1,19 @@ +package v1 + +import "github.com/gogf/gf/v2/frame/g" + +type LoginReq struct { + g.Meta `path:"/user_center" tags:"登录" method:"post" summary:"用户登录接口"` +} + +type LoginRes struct { + g.Meta `mime:"application/json"` +} + +type LogoutReq struct { + g.Meta `path:"/logout" tags:"退出登录" method:"post" summary:"用户退出登录接口"` +} + +type LogoutRes struct { + g.Meta `mime:"application/json"` +} diff --git a/go.mod b/go.mod new file mode 100644 index 00000000..2912e629 --- /dev/null +++ b/go.mod @@ -0,0 +1,32 @@ +module kami + +go 1.18 + +require github.com/gogf/gf/v2 v2.5.2 + +require ( + github.com/BurntSushi/toml v1.2.0 // indirect + github.com/clbanning/mxj/v2 v2.7.0 // indirect + github.com/fatih/color v1.15.0 // indirect + github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect + github.com/gorilla/websocket v1.5.0 // indirect + github.com/grokify/html-strip-tags-go v0.0.1 // indirect + github.com/magiconair/properties v1.8.6 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.19 // indirect + github.com/mattn/go-runewidth v0.0.15 // indirect + github.com/mojocn/base64Captcha v1.3.5 // indirect + github.com/olekukonko/tablewriter v0.0.5 // indirect + github.com/rivo/uniseg v0.4.4 // indirect + go.opentelemetry.io/otel v1.14.0 // indirect + go.opentelemetry.io/otel/sdk v1.14.0 // indirect + go.opentelemetry.io/otel/trace v1.14.0 // indirect + golang.org/x/image v0.14.0 // indirect + golang.org/x/net v0.12.0 // indirect + golang.org/x/sys v0.10.0 // indirect + golang.org/x/text v0.14.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 00000000..06e743f3 --- /dev/null +++ b/go.sum @@ -0,0 +1,67 @@ +github.com/BurntSushi/toml v1.2.0 h1:Rt8g24XnyGTyglgET/PRUNlrUeu9F5L+7FilkXfZgs0= +github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/clbanning/mxj/v2 v2.7.0 h1:WA/La7UGCanFe5NpHF0Q3DNtnCsVoxbPKuyBNHWRyME= +github.com/clbanning/mxj/v2 v2.7.0/go.mod h1:hNiWqW14h+kc+MdF9C6/YoRfjEJoR3ou6tn/Qo+ve2s= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= +github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= +github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +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/gogf/gf/v2 v2.5.2 h1:fACJE7DJH6iTGHGhgiNY1uuZIZtr2IqQkJ52E+wBnt8= +github.com/gogf/gf/v2 v2.5.2/go.mod h1:7yf5qp0BznfsYx7Sw49m3mQvBsHpwAjJk3Q9ZnKoUEc= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grokify/html-strip-tags-go v0.0.1 h1:0fThFwLbW7P/kOiTBs03FsJSV9RM2M/Q/MOnCQxKMo0= +github.com/grokify/html-strip-tags-go v0.0.1/go.mod h1:2Su6romC5/1VXOQMaWL2yb618ARB8iVo6/DR99A6d78= +github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= +github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +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.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= +github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mojocn/base64Captcha v1.3.5 h1:Qeilr7Ta6eDtG4S+tQuZ5+hO+QHbiGAJdi4PfoagaA0= +github.com/mojocn/base64Captcha v1.3.5/go.mod h1:/tTTXn4WTpX9CfrmipqRytCpJ27Uw3G6I7NcP2WwcmY= +github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= +github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= +github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= +go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= +go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= +go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY= +go.opentelemetry.io/otel/sdk v1.14.0/go.mod h1:bwIC5TjrNG6QDCHNWvW4HLHtUQ4I+VQDsnjhvyZCALM= +go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= +go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8= +golang.org/x/image v0.0.0-20190501045829-6d32002ffd75/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.14.0 h1:tNgSxAFe3jC4uYqvZdTr84SZoM1KfwdC9SKIFrLjFn4= +golang.org/x/image v0.14.0/go.mod h1:HUYqC05R2ZcZ3ejNQsIHQDQiwWM4JBqmm6MKANTp4LE= +golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= +golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= +golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= +golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +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.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/hack/config.yaml b/hack/config.yaml new file mode 100644 index 00000000..2ff9cf21 --- /dev/null +++ b/hack/config.yaml @@ -0,0 +1,11 @@ +gfcli: + docker: + build: "-a amd64 -s linux -p temp -ew" + tagPrefixes: + - my.image.pub/my-app + gen: + dao: + - link: "mysql:root:123456@tcp(127.0.0.1:3306)/kami_v2" + descriptionTag: true + noModelComment: true + path: "./internal" \ No newline at end of file diff --git a/hack/hack-cli.mk b/hack/hack-cli.mk new file mode 100644 index 00000000..7ba0d726 --- /dev/null +++ b/hack/hack-cli.mk @@ -0,0 +1,19 @@ + +# Install/Update to the latest CLI tool. +.PHONY: cli +cli: + @set -e; \ + wget -O gf https://github.com/gogf/gf/releases/latest/download/gf_$(shell go env GOOS)_$(shell go env GOARCH) && \ + chmod +x gf && \ + ./gf install -y && \ + rm ./gf + + +# Check and install CLI tool. +.PHONY: cli.install +cli.install: + @set -e; \ + gf -v > /dev/null 2>&1 || if [[ "$?" -ne "0" ]]; then \ + echo "GoFame CLI is not installed, start proceeding auto installation..."; \ + make cli; \ + fi; \ No newline at end of file diff --git a/hack/hack.mk b/hack/hack.mk new file mode 100644 index 00000000..1a42d775 --- /dev/null +++ b/hack/hack.mk @@ -0,0 +1,75 @@ +include ./hack/hack-cli.mk + +# Update GoFrame and its CLI to latest stable version. +.PHONY: up +up: cli.install + @gf up -a + +# Build binary using configuration from hack/config.yaml. +.PHONY: build +build: cli.install + @gf build -ew + +# Parse api and generate controller/sdk. +.PHONY: ctrl +ctrl: cli.install + @gf gen ctrl + +# Generate Go files for DAO/DO/Entity. +.PHONY: dao +dao: cli.install + @gf gen dao + +# Parse current project go files and generate enums go file. +.PHONY: enums +enums: cli.install + @gf gen enums + +# Generate Go files for Service. +.PHONY: service +service: cli.install + @gf gen service + + +# Build docker image. +.PHONY: image +image: cli.install + $(eval _TAG = $(shell git describe --dirty --always --tags --abbrev=8 --match 'v*' | sed 's/-/./2' | sed 's/-/./2')) +ifneq (, $(shell git status --porcelain 2>/dev/null)) + $(eval _TAG = $(_TAG).dirty) +endif + $(eval _TAG = $(if ${TAG}, ${TAG}, $(_TAG))) + $(eval _PUSH = $(if ${PUSH}, ${PUSH}, )) + @gf docker ${_PUSH} -tn $(DOCKER_NAME):${_TAG}; + + +# Build docker image and automatically push to docker repo. +.PHONY: image.push +image.push: + @make image PUSH=-p; + + +# Deploy image and yaml to current kubectl environment. +.PHONY: deploy +deploy: + $(eval _TAG = $(if ${TAG}, ${TAG}, develop)) + + @set -e; \ + mkdir -p $(ROOT_DIR)/temp/kustomize;\ + cd $(ROOT_DIR)/manifest/deploy/kustomize/overlays/${_ENV};\ + kustomize build > $(ROOT_DIR)/temp/kustomize.yaml;\ + kubectl apply -f $(ROOT_DIR)/temp/kustomize.yaml; \ + if [ $(DEPLOY_NAME) != "" ]; then \ + kubectl patch -n $(NAMESPACE) deployment/$(DEPLOY_NAME) -p "{\"spec\":{\"template\":{\"metadata\":{\"labels\":{\"date\":\"$(shell date +%s)\"}}}}}"; \ + fi; + + +# Parsing protobuf files and generating go files. +.PHONY: pb +pb: cli.install + @gf gen pb + +# Generate protobuf files for database tables. +.PHONY: pbentity +pbentity: cli.install + @gf gen pbentity \ No newline at end of file diff --git a/internal/cmd/cmd.go b/internal/cmd/cmd.go new file mode 100644 index 00000000..d3df3ebd --- /dev/null +++ b/internal/cmd/cmd.go @@ -0,0 +1,31 @@ +package cmd + +import ( + "context" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/net/ghttp" + "github.com/gogf/gf/v2/os/gcmd" + "kami/internal/controller/common" + "kami/internal/controller/user_center" +) + +var ( + Main = gcmd.Command{ + Name: "main", + Usage: "main", + Brief: "start http server", + Func: func(ctx context.Context, parser *gcmd.Parser) (err error) { + s := g.Server() + s.Group("/", func(group *ghttp.RouterGroup) { + }) + + s.Group("/api", func(group *ghttp.RouterGroup) { + group.Middleware(ghttp.MiddlewareHandlerResponse) + group.Bind(common.NewV1()) + group.Bind(user_center.NewV1()) + }) + s.Run() + return nil + }, + } +) diff --git a/internal/consts/consts.go b/internal/consts/consts.go new file mode 100644 index 00000000..d709a2be --- /dev/null +++ b/internal/consts/consts.go @@ -0,0 +1 @@ +package consts diff --git a/internal/controller/common/common.go b/internal/controller/common/common.go new file mode 100644 index 00000000..76ec6912 --- /dev/null +++ b/internal/controller/common/common.go @@ -0,0 +1,5 @@ +// ================================================================================= +// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. +// ================================================================================= + +package common diff --git a/internal/controller/common/common_new.go b/internal/controller/common/common_new.go new file mode 100644 index 00000000..fcb2ea52 --- /dev/null +++ b/internal/controller/common/common_new.go @@ -0,0 +1,15 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package common + +import ( + "kami/api/common" +) + +type ControllerV1 struct{} + +func NewV1() common.ICommonV1 { + return &ControllerV1{} +} diff --git a/internal/controller/common/common_v1_get_captcha.go b/internal/controller/common/common_v1_get_captcha.go new file mode 100644 index 00000000..2ef6fac6 --- /dev/null +++ b/internal/controller/common/common_v1_get_captcha.go @@ -0,0 +1,25 @@ +package common + +import ( + "context" + "kami/internal/service" + + "kami/api/common/v1" +) + +func (c *ControllerV1) GetCaptcha(ctx context.Context, req *v1.GetCaptchaReq) (res *v1.GetCaptchaRes, err error) { + var ( + idKeyC, base64stringC string + ) + idKeyC, base64stringC, err = service.Captcha().GetVerifyImgString(ctx) + + if err != nil { + return + } + + res = &v1.GetCaptchaRes{ + Key: idKeyC, + Img: base64stringC, + } + return +} diff --git a/internal/controller/user_center/user_center.go b/internal/controller/user_center/user_center.go new file mode 100644 index 00000000..d3f2b400 --- /dev/null +++ b/internal/controller/user_center/user_center.go @@ -0,0 +1,5 @@ +// ================================================================================= +// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. +// ================================================================================= + +package user_center diff --git a/internal/controller/user_center/user_center_new.go b/internal/controller/user_center/user_center_new.go new file mode 100644 index 00000000..8e7c1e6a --- /dev/null +++ b/internal/controller/user_center/user_center_new.go @@ -0,0 +1,15 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package user_center + +import ( + "kami/api/user_center" +) + +type ControllerV1 struct{} + +func NewV1() user_center.IUserCenterV1 { + return &ControllerV1{} +} diff --git a/internal/controller/user_center/user_center_v1_login.go b/internal/controller/user_center/user_center_v1_login.go new file mode 100644 index 00000000..c98fcb84 --- /dev/null +++ b/internal/controller/user_center/user_center_v1_login.go @@ -0,0 +1,14 @@ +package user_center + +import ( + "context" + + "github.com/gogf/gf/v2/errors/gcode" + "github.com/gogf/gf/v2/errors/gerror" + + "kami/api/user_center/v1" +) + +func (c *ControllerV1) Login(ctx context.Context, req *v1.LoginReq) (res *v1.LoginRes, err error) { + return nil, gerror.NewCode(gcode.CodeNotImplemented) +} diff --git a/internal/controller/user_center/user_center_v1_logout.go b/internal/controller/user_center/user_center_v1_logout.go new file mode 100644 index 00000000..219ae113 --- /dev/null +++ b/internal/controller/user_center/user_center_v1_logout.go @@ -0,0 +1,14 @@ +package user_center + +import ( + "context" + + "github.com/gogf/gf/v2/errors/gcode" + "github.com/gogf/gf/v2/errors/gerror" + + "kami/api/user_center/v1" +) + +func (c *ControllerV1) Logout(ctx context.Context, req *v1.LogoutReq) (res *v1.LogoutRes, err error) { + return nil, gerror.NewCode(gcode.CodeNotImplemented) +} diff --git a/internal/dao/.gitkeep b/internal/dao/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/internal/dao/internal/road_info.go b/internal/dao/internal/road_info.go new file mode 100644 index 00000000..8d06f939 --- /dev/null +++ b/internal/dao/internal/road_info.go @@ -0,0 +1,125 @@ +// ========================================================================== +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ========================================================================== + +package internal + +import ( + "context" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/frame/g" +) + +// RoadInfoDao is the data access object for table road_info. +type RoadInfoDao struct { + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of current DAO. + columns RoadInfoColumns // columns contains all the column names of Table for convenient usage. +} + +// RoadInfoColumns defines and stores column names for table road_info. +type RoadInfoColumns struct { + Id string // 主键,自增 + Status string // + RoadName string // 通道名称 + RoadUid string // 通道唯一id + Remark string // 备注 + ProductName string // 上游产品名称 + ProductUid string // 上游产品编号 + BasicFee string // 基本汇率/成本汇率 + SettleFee string // 代付手续费 + TotalLimit string // 通道总额度 + TodayLimit string // 每日最多额度 + SingleMinLimit string // 单笔最小金额 + SingleMaxLimit string // 单笔最大金额 + StarHour string // 通道开始时间 + EndHour string // 通道结束时间 + Params string // 参数json格式 + TodayIncome string // 当天的收入 + TotalIncome string // 通道总收入 + TodayProfit string // 当天的收益 + TotalProfit string // 通道总收益 + Balance string // 通道的余额 + RequestAll string // 请求总次数 + RequestSuccess string // 请求成功次数 + UpdateTime string // 更新时间 + CreateTime string // 创建时间 + TodayRequestAll string // + TodayRequestSuccess string // +} + +// roadInfoColumns holds the columns for table road_info. +var roadInfoColumns = RoadInfoColumns{ + Id: "id", + Status: "status", + RoadName: "road_name", + RoadUid: "road_uid", + Remark: "remark", + ProductName: "product_name", + ProductUid: "product_uid", + BasicFee: "basic_fee", + SettleFee: "settle_fee", + TotalLimit: "total_limit", + TodayLimit: "today_limit", + SingleMinLimit: "single_min_limit", + SingleMaxLimit: "single_max_limit", + StarHour: "star_hour", + EndHour: "end_hour", + Params: "params", + TodayIncome: "today_income", + TotalIncome: "total_income", + TodayProfit: "today_profit", + TotalProfit: "total_profit", + Balance: "balance", + RequestAll: "request_all", + RequestSuccess: "request_success", + UpdateTime: "update_time", + CreateTime: "create_time", + TodayRequestAll: "today_request_all", + TodayRequestSuccess: "today_request_success", +} + +// NewRoadInfoDao creates and returns a new DAO object for table data access. +func NewRoadInfoDao() *RoadInfoDao { + return &RoadInfoDao{ + group: "default", + table: "road_info", + columns: roadInfoColumns, + } +} + +// DB retrieves and returns the underlying raw database management object of current DAO. +func (dao *RoadInfoDao) DB() gdb.DB { + return g.DB(dao.group) +} + +// Table returns the table name of current dao. +func (dao *RoadInfoDao) Table() string { + return dao.table +} + +// Columns returns all column names of current dao. +func (dao *RoadInfoDao) Columns() RoadInfoColumns { + return dao.columns +} + +// Group returns the configuration group name of database of current dao. +func (dao *RoadInfoDao) Group() string { + return dao.group +} + +// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +func (dao *RoadInfoDao) Ctx(ctx context.Context) *gdb.Model { + return dao.DB().Model(dao.table).Safe().Ctx(ctx) +} + +// Transaction wraps the transaction logic using function f. +// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It commits the transaction and returns nil if function f returns nil. +// +// Note that, you should not Commit or Rollback the transaction in function f +// as it is automatically handled by this function. +func (dao *RoadInfoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { + return dao.Ctx(ctx).Transaction(ctx, f) +} diff --git a/internal/dao/internal/sys_auth_rule.go b/internal/dao/internal/sys_auth_rule.go new file mode 100644 index 00000000..679a788b --- /dev/null +++ b/internal/dao/internal/sys_auth_rule.go @@ -0,0 +1,95 @@ +// ========================================================================== +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ========================================================================== + +package internal + +import ( + "context" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/frame/g" +) + +// SysAuthRuleDao is the data access object for table sys_auth_rule. +type SysAuthRuleDao struct { + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of current DAO. + columns SysAuthRuleColumns // columns contains all the column names of Table for convenient usage. +} + +// SysAuthRuleColumns defines and stores column names for table sys_auth_rule. +type SysAuthRuleColumns struct { + Id string // + Pid string // 父ID + Name string // 规则名称 + Title string // 规则名称 + MenuType string // 类型 0目录 1菜单 2按钮 + Weigh string // 权重 + IsHide string // 显示状态 + Path string // 路由地址 + Component string // 组件路径 + CreatedAt string // 创建日期 + UpdatedAt string // 修改日期 + IdAdmin string // 是否管理员独享 1是2.否 +} + +// sysAuthRuleColumns holds the columns for table sys_auth_rule. +var sysAuthRuleColumns = SysAuthRuleColumns{ + Id: "id", + Pid: "pid", + Name: "name", + Title: "title", + MenuType: "menu_type", + Weigh: "weigh", + IsHide: "is_hide", + Path: "path", + Component: "component", + CreatedAt: "created_at", + UpdatedAt: "updated_at", + IdAdmin: "id_admin", +} + +// NewSysAuthRuleDao creates and returns a new DAO object for table data access. +func NewSysAuthRuleDao() *SysAuthRuleDao { + return &SysAuthRuleDao{ + group: "default", + table: "sys_auth_rule", + columns: sysAuthRuleColumns, + } +} + +// DB retrieves and returns the underlying raw database management object of current DAO. +func (dao *SysAuthRuleDao) DB() gdb.DB { + return g.DB(dao.group) +} + +// Table returns the table name of current dao. +func (dao *SysAuthRuleDao) Table() string { + return dao.table +} + +// Columns returns all column names of current dao. +func (dao *SysAuthRuleDao) Columns() SysAuthRuleColumns { + return dao.columns +} + +// Group returns the configuration group name of database of current dao. +func (dao *SysAuthRuleDao) Group() string { + return dao.group +} + +// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +func (dao *SysAuthRuleDao) Ctx(ctx context.Context) *gdb.Model { + return dao.DB().Model(dao.table).Safe().Ctx(ctx) +} + +// Transaction wraps the transaction logic using function f. +// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It commits the transaction and returns nil if function f returns nil. +// +// Note that, you should not Commit or Rollback the transaction in function f +// as it is automatically handled by this function. +func (dao *SysAuthRuleDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { + return dao.Ctx(ctx).Transaction(ctx, f) +} diff --git a/internal/dao/internal/user.go b/internal/dao/internal/user.go new file mode 100644 index 00000000..680c8875 --- /dev/null +++ b/internal/dao/internal/user.go @@ -0,0 +1,87 @@ +// ========================================================================== +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ========================================================================== + +package internal + +import ( + "context" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/frame/g" +) + +// UserDao is the data access object for table user. +type UserDao struct { + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of current DAO. + columns UserColumns // columns contains all the column names of Table for convenient usage. +} + +// UserColumns defines and stores column names for table user. +type UserColumns struct { + Id string // ID + Username string // 账号 + Password string // 密码 + IsAdmin string // 是否是管理员 + Phone string // 手机号 + CreatedAt string // + UpdatedAt string // + DeletedAt string // +} + +// userColumns holds the columns for table user. +var userColumns = UserColumns{ + Id: "id", + Username: "username", + Password: "password", + IsAdmin: "is_admin", + Phone: "phone", + CreatedAt: "created_at", + UpdatedAt: "updated_at", + DeletedAt: "deleted_at", +} + +// NewUserDao creates and returns a new DAO object for table data access. +func NewUserDao() *UserDao { + return &UserDao{ + group: "default", + table: "user", + columns: userColumns, + } +} + +// DB retrieves and returns the underlying raw database management object of current DAO. +func (dao *UserDao) DB() gdb.DB { + return g.DB(dao.group) +} + +// Table returns the table name of current dao. +func (dao *UserDao) Table() string { + return dao.table +} + +// Columns returns all column names of current dao. +func (dao *UserDao) Columns() UserColumns { + return dao.columns +} + +// Group returns the configuration group name of database of current dao. +func (dao *UserDao) Group() string { + return dao.group +} + +// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +func (dao *UserDao) Ctx(ctx context.Context) *gdb.Model { + return dao.DB().Model(dao.table).Safe().Ctx(ctx) +} + +// Transaction wraps the transaction logic using function f. +// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It commits the transaction and returns nil if function f returns nil. +// +// Note that, you should not Commit or Rollback the transaction in function f +// as it is automatically handled by this function. +func (dao *UserDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { + return dao.Ctx(ctx).Transaction(ctx, f) +} diff --git a/internal/dao/internal/user_login_log.go b/internal/dao/internal/user_login_log.go new file mode 100644 index 00000000..9acbd84c --- /dev/null +++ b/internal/dao/internal/user_login_log.go @@ -0,0 +1,83 @@ +// ========================================================================== +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ========================================================================== + +package internal + +import ( + "context" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/frame/g" +) + +// UserLoginLogDao is the data access object for table user_login_log. +type UserLoginLogDao struct { + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of current DAO. + columns UserLoginLogColumns // columns contains all the column names of Table for convenient usage. +} + +// UserLoginLogColumns defines and stores column names for table user_login_log. +type UserLoginLogColumns struct { + Id string // + UserId string // + LoginTime string // 登录时间 + LoginIp string // 登录IP + LoginLocation string // 登录地点 + CreatedAt string // +} + +// userLoginLogColumns holds the columns for table user_login_log. +var userLoginLogColumns = UserLoginLogColumns{ + Id: "id", + UserId: "user_id", + LoginTime: "login_time", + LoginIp: "login_ip", + LoginLocation: "login_location", + CreatedAt: "created_at", +} + +// NewUserLoginLogDao creates and returns a new DAO object for table data access. +func NewUserLoginLogDao() *UserLoginLogDao { + return &UserLoginLogDao{ + group: "default", + table: "user_login_log", + columns: userLoginLogColumns, + } +} + +// DB retrieves and returns the underlying raw database management object of current DAO. +func (dao *UserLoginLogDao) DB() gdb.DB { + return g.DB(dao.group) +} + +// Table returns the table name of current dao. +func (dao *UserLoginLogDao) Table() string { + return dao.table +} + +// Columns returns all column names of current dao. +func (dao *UserLoginLogDao) Columns() UserLoginLogColumns { + return dao.columns +} + +// Group returns the configuration group name of database of current dao. +func (dao *UserLoginLogDao) Group() string { + return dao.group +} + +// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +func (dao *UserLoginLogDao) Ctx(ctx context.Context) *gdb.Model { + return dao.DB().Model(dao.table).Safe().Ctx(ctx) +} + +// Transaction wraps the transaction logic using function f. +// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It commits the transaction and returns nil if function f returns nil. +// +// Note that, you should not Commit or Rollback the transaction in function f +// as it is automatically handled by this function. +func (dao *UserLoginLogDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { + return dao.Ctx(ctx).Transaction(ctx, f) +} diff --git a/internal/dao/road_info.go b/internal/dao/road_info.go new file mode 100644 index 00000000..97e0bdec --- /dev/null +++ b/internal/dao/road_info.go @@ -0,0 +1,27 @@ +// ================================================================================= +// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. +// ================================================================================= + +package dao + +import ( + "kami/internal/dao/internal" +) + +// internalRoadInfoDao is internal type for wrapping internal DAO implements. +type internalRoadInfoDao = *internal.RoadInfoDao + +// roadInfoDao is the data access object for table road_info. +// You can define custom methods on it to extend its functionality as you wish. +type roadInfoDao struct { + internalRoadInfoDao +} + +var ( + // RoadInfo is globally public accessible object for table road_info operations. + RoadInfo = roadInfoDao{ + internal.NewRoadInfoDao(), + } +) + +// Fill with you ideas below. diff --git a/internal/dao/sys_auth_rule.go b/internal/dao/sys_auth_rule.go new file mode 100644 index 00000000..67092923 --- /dev/null +++ b/internal/dao/sys_auth_rule.go @@ -0,0 +1,27 @@ +// ================================================================================= +// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. +// ================================================================================= + +package dao + +import ( + "kami/internal/dao/internal" +) + +// internalSysAuthRuleDao is internal type for wrapping internal DAO implements. +type internalSysAuthRuleDao = *internal.SysAuthRuleDao + +// sysAuthRuleDao is the data access object for table sys_auth_rule. +// You can define custom methods on it to extend its functionality as you wish. +type sysAuthRuleDao struct { + internalSysAuthRuleDao +} + +var ( + // SysAuthRule is globally public accessible object for table sys_auth_rule operations. + SysAuthRule = sysAuthRuleDao{ + internal.NewSysAuthRuleDao(), + } +) + +// Fill with you ideas below. diff --git a/internal/dao/user.go b/internal/dao/user.go new file mode 100644 index 00000000..87905b44 --- /dev/null +++ b/internal/dao/user.go @@ -0,0 +1,27 @@ +// ================================================================================= +// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. +// ================================================================================= + +package dao + +import ( + "kami/internal/dao/internal" +) + +// internalUserDao is internal type for wrapping internal DAO implements. +type internalUserDao = *internal.UserDao + +// userDao is the data access object for table user. +// You can define custom methods on it to extend its functionality as you wish. +type userDao struct { + internalUserDao +} + +var ( + // User is globally public accessible object for table user operations. + User = userDao{ + internal.NewUserDao(), + } +) + +// Fill with you ideas below. diff --git a/internal/dao/user_login_log.go b/internal/dao/user_login_log.go new file mode 100644 index 00000000..5999e049 --- /dev/null +++ b/internal/dao/user_login_log.go @@ -0,0 +1,27 @@ +// ================================================================================= +// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. +// ================================================================================= + +package dao + +import ( + "kami/internal/dao/internal" +) + +// internalUserLoginLogDao is internal type for wrapping internal DAO implements. +type internalUserLoginLogDao = *internal.UserLoginLogDao + +// userLoginLogDao is the data access object for table user_login_log. +// You can define custom methods on it to extend its functionality as you wish. +type userLoginLogDao struct { + internalUserLoginLogDao +} + +var ( + // UserLoginLog is globally public accessible object for table user_login_log operations. + UserLoginLog = userLoginLogDao{ + internal.NewUserLoginLogDao(), + } +) + +// Fill with you ideas below. diff --git a/internal/logic/.gitkeep b/internal/logic/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/internal/logic/logic.go b/internal/logic/logic.go new file mode 100644 index 00000000..e5fae0f7 --- /dev/null +++ b/internal/logic/logic.go @@ -0,0 +1,9 @@ +// ========================================================================== +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ========================================================================== + +package logic + +import ( + _ "kami/internal/logic/captcha" +) diff --git a/internal/logic/user_center/user_center.go b/internal/logic/user_center/user_center.go index 4b283356..9050f3c7 100644 --- a/internal/logic/user_center/user_center.go +++ b/internal/logic/user_center/user_center.go @@ -24,6 +24,8 @@ func (c *sUserCenter) Login(ctx context.Context, userInfo entity.User) (err erro return } + return + } func (c *sUserCenter) checkPassword(oldPassword, newPassword string) { diff --git a/internal/model/.gitkeep b/internal/model/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/internal/model/do/.gitkeep b/internal/model/do/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/internal/model/do/road_info.go b/internal/model/do/road_info.go new file mode 100644 index 00000000..a718ae15 --- /dev/null +++ b/internal/model/do/road_info.go @@ -0,0 +1,42 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// RoadInfo is the golang structure of table road_info for DAO operations like Where/Data. +type RoadInfo struct { + g.Meta `orm:"table:road_info, do:true"` + Id interface{} // 主键,自增 + Status interface{} // + RoadName interface{} // 通道名称 + RoadUid interface{} // 通道唯一id + Remark interface{} // 备注 + ProductName interface{} // 上游产品名称 + ProductUid interface{} // 上游产品编号 + BasicFee interface{} // 基本汇率/成本汇率 + SettleFee interface{} // 代付手续费 + TotalLimit interface{} // 通道总额度 + TodayLimit interface{} // 每日最多额度 + SingleMinLimit interface{} // 单笔最小金额 + SingleMaxLimit interface{} // 单笔最大金额 + StarHour interface{} // 通道开始时间 + EndHour interface{} // 通道结束时间 + Params interface{} // 参数json格式 + TodayIncome interface{} // 当天的收入 + TotalIncome interface{} // 通道总收入 + TodayProfit interface{} // 当天的收益 + TotalProfit interface{} // 通道总收益 + Balance interface{} // 通道的余额 + RequestAll interface{} // 请求总次数 + RequestSuccess interface{} // 请求成功次数 + UpdateTime *gtime.Time // 更新时间 + CreateTime *gtime.Time // 创建时间 + TodayRequestAll interface{} // + TodayRequestSuccess interface{} // +} diff --git a/internal/model/do/sys_auth_rule.go b/internal/model/do/sys_auth_rule.go new file mode 100644 index 00000000..cc231825 --- /dev/null +++ b/internal/model/do/sys_auth_rule.go @@ -0,0 +1,27 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// SysAuthRule is the golang structure of table sys_auth_rule for DAO operations like Where/Data. +type SysAuthRule struct { + g.Meta `orm:"table:sys_auth_rule, do:true"` + Id interface{} // + Pid interface{} // 父ID + Name interface{} // 规则名称 + Title interface{} // 规则名称 + MenuType interface{} // 类型 0目录 1菜单 2按钮 + Weigh interface{} // 权重 + IsHide interface{} // 显示状态 + Path interface{} // 路由地址 + Component interface{} // 组件路径 + CreatedAt *gtime.Time // 创建日期 + UpdatedAt *gtime.Time // 修改日期 + IdAdmin interface{} // 是否管理员独享 1是2.否 +} diff --git a/internal/model/do/user.go b/internal/model/do/user.go new file mode 100644 index 00000000..bae912d3 --- /dev/null +++ b/internal/model/do/user.go @@ -0,0 +1,23 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// User is the golang structure of table user for DAO operations like Where/Data. +type User struct { + g.Meta `orm:"table:user, do:true"` + Id interface{} // ID + Username interface{} // 账号 + Password interface{} // 密码 + IsAdmin interface{} // 是否是管理员 + Phone interface{} // 手机号 + CreatedAt *gtime.Time // + UpdatedAt *gtime.Time // + DeletedAt *gtime.Time // +} diff --git a/internal/model/do/user_login_log.go b/internal/model/do/user_login_log.go new file mode 100644 index 00000000..c95b5f6a --- /dev/null +++ b/internal/model/do/user_login_log.go @@ -0,0 +1,21 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// UserLoginLog is the golang structure of table user_login_log for DAO operations like Where/Data. +type UserLoginLog struct { + g.Meta `orm:"table:user_login_log, do:true"` + Id interface{} // + UserId interface{} // + LoginTime *gtime.Time // 登录时间 + LoginIp interface{} // 登录IP + LoginLocation interface{} // 登录地点 + CreatedAt interface{} // +} diff --git a/internal/model/entity/.gitkeep b/internal/model/entity/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/internal/model/entity/road_info.go b/internal/model/entity/road_info.go new file mode 100644 index 00000000..8a675c0a --- /dev/null +++ b/internal/model/entity/road_info.go @@ -0,0 +1,40 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/os/gtime" +) + +// RoadInfo is the golang structure for table road_info. +type RoadInfo struct { + Id uint `json:"id" description:"主键,自增"` + Status string `json:"status" description:""` + RoadName string `json:"roadName" description:"通道名称"` + RoadUid string `json:"roadUid" description:"通道唯一id"` + Remark string `json:"remark" description:"备注"` + ProductName string `json:"productName" description:"上游产品名称"` + ProductUid string `json:"productUid" description:"上游产品编号"` + BasicFee float64 `json:"basicFee" description:"基本汇率/成本汇率"` + SettleFee float64 `json:"settleFee" description:"代付手续费"` + TotalLimit float64 `json:"totalLimit" description:"通道总额度"` + TodayLimit float64 `json:"todayLimit" description:"每日最多额度"` + SingleMinLimit float64 `json:"singleMinLimit" description:"单笔最小金额"` + SingleMaxLimit float64 `json:"singleMaxLimit" description:"单笔最大金额"` + StarHour int `json:"starHour" description:"通道开始时间"` + EndHour int `json:"endHour" description:"通道结束时间"` + Params string `json:"params" description:"参数json格式"` + TodayIncome float64 `json:"todayIncome" description:"当天的收入"` + TotalIncome float64 `json:"totalIncome" description:"通道总收入"` + TodayProfit float64 `json:"todayProfit" description:"当天的收益"` + TotalProfit float64 `json:"totalProfit" description:"通道总收益"` + Balance float64 `json:"balance" description:"通道的余额"` + RequestAll int `json:"requestAll" description:"请求总次数"` + RequestSuccess int `json:"requestSuccess" description:"请求成功次数"` + UpdateTime *gtime.Time `json:"updateTime" description:"更新时间"` + CreateTime *gtime.Time `json:"createTime" description:"创建时间"` + TodayRequestAll int `json:"todayRequestAll" description:""` + TodayRequestSuccess int `json:"todayRequestSuccess" description:""` +} diff --git a/internal/model/entity/sys_auth_rule.go b/internal/model/entity/sys_auth_rule.go new file mode 100644 index 00000000..87881805 --- /dev/null +++ b/internal/model/entity/sys_auth_rule.go @@ -0,0 +1,25 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/os/gtime" +) + +// SysAuthRule is the golang structure for table sys_auth_rule. +type SysAuthRule struct { + Id uint `json:"id" description:""` + Pid uint `json:"pid" description:"父ID"` + Name string `json:"name" description:"规则名称"` + Title string `json:"title" description:"规则名称"` + MenuType uint `json:"menuType" description:"类型 0目录 1菜单 2按钮"` + Weigh int `json:"weigh" description:"权重"` + IsHide uint `json:"isHide" description:"显示状态"` + Path string `json:"path" description:"路由地址"` + Component string `json:"component" description:"组件路径"` + CreatedAt *gtime.Time `json:"createdAt" description:"创建日期"` + UpdatedAt *gtime.Time `json:"updatedAt" description:"修改日期"` + IdAdmin int `json:"idAdmin" description:"是否管理员独享 1是2.否"` +} diff --git a/internal/model/entity/user.go b/internal/model/entity/user.go new file mode 100644 index 00000000..0311d8da --- /dev/null +++ b/internal/model/entity/user.go @@ -0,0 +1,21 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/os/gtime" +) + +// User is the golang structure for table user. +type User struct { + Id string `json:"id" description:"ID"` + Username string `json:"username" description:"账号"` + Password string `json:"password" description:"密码"` + IsAdmin int `json:"isAdmin" description:"是否是管理员"` + Phone string `json:"phone" description:"手机号"` + CreatedAt *gtime.Time `json:"createdAt" description:""` + UpdatedAt *gtime.Time `json:"updatedAt" description:""` + DeletedAt *gtime.Time `json:"deletedAt" description:""` +} diff --git a/internal/model/entity/user_login_log.go b/internal/model/entity/user_login_log.go new file mode 100644 index 00000000..de50b928 --- /dev/null +++ b/internal/model/entity/user_login_log.go @@ -0,0 +1,19 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/os/gtime" +) + +// UserLoginLog is the golang structure for table user_login_log. +type UserLoginLog struct { + Id int `json:"id" description:""` + UserId string `json:"userId" description:""` + LoginTime *gtime.Time `json:"loginTime" description:"登录时间"` + LoginIp string `json:"loginIp" description:"登录IP"` + LoginLocation string `json:"loginLocation" description:"登录地点"` + CreatedAt string `json:"createdAt" description:""` +} diff --git a/internal/packed/packed.go b/internal/packed/packed.go new file mode 100644 index 00000000..e20ab1e9 --- /dev/null +++ b/internal/packed/packed.go @@ -0,0 +1 @@ +package packed diff --git a/internal/service/.gitkeep b/internal/service/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/internal/service/captcha.go b/internal/service/captcha.go new file mode 100644 index 00000000..421657bf --- /dev/null +++ b/internal/service/captcha.go @@ -0,0 +1,32 @@ +// ================================================================================ +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// You can delete these comments if you wish manually maintain this interface file. +// ================================================================================ + +package service + +import "context" + +type ( + ICaptcha interface { + // GetVerifyImgString 获取字母数字混合验证码 + GetVerifyImgString(ctx context.Context) (idKeyC string, base64stringC string, err error) + // VerifyString 验证输入的验证码是否正确 + VerifyString(id, answer string) bool + } +) + +var ( + localCaptcha ICaptcha +) + +func Captcha() ICaptcha { + if localCaptcha == nil { + panic("implement not found for interface ICaptcha, forgot register?") + } + return localCaptcha +} + +func RegisterCaptcha(i ICaptcha) { + localCaptcha = i +} diff --git a/main.go b/main.go new file mode 100644 index 00000000..7b3f2c52 --- /dev/null +++ b/main.go @@ -0,0 +1,15 @@ +package main + +import ( + _ "kami/internal/packed" + + _ "kami/internal/logic" + + "github.com/gogf/gf/v2/os/gctx" + + "kami/internal/cmd" +) + +func main() { + cmd.Main.Run(gctx.GetInitCtx()) +} diff --git a/manifest/deploy/kustomize/base/deployment.yaml b/manifest/deploy/kustomize/base/deployment.yaml new file mode 100644 index 00000000..28f1d694 --- /dev/null +++ b/manifest/deploy/kustomize/base/deployment.yaml @@ -0,0 +1,21 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: template-single + labels: + app: template-single +spec: + replicas: 1 + selector: + matchLabels: + app: template-single + template: + metadata: + labels: + app: template-single + spec: + containers: + - name : main + image: template-single + imagePullPolicy: Always + diff --git a/manifest/deploy/kustomize/base/kustomization.yaml b/manifest/deploy/kustomize/base/kustomization.yaml new file mode 100644 index 00000000..302d92d6 --- /dev/null +++ b/manifest/deploy/kustomize/base/kustomization.yaml @@ -0,0 +1,8 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- deployment.yaml +- service.yaml + + + diff --git a/manifest/deploy/kustomize/base/service.yaml b/manifest/deploy/kustomize/base/service.yaml new file mode 100644 index 00000000..608771cc --- /dev/null +++ b/manifest/deploy/kustomize/base/service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: template-single +spec: + ports: + - port: 80 + protocol: TCP + targetPort: 8000 + selector: + app: template-single + diff --git a/manifest/deploy/kustomize/overlays/develop/configmap.yaml b/manifest/deploy/kustomize/overlays/develop/configmap.yaml new file mode 100644 index 00000000..3b1d0afe --- /dev/null +++ b/manifest/deploy/kustomize/overlays/develop/configmap.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: template-single-configmap +data: + config.yaml: | + server: + address: ":8000" + openapiPath: "/api.json" + swaggerPath: "/swagger" + + logger: + level : "all" + stdout: true diff --git a/manifest/deploy/kustomize/overlays/develop/deployment.yaml b/manifest/deploy/kustomize/overlays/develop/deployment.yaml new file mode 100644 index 00000000..04e48519 --- /dev/null +++ b/manifest/deploy/kustomize/overlays/develop/deployment.yaml @@ -0,0 +1,10 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: template-single +spec: + template: + spec: + containers: + - name : main + image: template-single:develop \ No newline at end of file diff --git a/manifest/deploy/kustomize/overlays/develop/kustomization.yaml b/manifest/deploy/kustomize/overlays/develop/kustomization.yaml new file mode 100644 index 00000000..4731c47f --- /dev/null +++ b/manifest/deploy/kustomize/overlays/develop/kustomization.yaml @@ -0,0 +1,14 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: +- ../../base +- configmap.yaml + +patchesStrategicMerge: +- deployment.yaml + +namespace: default + + + diff --git a/manifest/docker/Dockerfile b/manifest/docker/Dockerfile new file mode 100644 index 00000000..d3abe8f5 --- /dev/null +++ b/manifest/docker/Dockerfile @@ -0,0 +1,16 @@ +FROM loads/alpine:3.8 + +############################################################################### +# INSTALLATION +############################################################################### + +ENV WORKDIR /app +ADD resource $WORKDIR/ +ADD ./temp/linux_amd64/main $WORKDIR/main +RUN chmod +x $WORKDIR/main + +############################################################################### +# START +############################################################################### +WORKDIR $WORKDIR +CMD ./main diff --git a/manifest/docker/docker.sh b/manifest/docker/docker.sh new file mode 100644 index 00000000..ff393f9c --- /dev/null +++ b/manifest/docker/docker.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +# This shell is executed before docker build. + + + + + diff --git a/manifest/i18n/.gitkeep b/manifest/i18n/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/manifest/protobuf/.keep-if-necessary b/manifest/protobuf/.keep-if-necessary new file mode 100644 index 00000000..e69de29b diff --git a/resource/log/server/2023-11-15.log b/resource/log/server/2023-11-15.log new file mode 100644 index 00000000..aebb4258 --- /dev/null +++ b/resource/log/server/2023-11-15.log @@ -0,0 +1,342 @@ +2023-11-15 14:10:41.756 [INFO] pid[16796]: http server started listening on [:8000] +2023-11-15 14:10:41.756 [INFO] {d0f99c913fb497170f994a6806b04bb8} swagger ui is serving at address: http://127.0.0.1:8000/swagger/ +2023-11-15 14:10:41.757 [INFO] {d0f99c913fb497170f994a6806b04bb8} openapi specification is serving at address: http://127.0.0.1:8000/api.json + + ADDRESS | METHOD | ROUTE | HANDLER | MIDDLEWARE +----------|--------|------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /* | github.com/gogf/gf/v2/net/ghttp.internalMiddlewareServerTracing | GLOBAL MIDDLEWARE +----------|--------|------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /api.json | github.com/gogf/gf/v2/net/ghttp.(*Server).openapiSpec | +----------|--------|------------|-----------------------------------------------------------------|---------------------------------- + :8000 | GET | /captcha | kami/internal/controller/common.(*ControllerV1).GetCaptcha | ghttp.MiddlewareHandlerResponse +----------|--------|------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /swagger/* | github.com/gogf/gf/v2/net/ghttp.(*Server).swaggerUI | HOOK_BEFORE_SERVE +----------|--------|------------|-----------------------------------------------------------------|---------------------------------- + +2023-11-15 14:11:05.123 [INFO] pid[22688]: http server started listening on [:8000] +2023-11-15 14:11:05.123 [INFO] {3c5eb1110fb797176dea761773b7b470} swagger ui is serving at address: http://127.0.0.1:8000/swagger/ +2023-11-15 14:11:05.124 [INFO] {3c5eb1110fb797176dea761773b7b470} openapi specification is serving at address: http://127.0.0.1:8000/api.json + + ADDRESS | METHOD | ROUTE | HANDLER | MIDDLEWARE +----------|--------|------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /* | github.com/gogf/gf/v2/net/ghttp.internalMiddlewareServerTracing | GLOBAL MIDDLEWARE +----------|--------|------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /api.json | github.com/gogf/gf/v2/net/ghttp.(*Server).openapiSpec | +----------|--------|------------|-----------------------------------------------------------------|---------------------------------- + :8000 | GET | /captcha | kami/internal/controller/common.(*ControllerV1).GetCaptcha | ghttp.MiddlewareHandlerResponse +----------|--------|------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /swagger/* | github.com/gogf/gf/v2/net/ghttp.(*Server).swaggerUI | HOOK_BEFORE_SERVE +----------|--------|------------|-----------------------------------------------------------------|---------------------------------- + +2023-11-15 14:11:41.732 [INFO] pid[708]: http server started listening on [:8000] +2023-11-15 14:11:41.732 [INFO] {3c5eb1110fb797176dea761773b7b470} swagger ui is serving at address: http://127.0.0.1:8000/swagger/ +2023-11-15 14:11:41.732 [INFO] {3c5eb1110fb797176dea761773b7b470} openapi specification is serving at address: http://127.0.0.1:8000/api.json + + ADDRESS | METHOD | ROUTE | HANDLER | MIDDLEWARE +----------|--------|------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /* | github.com/gogf/gf/v2/net/ghttp.internalMiddlewareServerTracing | GLOBAL MIDDLEWARE +----------|--------|------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /api.json | github.com/gogf/gf/v2/net/ghttp.(*Server).openapiSpec | +----------|--------|------------|-----------------------------------------------------------------|---------------------------------- + :8000 | GET | /captcha | kami/internal/controller/common.(*ControllerV1).GetCaptcha | ghttp.MiddlewareHandlerResponse +----------|--------|------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /swagger/* | github.com/gogf/gf/v2/net/ghttp.(*Server).swaggerUI | HOOK_BEFORE_SERVE +----------|--------|------------|-----------------------------------------------------------------|---------------------------------- + +2023-11-15 14:13:56.278 [INFO] pid[13340]: http server started listening on [:8000] +2023-11-15 14:13:56.278 [INFO] {d01c1bec36b79717605ca17f2d723cc3} swagger ui is serving at address: http://127.0.0.1:8000/swagger/ +2023-11-15 14:13:56.279 [INFO] {d01c1bec36b79717605ca17f2d723cc3} openapi specification is serving at address: http://127.0.0.1:8000/api.json + + ADDRESS | METHOD | ROUTE | HANDLER | MIDDLEWARE +----------|--------|------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /* | github.com/gogf/gf/v2/net/ghttp.internalMiddlewareServerTracing | GLOBAL MIDDLEWARE +----------|--------|------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /api.json | github.com/gogf/gf/v2/net/ghttp.(*Server).openapiSpec | +----------|--------|------------|-----------------------------------------------------------------|---------------------------------- + :8000 | GET | /captcha | kami/internal/controller/common.(*ControllerV1).GetCaptcha | ghttp.MiddlewareHandlerResponse +----------|--------|------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /swagger/* | github.com/gogf/gf/v2/net/ghttp.(*Server).swaggerUI | HOOK_BEFORE_SERVE +----------|--------|------------|-----------------------------------------------------------------|---------------------------------- + +2023-11-15 14:14:19.177 [INFO] pid[25580]: http server started listening on [:8000] +2023-11-15 14:14:19.177 [INFO] {d01c1bec36b79717605ca17f2d723cc3} swagger ui is serving at address: http://127.0.0.1:8000/swagger/ +2023-11-15 14:14:19.178 [INFO] {d01c1bec36b79717605ca17f2d723cc3} openapi specification is serving at address: http://127.0.0.1:8000/api.json + + ADDRESS | METHOD | ROUTE | HANDLER | MIDDLEWARE +----------|--------|------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /* | github.com/gogf/gf/v2/net/ghttp.internalMiddlewareServerTracing | GLOBAL MIDDLEWARE +----------|--------|------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /api.json | github.com/gogf/gf/v2/net/ghttp.(*Server).openapiSpec | +----------|--------|------------|-----------------------------------------------------------------|---------------------------------- + :8000 | GET | /captcha | kami/internal/controller/common.(*ControllerV1).GetCaptcha | ghttp.MiddlewareHandlerResponse +----------|--------|------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /swagger/* | github.com/gogf/gf/v2/net/ghttp.(*Server).swaggerUI | HOOK_BEFORE_SERVE +----------|--------|------------|-----------------------------------------------------------------|---------------------------------- + +2023-11-15 14:14:39.369 [INFO] pid[3328]: http server started listening on [:8000] +2023-11-15 14:14:39.369 [INFO] {d01c1bec36b79717605ca17f2d723cc3} swagger ui is serving at address: http://127.0.0.1:8000/swagger/ +2023-11-15 14:14:39.370 [INFO] {d01c1bec36b79717605ca17f2d723cc3} openapi specification is serving at address: http://127.0.0.1:8000/api.json + + ADDRESS | METHOD | ROUTE | HANDLER | MIDDLEWARE +----------|--------|--------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /* | github.com/gogf/gf/v2/net/ghttp.internalMiddlewareServerTracing | GLOBAL MIDDLEWARE +----------|--------|--------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /api.json | github.com/gogf/gf/v2/net/ghttp.(*Server).openapiSpec | +----------|--------|--------------|-----------------------------------------------------------------|---------------------------------- + :8000 | GET | /api/captcha | kami/internal/controller/common.(*ControllerV1).GetCaptcha | ghttp.MiddlewareHandlerResponse +----------|--------|--------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /swagger/* | github.com/gogf/gf/v2/net/ghttp.(*Server).swaggerUI | HOOK_BEFORE_SERVE +----------|--------|--------------|-----------------------------------------------------------------|---------------------------------- + +2023-11-15 14:14:56.442 [FATA] {d01c1bec36b79717605ca17f2d723cc3} duplicated route registry "/getCaptcha@default" at D:/docs/projects/kami/kami_backend/internal/cmd/cmd.go:25 , already registered at D:/docs/projects/kami/kami_backend/internal/cmd/cmd.go:20 +Stack: +1. github.com/gogf/gf/v2/net/ghttp.(*Server).doSetHandler + C:/Users/sunxiaolong/go/pkg/mod/github.com/gogf/gf/v2@v2.5.2/net/ghttp/ghttp_server_router.go:166 +2. github.com/gogf/gf/v2/net/ghttp.(*Server).setHandler + C:/Users/sunxiaolong/go/pkg/mod/github.com/gogf/gf/v2@v2.5.2/net/ghttp/ghttp_server_router.go:124 +3. github.com/gogf/gf/v2/net/ghttp.(*Server).bindHandlerByMap + C:/Users/sunxiaolong/go/pkg/mod/github.com/gogf/gf/v2@v2.5.2/net/ghttp/ghttp_server_service_handler.go:68 +4. github.com/gogf/gf/v2/net/ghttp.(*Server).doBindObject + C:/Users/sunxiaolong/go/pkg/mod/github.com/gogf/gf/v2@v2.5.2/net/ghttp/ghttp_server_service_object.go:176 +5. github.com/gogf/gf/v2/net/ghttp.(*RouterGroup).doBindRoutersToServer + C:/Users/sunxiaolong/go/pkg/mod/github.com/gogf/gf/v2@v2.5.2/net/ghttp/ghttp_server_router_group.go:391 +6. github.com/gogf/gf/v2/net/ghttp.(*Server).handlePreBindItems + C:/Users/sunxiaolong/go/pkg/mod/github.com/gogf/gf/v2@v2.5.2/net/ghttp/ghttp_server_router_group.go:71 +7. github.com/gogf/gf/v2/net/ghttp.(*Server).Start + C:/Users/sunxiaolong/go/pkg/mod/github.com/gogf/gf/v2@v2.5.2/net/ghttp/ghttp_server.go:138 +8. github.com/gogf/gf/v2/net/ghttp.(*Server).Run + C:/Users/sunxiaolong/go/pkg/mod/github.com/gogf/gf/v2@v2.5.2/net/ghttp/ghttp_server.go:423 +9. kami/internal/cmd.glob..func1 + D:/docs/projects/kami/kami_backend/internal/cmd/cmd.go:27 +10. github.com/gogf/gf/v2/os/gcmd.(*Command).doRun + C:/Users/sunxiaolong/go/pkg/mod/github.com/gogf/gf/v2@v2.5.2/os/gcmd/gcmd_command_run.go:149 +11. github.com/gogf/gf/v2/os/gcmd.(*Command).RunWithValueError + C:/Users/sunxiaolong/go/pkg/mod/github.com/gogf/gf/v2@v2.5.2/os/gcmd/gcmd_command_run.go:82 +12. github.com/gogf/gf/v2/os/gcmd.(*Command).RunWithValue + C:/Users/sunxiaolong/go/pkg/mod/github.com/gogf/gf/v2@v2.5.2/os/gcmd/gcmd_command_run.go:41 +13. github.com/gogf/gf/v2/os/gcmd.(*Command).Run + C:/Users/sunxiaolong/go/pkg/mod/github.com/gogf/gf/v2@v2.5.2/os/gcmd/gcmd_command_run.go:35 +14. main.main + D:/docs/projects/kami/kami_backend/main.go:14 + +2023-11-15 14:16:02.417 [FATA] {d01c1bec36b79717605ca17f2d723cc3} duplicated route registry "/getCaptcha@default" at D:/docs/projects/kami/kami_backend/internal/cmd/cmd.go:29 , already registered at D:/docs/projects/kami/kami_backend/internal/cmd/cmd.go:24 +Stack: +1. github.com/gogf/gf/v2/net/ghttp.(*Server).doSetHandler + C:/Users/sunxiaolong/go/pkg/mod/github.com/gogf/gf/v2@v2.5.2/net/ghttp/ghttp_server_router.go:166 +2. github.com/gogf/gf/v2/net/ghttp.(*Server).setHandler + C:/Users/sunxiaolong/go/pkg/mod/github.com/gogf/gf/v2@v2.5.2/net/ghttp/ghttp_server_router.go:124 +3. github.com/gogf/gf/v2/net/ghttp.(*Server).bindHandlerByMap + C:/Users/sunxiaolong/go/pkg/mod/github.com/gogf/gf/v2@v2.5.2/net/ghttp/ghttp_server_service_handler.go:68 +4. github.com/gogf/gf/v2/net/ghttp.(*Server).doBindObject + C:/Users/sunxiaolong/go/pkg/mod/github.com/gogf/gf/v2@v2.5.2/net/ghttp/ghttp_server_service_object.go:176 +5. github.com/gogf/gf/v2/net/ghttp.(*RouterGroup).doBindRoutersToServer + C:/Users/sunxiaolong/go/pkg/mod/github.com/gogf/gf/v2@v2.5.2/net/ghttp/ghttp_server_router_group.go:391 +6. github.com/gogf/gf/v2/net/ghttp.(*Server).handlePreBindItems + C:/Users/sunxiaolong/go/pkg/mod/github.com/gogf/gf/v2@v2.5.2/net/ghttp/ghttp_server_router_group.go:71 +7. github.com/gogf/gf/v2/net/ghttp.(*Server).Start + C:/Users/sunxiaolong/go/pkg/mod/github.com/gogf/gf/v2@v2.5.2/net/ghttp/ghttp_server.go:138 +8. github.com/gogf/gf/v2/net/ghttp.(*Server).Run + C:/Users/sunxiaolong/go/pkg/mod/github.com/gogf/gf/v2@v2.5.2/net/ghttp/ghttp_server.go:423 +9. kami/internal/cmd.glob..func1 + D:/docs/projects/kami/kami_backend/internal/cmd/cmd.go:31 +10. github.com/gogf/gf/v2/os/gcmd.(*Command).doRun + C:/Users/sunxiaolong/go/pkg/mod/github.com/gogf/gf/v2@v2.5.2/os/gcmd/gcmd_command_run.go:149 +11. github.com/gogf/gf/v2/os/gcmd.(*Command).RunWithValueError + C:/Users/sunxiaolong/go/pkg/mod/github.com/gogf/gf/v2@v2.5.2/os/gcmd/gcmd_command_run.go:82 +12. github.com/gogf/gf/v2/os/gcmd.(*Command).RunWithValue + C:/Users/sunxiaolong/go/pkg/mod/github.com/gogf/gf/v2@v2.5.2/os/gcmd/gcmd_command_run.go:41 +13. github.com/gogf/gf/v2/os/gcmd.(*Command).Run + C:/Users/sunxiaolong/go/pkg/mod/github.com/gogf/gf/v2@v2.5.2/os/gcmd/gcmd_command_run.go:35 +14. main.main + D:/docs/projects/kami/kami_backend/main.go:14 + +2023-11-15 14:17:18.385 [INFO] pid[11668]: http server started listening on [:8000] +2023-11-15 14:17:18.385 [INFO] {d01c1bec36b79717605ca17f2d723cc3} swagger ui is serving at address: http://127.0.0.1:8000/swagger/ +2023-11-15 14:17:18.386 [INFO] {d01c1bec36b79717605ca17f2d723cc3} openapi specification is serving at address: http://127.0.0.1:8000/api.json + + ADDRESS | METHOD | ROUTE | HANDLER | MIDDLEWARE +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /* | github.com/gogf/gf/v2/net/ghttp.internalMiddlewareServerTracing | GLOBAL MIDDLEWARE +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /api.json | github.com/gogf/gf/v2/net/ghttp.(*Server).openapiSpec | +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | GET | /api/captcha | kami/internal/controller/common.(*ControllerV1).GetCaptcha | ghttp.MiddlewareHandlerResponse +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | POST | /api/logout | kami/internal/controller/user_center.(*ControllerV1).Logout | ghttp.MiddlewareHandlerResponse +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | POST | /api/user_center | kami/internal/controller/user_center.(*ControllerV1).Login | ghttp.MiddlewareHandlerResponse +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /swagger/* | github.com/gogf/gf/v2/net/ghttp.(*Server).swaggerUI | HOOK_BEFORE_SERVE +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + +2023-11-15 14:18:06.187 [INFO] pid[11900]: http server started listening on [:8000] +2023-11-15 14:18:06.187 [INFO] {d01c1bec36b79717605ca17f2d723cc3} swagger ui is serving at address: http://127.0.0.1:8000/swagger/ +2023-11-15 14:18:06.188 [INFO] {d01c1bec36b79717605ca17f2d723cc3} openapi specification is serving at address: http://127.0.0.1:8000/api.json + + ADDRESS | METHOD | ROUTE | HANDLER | MIDDLEWARE +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /* | github.com/gogf/gf/v2/net/ghttp.internalMiddlewareServerTracing | GLOBAL MIDDLEWARE +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /api.json | github.com/gogf/gf/v2/net/ghttp.(*Server).openapiSpec | +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | GET | /api/captcha | kami/internal/controller/common.(*ControllerV1).GetCaptcha | ghttp.MiddlewareHandlerResponse +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | POST | /api/logout | kami/internal/controller/user_center.(*ControllerV1).Logout | ghttp.MiddlewareHandlerResponse +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | POST | /api/user_center | kami/internal/controller/user_center.(*ControllerV1).Login | ghttp.MiddlewareHandlerResponse +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /swagger/* | github.com/gogf/gf/v2/net/ghttp.(*Server).swaggerUI | HOOK_BEFORE_SERVE +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + +2023-11-15 14:22:00.165 [INFO] pid[16648]: http server started listening on [:8000] +2023-11-15 14:22:00.165 [INFO] {d01c1bec36b79717605ca17f2d723cc3} swagger ui is serving at address: http://127.0.0.1:8000/swagger/ +2023-11-15 14:22:00.166 [INFO] {d01c1bec36b79717605ca17f2d723cc3} openapi specification is serving at address: http://127.0.0.1:8000/api.json + + ADDRESS | METHOD | ROUTE | HANDLER | MIDDLEWARE +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /* | github.com/gogf/gf/v2/net/ghttp.internalMiddlewareServerTracing | GLOBAL MIDDLEWARE +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /api.json | github.com/gogf/gf/v2/net/ghttp.(*Server).openapiSpec | +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | GET | /api/captcha | kami/internal/controller/common.(*ControllerV1).GetCaptcha | ghttp.MiddlewareHandlerResponse +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | POST | /api/logout | kami/internal/controller/user_center.(*ControllerV1).Logout | ghttp.MiddlewareHandlerResponse +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | POST | /api/user_center | kami/internal/controller/user_center.(*ControllerV1).Login | ghttp.MiddlewareHandlerResponse +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /swagger/* | github.com/gogf/gf/v2/net/ghttp.(*Server).swaggerUI | HOOK_BEFORE_SERVE +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + +2023-11-15 14:23:11.107 [INFO] pid[26008]: http server started listening on [:8000] +2023-11-15 14:23:11.107 [INFO] {d01c1bec36b79717605ca17f2d723cc3} swagger ui is serving at address: http://127.0.0.1:8000/swagger/ +2023-11-15 14:23:11.107 [INFO] {d01c1bec36b79717605ca17f2d723cc3} openapi specification is serving at address: http://127.0.0.1:8000/api.json + + ADDRESS | METHOD | ROUTE | HANDLER | MIDDLEWARE +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /* | github.com/gogf/gf/v2/net/ghttp.internalMiddlewareServerTracing | GLOBAL MIDDLEWARE +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /api.json | github.com/gogf/gf/v2/net/ghttp.(*Server).openapiSpec | +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | GET | /api/captcha | kami/internal/controller/common.(*ControllerV1).GetCaptcha | ghttp.MiddlewareHandlerResponse +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | POST | /api/logout | kami/internal/controller/user_center.(*ControllerV1).Logout | ghttp.MiddlewareHandlerResponse +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | POST | /api/user_center | kami/internal/controller/user_center.(*ControllerV1).Login | ghttp.MiddlewareHandlerResponse +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /swagger/* | github.com/gogf/gf/v2/net/ghttp.(*Server).swaggerUI | HOOK_BEFORE_SERVE +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + +2023-11-15 14:24:12.521 [INFO] pid[16724]: http server started listening on [:8000] +2023-11-15 14:24:12.521 [INFO] {d01c1bec36b79717605ca17f2d723cc3} swagger ui is serving at address: http://127.0.0.1:8000/swagger/ +2023-11-15 14:24:12.521 [INFO] {d01c1bec36b79717605ca17f2d723cc3} openapi specification is serving at address: http://127.0.0.1:8000/api.json + + ADDRESS | METHOD | ROUTE | HANDLER | MIDDLEWARE +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /* | github.com/gogf/gf/v2/net/ghttp.internalMiddlewareServerTracing | GLOBAL MIDDLEWARE +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /api.json | github.com/gogf/gf/v2/net/ghttp.(*Server).openapiSpec | +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | GET | /api/captcha | kami/internal/controller/common.(*ControllerV1).GetCaptcha | ghttp.MiddlewareHandlerResponse +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | POST | /api/logout | kami/internal/controller/user_center.(*ControllerV1).Logout | ghttp.MiddlewareHandlerResponse +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | POST | /api/user_center | kami/internal/controller/user_center.(*ControllerV1).Login | ghttp.MiddlewareHandlerResponse +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /swagger/* | github.com/gogf/gf/v2/net/ghttp.(*Server).swaggerUI | HOOK_BEFORE_SERVE +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + +2023-11-15 14:26:09.362 [INFO] pid[7084]: http server started listening on [:8000] +2023-11-15 14:26:09.362 [INFO] {d01c1bec36b79717605ca17f2d723cc3} swagger ui is serving at address: http://127.0.0.1:8000/swagger/ +2023-11-15 14:26:09.362 [INFO] {d01c1bec36b79717605ca17f2d723cc3} openapi specification is serving at address: http://127.0.0.1:8000/api.json + + ADDRESS | METHOD | ROUTE | HANDLER | MIDDLEWARE +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /* | github.com/gogf/gf/v2/net/ghttp.internalMiddlewareServerTracing | GLOBAL MIDDLEWARE +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /api.json | github.com/gogf/gf/v2/net/ghttp.(*Server).openapiSpec | +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | GET | /api/captcha | kami/internal/controller/common.(*ControllerV1).GetCaptcha | ghttp.MiddlewareHandlerResponse +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | POST | /api/logout | kami/internal/controller/user_center.(*ControllerV1).Logout | ghttp.MiddlewareHandlerResponse +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | POST | /api/user_center | kami/internal/controller/user_center.(*ControllerV1).Login | ghttp.MiddlewareHandlerResponse +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /swagger/* | github.com/gogf/gf/v2/net/ghttp.(*Server).swaggerUI | HOOK_BEFORE_SERVE +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + +2023-11-15 14:28:26.554 [INFO] pid[1596]: http server started listening on [:8000] +2023-11-15 14:28:26.554 [INFO] {d01c1bec36b79717605ca17f2d723cc3} swagger ui is serving at address: http://127.0.0.1:8000/swagger/ +2023-11-15 14:28:26.555 [INFO] {d01c1bec36b79717605ca17f2d723cc3} openapi specification is serving at address: http://127.0.0.1:8000/api.json + + ADDRESS | METHOD | ROUTE | HANDLER | MIDDLEWARE +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /* | github.com/gogf/gf/v2/net/ghttp.internalMiddlewareServerTracing | GLOBAL MIDDLEWARE +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /api.json | github.com/gogf/gf/v2/net/ghttp.(*Server).openapiSpec | +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | GET | /api/captcha | kami/internal/controller/common.(*ControllerV1).GetCaptcha | ghttp.MiddlewareHandlerResponse +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | POST | /api/logout | kami/internal/controller/user_center.(*ControllerV1).Logout | ghttp.MiddlewareHandlerResponse +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | POST | /api/user_center | kami/internal/controller/user_center.(*ControllerV1).Login | ghttp.MiddlewareHandlerResponse +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /swagger/* | github.com/gogf/gf/v2/net/ghttp.(*Server).swaggerUI | HOOK_BEFORE_SERVE +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + +2023-11-15 14:29:17.217 [INFO] pid[8572]: http server started listening on [:8000] +2023-11-15 14:29:17.217 [INFO] {d01c1bec36b79717605ca17f2d723cc3} swagger ui is serving at address: http://127.0.0.1:8000/swagger/ +2023-11-15 14:29:17.218 [INFO] {d01c1bec36b79717605ca17f2d723cc3} openapi specification is serving at address: http://127.0.0.1:8000/api.json + + ADDRESS | METHOD | ROUTE | HANDLER | MIDDLEWARE +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /* | github.com/gogf/gf/v2/net/ghttp.internalMiddlewareServerTracing | GLOBAL MIDDLEWARE +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /api.json | github.com/gogf/gf/v2/net/ghttp.(*Server).openapiSpec | +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | GET | /api/captcha | kami/internal/controller/common.(*ControllerV1).GetCaptcha | ghttp.MiddlewareHandlerResponse +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | POST | /api/logout | kami/internal/controller/user_center.(*ControllerV1).Logout | ghttp.MiddlewareHandlerResponse +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | POST | /api/user_center | kami/internal/controller/user_center.(*ControllerV1).Login | ghttp.MiddlewareHandlerResponse +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /swagger/* | github.com/gogf/gf/v2/net/ghttp.(*Server).swaggerUI | HOOK_BEFORE_SERVE +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + +2023-11-15 14:30:57.641 [INFO] pid[29388]: http server started listening on [:8000] +2023-11-15 14:30:57.641 [INFO] {d01c1bec36b79717605ca17f2d723cc3} swagger ui is serving at address: http://127.0.0.1:8000/swagger/ +2023-11-15 14:30:57.643 [INFO] {d01c1bec36b79717605ca17f2d723cc3} openapi specification is serving at address: http://127.0.0.1:8000/api.json + + ADDRESS | METHOD | ROUTE | HANDLER | MIDDLEWARE +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /* | github.com/gogf/gf/v2/net/ghttp.internalMiddlewareServerTracing | GLOBAL MIDDLEWARE +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /api.json | github.com/gogf/gf/v2/net/ghttp.(*Server).openapiSpec | +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | GET | /api/captcha | kami/internal/controller/common.(*ControllerV1).GetCaptcha | ghttp.MiddlewareHandlerResponse +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | POST | /api/logout | kami/internal/controller/user_center.(*ControllerV1).Logout | ghttp.MiddlewareHandlerResponse +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | POST | /api/user_center | kami/internal/controller/user_center.(*ControllerV1).Login | ghttp.MiddlewareHandlerResponse +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /swagger/* | github.com/gogf/gf/v2/net/ghttp.(*Server).swaggerUI | HOOK_BEFORE_SERVE +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + +2023-11-15 14:31:20.829 [INFO] pid[3376]: http server started listening on [:8000] +2023-11-15 14:31:20.829 [INFO] {d01c1bec36b79717605ca17f2d723cc3} swagger ui is serving at address: http://127.0.0.1:8000/swagger/ +2023-11-15 14:31:20.829 [INFO] {d01c1bec36b79717605ca17f2d723cc3} openapi specification is serving at address: http://127.0.0.1:8000/api.json + + ADDRESS | METHOD | ROUTE | HANDLER | MIDDLEWARE +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /* | github.com/gogf/gf/v2/net/ghttp.internalMiddlewareServerTracing | GLOBAL MIDDLEWARE +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /api.json | github.com/gogf/gf/v2/net/ghttp.(*Server).openapiSpec | +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | GET | /api/captcha | kami/internal/controller/common.(*ControllerV1).GetCaptcha | ghttp.MiddlewareHandlerResponse +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | POST | /api/logout | kami/internal/controller/user_center.(*ControllerV1).Logout | ghttp.MiddlewareHandlerResponse +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | POST | /api/user_center | kami/internal/controller/user_center.(*ControllerV1).Login | ghttp.MiddlewareHandlerResponse +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + :8000 | ALL | /swagger/* | github.com/gogf/gf/v2/net/ghttp.(*Server).swaggerUI | HOOK_BEFORE_SERVE +----------|--------|------------------|-----------------------------------------------------------------|---------------------------------- + diff --git a/resource/public/html/.gitkeep b/resource/public/html/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/resource/public/plugin/.gitkeep b/resource/public/plugin/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/resource/public/resource/css/.gitkeep b/resource/public/resource/css/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/resource/public/resource/image/.gitkeep b/resource/public/resource/image/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/resource/public/resource/js/.gitkeep b/resource/public/resource/js/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/resource/template/.gitkeep b/resource/template/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/utility/.gitkeep b/utility/.gitkeep new file mode 100644 index 00000000..e69de29b