From 90acaecef6c3235febaf890d5c3b9d133f707aac Mon Sep 17 00:00:00 2001 From: majun <3060162534@qq.com> Date: Thu, 28 Nov 2024 16:55:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demo/.gitattributes | 1 - demo/.gitignore | 19 ------ demo/Makefile | 7 -- demo/README.MD | 4 -- demo/api/hello/hello.go | 15 ----- demo/api/hello/v1/hello.go | 12 ---- demo/go.mod | 31 --------- demo/go.sum | 60 ----------------- demo/hack/config.yaml | 13 ---- demo/hack/hack-cli.mk | 20 ------ demo/hack/hack.mk | 75 ---------------------- demo/internal/cmd/cmd.go | 30 --------- demo/internal/consts/consts.go | 1 - demo/internal/controller/hello/hello.go | 5 -- demo/internal/controller/hello/hello_new.go | 16 ----- demo/internal/controller/hello/hello_v1_hello.go | 13 ---- demo/internal/dao/.gitkeep | 0 demo/internal/logic/.gitkeep | 0 demo/internal/model/.gitkeep | 0 demo/internal/model/do/.gitkeep | 0 demo/internal/model/entity/.gitkeep | 0 demo/internal/packed/packed.go | 1 - demo/internal/service/.gitkeep | 0 demo/main.go | 13 ---- .../manifest/deploy/kustomize/base/deployment.yaml | 21 ------ .../deploy/kustomize/base/kustomization.yaml | 8 --- demo/manifest/deploy/kustomize/base/service.yaml | 12 ---- .../kustomize/overlays/develop/configmap.yaml | 14 ---- .../kustomize/overlays/develop/deployment.yaml | 10 --- .../kustomize/overlays/develop/kustomization.yaml | 14 ---- demo/manifest/docker/Dockerfile | 16 ----- demo/manifest/docker/docker.sh | 8 --- demo/manifest/i18n/.gitkeep | 0 demo/manifest/protobuf/.keep-if-necessary | 0 demo/resource/public/html/.gitkeep | 0 demo/resource/public/plugin/.gitkeep | 0 demo/resource/public/resource/css/.gitkeep | 0 demo/resource/public/resource/image/.gitkeep | 0 demo/resource/public/resource/js/.gitkeep | 0 demo/resource/template/.gitkeep | 0 demo/utility/.gitkeep | 0 41 files changed, 439 deletions(-) delete mode 100644 demo/.gitattributes delete mode 100644 demo/.gitignore delete mode 100644 demo/Makefile delete mode 100644 demo/README.MD delete mode 100644 demo/api/hello/hello.go delete mode 100644 demo/api/hello/v1/hello.go delete mode 100644 demo/go.mod delete mode 100644 demo/go.sum delete mode 100644 demo/hack/config.yaml delete mode 100644 demo/hack/hack-cli.mk delete mode 100644 demo/hack/hack.mk delete mode 100644 demo/internal/cmd/cmd.go delete mode 100644 demo/internal/consts/consts.go delete mode 100644 demo/internal/controller/hello/hello.go delete mode 100644 demo/internal/controller/hello/hello_new.go delete mode 100644 demo/internal/controller/hello/hello_v1_hello.go delete mode 100644 demo/internal/dao/.gitkeep delete mode 100644 demo/internal/logic/.gitkeep delete mode 100644 demo/internal/model/.gitkeep delete mode 100644 demo/internal/model/do/.gitkeep delete mode 100644 demo/internal/model/entity/.gitkeep delete mode 100644 demo/internal/packed/packed.go delete mode 100644 demo/internal/service/.gitkeep delete mode 100644 demo/main.go delete mode 100644 demo/manifest/deploy/kustomize/base/deployment.yaml delete mode 100644 demo/manifest/deploy/kustomize/base/kustomization.yaml delete mode 100644 demo/manifest/deploy/kustomize/base/service.yaml delete mode 100644 demo/manifest/deploy/kustomize/overlays/develop/configmap.yaml delete mode 100644 demo/manifest/deploy/kustomize/overlays/develop/deployment.yaml delete mode 100644 demo/manifest/deploy/kustomize/overlays/develop/kustomization.yaml delete mode 100644 demo/manifest/docker/Dockerfile delete mode 100644 demo/manifest/docker/docker.sh delete mode 100644 demo/manifest/i18n/.gitkeep delete mode 100644 demo/manifest/protobuf/.keep-if-necessary delete mode 100644 demo/resource/public/html/.gitkeep delete mode 100644 demo/resource/public/plugin/.gitkeep delete mode 100644 demo/resource/public/resource/css/.gitkeep delete mode 100644 demo/resource/public/resource/image/.gitkeep delete mode 100644 demo/resource/public/resource/js/.gitkeep delete mode 100644 demo/resource/template/.gitkeep delete mode 100644 demo/utility/.gitkeep diff --git a/demo/.gitattributes b/demo/.gitattributes deleted file mode 100644 index 1fbf887..0000000 --- a/demo/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -* linguist-language=GO \ No newline at end of file diff --git a/demo/.gitignore b/demo/.gitignore deleted file mode 100644 index 18646b6..0000000 --- a/demo/.gitignore +++ /dev/null @@ -1,19 +0,0 @@ -.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/demo/Makefile b/demo/Makefile deleted file mode 100644 index 2a6e6e9..0000000 --- a/demo/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -ROOT_DIR = $(shell pwd) -NAMESPACE = "default" -DEPLOY_NAME = "template-single" -DOCKER_NAME = "template-single" - -include ./hack/hack-cli.mk -include ./hack/hack.mk \ No newline at end of file diff --git a/demo/README.MD b/demo/README.MD deleted file mode 100644 index d36cedd..0000000 --- a/demo/README.MD +++ /dev/null @@ -1,4 +0,0 @@ -# GoFrame Template For SingleRepo - -Quick Start: -- https://goframe.org/quick \ No newline at end of file diff --git a/demo/api/hello/hello.go b/demo/api/hello/hello.go deleted file mode 100644 index f53d455..0000000 --- a/demo/api/hello/hello.go +++ /dev/null @@ -1,15 +0,0 @@ -// ================================================================================= -// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. -// ================================================================================= - -package hello - -import ( - "context" - - "demo/api/hello/v1" -) - -type IHelloV1 interface { - Hello(ctx context.Context, req *v1.HelloReq) (res *v1.HelloRes, err error) -} diff --git a/demo/api/hello/v1/hello.go b/demo/api/hello/v1/hello.go deleted file mode 100644 index b4dd233..0000000 --- a/demo/api/hello/v1/hello.go +++ /dev/null @@ -1,12 +0,0 @@ -package v1 - -import ( - "github.com/gogf/gf/v2/frame/g" -) - -type HelloReq struct { - g.Meta `path:"/hello" tags:"Hello" method:"get" summary:"You first hello api"` -} -type HelloRes struct { - g.Meta `mime:"text/html" example:"string"` -} diff --git a/demo/go.mod b/demo/go.mod deleted file mode 100644 index fa2aa10..0000000 --- a/demo/go.mod +++ /dev/null @@ -1,31 +0,0 @@ -module demo - -go 1.18 - -require github.com/gogf/gf/v2 v2.8.1 - -require ( - github.com/BurntSushi/toml v1.4.0 // indirect - github.com/clbanning/mxj/v2 v2.7.0 // indirect - github.com/emirpasic/gods v1.18.1 // indirect - github.com/fatih/color v1.17.0 // indirect - github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/go-logr/logr v1.4.2 // indirect - github.com/go-logr/stdr v1.2.2 // indirect - github.com/gorilla/websocket v1.5.3 // indirect - github.com/grokify/html-strip-tags-go v0.1.0 // indirect - github.com/magiconair/properties v1.8.7 // indirect - github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.20 // indirect - github.com/mattn/go-runewidth v0.0.15 // indirect - github.com/olekukonko/tablewriter v0.0.5 // indirect - github.com/rivo/uniseg v0.4.7 // indirect - go.opentelemetry.io/otel v1.24.0 // indirect - go.opentelemetry.io/otel/metric v1.24.0 // indirect - go.opentelemetry.io/otel/sdk v1.24.0 // indirect - go.opentelemetry.io/otel/trace v1.24.0 // indirect - golang.org/x/net v0.27.0 // indirect - golang.org/x/sys v0.22.0 // indirect - golang.org/x/text v0.16.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect -) diff --git a/demo/go.sum b/demo/go.sum deleted file mode 100644 index c153e8d..0000000 --- a/demo/go.sum +++ /dev/null @@ -1,60 +0,0 @@ -github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0= -github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= -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/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= -github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= -github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= -github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= -github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= -github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= -github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= -github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/gogf/gf/v2 v2.8.1 h1:1oVQg3G5OgCats4qWFTH3pHLe92nfUQeUDta05tUs1g= -github.com/gogf/gf/v2 v2.8.1/go.mod h1:6iYuZZ+A0ZcH8+4MDS/P0SvTPCvKzRvyAsY1kbkJYJc= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= -github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/grokify/html-strip-tags-go v0.1.0 h1:03UrQLjAny8xci+R+qjCce/MYnpNXCtgzltlQbOBae4= -github.com/grokify/html-strip-tags-go v0.1.0/go.mod h1:ZdzgfHEzAfz9X6Xe5eBLVblWIxXfYSQ40S/VKrAOGpc= -github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= -github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= -github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= -github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/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/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.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= -github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= -golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= -golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= -golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= -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/demo/hack/config.yaml b/demo/hack/config.yaml deleted file mode 100644 index 83c7dc6..0000000 --- a/demo/hack/config.yaml +++ /dev/null @@ -1,13 +0,0 @@ - -# CLI tool, only in development environment. -# https://goframe.org/docs/cli -gfcli: - gen: - dao: - - link: "mysql:root:12345678@tcp(127.0.0.1:3306)/test" - descriptionTag: true - - docker: - build: "-a amd64 -s linux -p temp -ew" - tagPrefixes: - - my.image.pub/my-app \ No newline at end of file diff --git a/demo/hack/hack-cli.mk b/demo/hack/hack-cli.mk deleted file mode 100644 index f4e2ad2..0000000 --- a/demo/hack/hack-cli.mk +++ /dev/null @@ -1,20 +0,0 @@ - -# 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/demo/hack/hack.mk b/demo/hack/hack.mk deleted file mode 100644 index 2f68179..0000000 --- a/demo/hack/hack.mk +++ /dev/null @@ -1,75 +0,0 @@ -.DEFAULT_GOAL := build - -# 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 rev-parse --short HEAD)) -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: cli.install - @make image PUSH=-p; - - -# Deploy image and yaml to current kubectl environment. -.PHONY: deploy -deploy: cli.install - $(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/demo/internal/cmd/cmd.go b/demo/internal/cmd/cmd.go deleted file mode 100644 index 1de9943..0000000 --- a/demo/internal/cmd/cmd.go +++ /dev/null @@ -1,30 +0,0 @@ -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" - - "demo/internal/controller/hello" -) - -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) { - group.Middleware(ghttp.MiddlewareHandlerResponse) - group.Bind( - hello.NewV1(), - ) - }) - s.Run() - return nil - }, - } -) diff --git a/demo/internal/consts/consts.go b/demo/internal/consts/consts.go deleted file mode 100644 index d709a2b..0000000 --- a/demo/internal/consts/consts.go +++ /dev/null @@ -1 +0,0 @@ -package consts diff --git a/demo/internal/controller/hello/hello.go b/demo/internal/controller/hello/hello.go deleted file mode 100644 index f72082f..0000000 --- a/demo/internal/controller/hello/hello.go +++ /dev/null @@ -1,5 +0,0 @@ -// ================================================================================= -// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. -// ================================================================================= - -package hello diff --git a/demo/internal/controller/hello/hello_new.go b/demo/internal/controller/hello/hello_new.go deleted file mode 100644 index 3f1e029..0000000 --- a/demo/internal/controller/hello/hello_new.go +++ /dev/null @@ -1,16 +0,0 @@ -// ================================================================================= -// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. -// ================================================================================= - -package hello - -import ( - "demo/api/hello" -) - -type ControllerV1 struct{} - -func NewV1() hello.IHelloV1 { - return &ControllerV1{} -} - diff --git a/demo/internal/controller/hello/hello_v1_hello.go b/demo/internal/controller/hello/hello_v1_hello.go deleted file mode 100644 index c3eac5a..0000000 --- a/demo/internal/controller/hello/hello_v1_hello.go +++ /dev/null @@ -1,13 +0,0 @@ -package hello - -import ( - "context" - "github.com/gogf/gf/v2/frame/g" - - "demo/api/hello/v1" -) - -func (c *ControllerV1) Hello(ctx context.Context, req *v1.HelloReq) (res *v1.HelloRes, err error) { - g.RequestFromCtx(ctx).Response.Writeln("Hello World!") - return -} diff --git a/demo/internal/dao/.gitkeep b/demo/internal/dao/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/demo/internal/logic/.gitkeep b/demo/internal/logic/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/demo/internal/model/.gitkeep b/demo/internal/model/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/demo/internal/model/do/.gitkeep b/demo/internal/model/do/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/demo/internal/model/entity/.gitkeep b/demo/internal/model/entity/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/demo/internal/packed/packed.go b/demo/internal/packed/packed.go deleted file mode 100644 index e20ab1e..0000000 --- a/demo/internal/packed/packed.go +++ /dev/null @@ -1 +0,0 @@ -package packed diff --git a/demo/internal/service/.gitkeep b/demo/internal/service/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/demo/main.go b/demo/main.go deleted file mode 100644 index 65a43ce..0000000 --- a/demo/main.go +++ /dev/null @@ -1,13 +0,0 @@ -package main - -import ( - _ "demo/internal/packed" - - "github.com/gogf/gf/v2/os/gctx" - - "demo/internal/cmd" -) - -func main() { - cmd.Main.Run(gctx.GetInitCtx()) -} diff --git a/demo/manifest/deploy/kustomize/base/deployment.yaml b/demo/manifest/deploy/kustomize/base/deployment.yaml deleted file mode 100644 index 28f1d69..0000000 --- a/demo/manifest/deploy/kustomize/base/deployment.yaml +++ /dev/null @@ -1,21 +0,0 @@ -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/demo/manifest/deploy/kustomize/base/kustomization.yaml b/demo/manifest/deploy/kustomize/base/kustomization.yaml deleted file mode 100644 index 302d92d..0000000 --- a/demo/manifest/deploy/kustomize/base/kustomization.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: -- deployment.yaml -- service.yaml - - - diff --git a/demo/manifest/deploy/kustomize/base/service.yaml b/demo/manifest/deploy/kustomize/base/service.yaml deleted file mode 100644 index 608771c..0000000 --- a/demo/manifest/deploy/kustomize/base/service.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: template-single -spec: - ports: - - port: 80 - protocol: TCP - targetPort: 8000 - selector: - app: template-single - diff --git a/demo/manifest/deploy/kustomize/overlays/develop/configmap.yaml b/demo/manifest/deploy/kustomize/overlays/develop/configmap.yaml deleted file mode 100644 index 3b1d0af..0000000 --- a/demo/manifest/deploy/kustomize/overlays/develop/configmap.yaml +++ /dev/null @@ -1,14 +0,0 @@ -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/demo/manifest/deploy/kustomize/overlays/develop/deployment.yaml b/demo/manifest/deploy/kustomize/overlays/develop/deployment.yaml deleted file mode 100644 index 04e4851..0000000 --- a/demo/manifest/deploy/kustomize/overlays/develop/deployment.yaml +++ /dev/null @@ -1,10 +0,0 @@ -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/demo/manifest/deploy/kustomize/overlays/develop/kustomization.yaml b/demo/manifest/deploy/kustomize/overlays/develop/kustomization.yaml deleted file mode 100644 index 4731c47..0000000 --- a/demo/manifest/deploy/kustomize/overlays/develop/kustomization.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -resources: -- ../../base -- configmap.yaml - -patchesStrategicMerge: -- deployment.yaml - -namespace: default - - - diff --git a/demo/manifest/docker/Dockerfile b/demo/manifest/docker/Dockerfile deleted file mode 100644 index d3abe8f..0000000 --- a/demo/manifest/docker/Dockerfile +++ /dev/null @@ -1,16 +0,0 @@ -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/demo/manifest/docker/docker.sh b/demo/manifest/docker/docker.sh deleted file mode 100644 index ff393f9..0000000 --- a/demo/manifest/docker/docker.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -# This shell is executed before docker build. - - - - - diff --git a/demo/manifest/i18n/.gitkeep b/demo/manifest/i18n/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/demo/manifest/protobuf/.keep-if-necessary b/demo/manifest/protobuf/.keep-if-necessary deleted file mode 100644 index e69de29..0000000 diff --git a/demo/resource/public/html/.gitkeep b/demo/resource/public/html/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/demo/resource/public/plugin/.gitkeep b/demo/resource/public/plugin/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/demo/resource/public/resource/css/.gitkeep b/demo/resource/public/resource/css/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/demo/resource/public/resource/image/.gitkeep b/demo/resource/public/resource/image/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/demo/resource/public/resource/js/.gitkeep b/demo/resource/public/resource/js/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/demo/resource/template/.gitkeep b/demo/resource/template/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/demo/utility/.gitkeep b/demo/utility/.gitkeep deleted file mode 100644 index e69de29..0000000