This commit is contained in:
孟帅
2023-02-23 17:53:04 +08:00
parent 7cf1b8ce8e
commit 61d0988d2c
402 changed files with 18340 additions and 35547 deletions

6
server/.gitignore vendored
View File

@@ -19,8 +19,10 @@ manifest/output/
resource/log/
resource/public/admin/
resource/public/attachment/
resource/ssl/server.crt
resource/ssl/server.key
storage/cache/
storage/diskqueue/
storage/ssl/server.crt
storage/ssl/server.key
temp/
main.exe
main.exe~

View File

@@ -2,22 +2,27 @@ ROOT_DIR = $(shell pwd)
NAMESPACE = "default"
DEPLOY_NAME = "template-single"
DOCKER_NAME = "template-single"
ADMIN_RESOURCE_PATH = "/resource/public/admin/"
# 一键编译编译web前端并将编译后的包移动到服务端对应静态资源路径下最后编译服务端
.PHONY: build
build:
@rm -rf ./resource/public/admin/*
@cd ../web && yarn build && \cp -rf ./dist/* ../server/resource/public/admin/
@rm -rf ./$(ADMIN_RESOURCE_PATH)
@mkdir ./$(ADMIN_RESOURCE_PATH)
@cd ../web && yarn build && \cp -rf ./dist/* ../server$(ADMIN_RESOURCE_PATH)
@echo "y" | gf build
push:
@cd $(ROOT_DIR) && cd .. && ./push.sh
# 通过热编译启动所有服务
.PHONY: all
all:
gf run main.go --args "all"
# 启动web服务
.PHONY: web
web:
@cd ../web && yarn serve
@cd ../web && yarn dev
# 清理gf调试进程
.PHONY: killmain
killmain:
@kill -9 $(ps -ef|grep main|grep -v grep|awk '{print $2}')
@@ -91,3 +96,6 @@ deploy:
kubectl patch -n $(NAMESPACE) deployment/$(DEPLOY_NAME) -p "{\"spec\":{\"template\":{\"metadata\":{\"labels\":{\"date\":\"$(shell date +%s)\"}}}}}";
.PHONY: push
push:
@cd $(ROOT_DIR) && cd .. && ./push.sh

2
server/addons/addons.go Normal file
View File

@@ -0,0 +1,2 @@
package addons

View File

@@ -0,0 +1,39 @@
## 功能案例
### 简介
系统的一些功能案例
### 使用说明
系统自带的功能使用示例及其说明包含一些简单的交互
### 安装
1安装 HotGo (2.1.4及以上)
项目介绍https://github.com/bufanyun/hotgo
2将当前插件项目拷贝进 HotGo 根目录的 server/addons 目录下
3 HotGo 根目录的 server/addons/modules 目录下创建go文件:hgexample.go内容如下
```go
package modules
import _ "hotgo/addons/hgexample"
```
4HotGo 后台进入 开发工具->插件管理->找到 功能案例 (hgexample) 进行安装
5重启服务即可生效
### 常用命令行
```shell
# 接口维护-gen service
gf gen service -s=addons/hgexample/logic -d=addons/hgexample/service
```

View File

@@ -0,0 +1,28 @@
// Package config
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package config
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/addons/hgexample/model/input/sysin"
)
// GetReq 获取指定分组的配置
type GetReq struct {
g.Meta `path:"/config/get" method:"get" tags:"配置" summary:"获取指定分组的配置"`
sysin.GetConfigInp
}
type GetRes struct {
*sysin.GetConfigModel
}
// UpdateReq 获取指定分组的配置
type UpdateReq struct {
g.Meta `path:"/config/update" method:"post" tags:"配置" summary:"获取指定分组的配置"`
sysin.UpdateConfigInp
}
type UpdateRes struct {
}

View File

@@ -0,0 +1,22 @@
// Package index
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package index
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/addons/hgexample/model/input/sysin"
)
// TestReq 测试
type TestReq struct {
g.Meta `path:"/index/test" method:"get" tags:"功能案例" summary:"测试"`
sysin.IndexTestInp
}
type TestRes struct {
*sysin.IndexTestModel
}

View File

@@ -0,0 +1,77 @@
// Package table
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package table
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/addons/hgexample/model/input/sysin"
"hotgo/internal/model/input/form"
)
// ListReq 查询列表
type ListReq struct {
g.Meta `path:"/table/list" method:"get" tags:"表格" summary:"获取表格列表"`
sysin.TableListInp
}
type ListRes struct {
form.PageRes
List []*sysin.TableListModel `json:"list" dc:"数据列表"`
}
// ExportReq 导出列表
type ExportReq struct {
g.Meta `path:"/table/export" method:"get" tags:"表格" summary:"导出表格列表"`
sysin.TableListInp
}
type ExportRes struct{}
// ViewReq 获取信息
type ViewReq struct {
g.Meta `path:"/table/view" method:"get" tags:"表格" summary:"获取指定信息"`
sysin.TableViewInp
}
type ViewRes struct {
*sysin.TableViewModel
}
// EditReq 修改/新增
type EditReq struct {
g.Meta `path:"/table/edit" method:"post" tags:"表格" summary:"修改/新增表格"`
sysin.TableEditInp
}
type EditRes struct{}
// DeleteReq 删除
type DeleteReq struct {
g.Meta `path:"/table/delete" method:"post" tags:"表格" summary:"删除表格"`
sysin.TableDeleteInp
}
type DeleteRes struct{}
// MaxSortReq 最大排序
type MaxSortReq struct {
g.Meta `path:"/table/maxSort" method:"get" tags:"表格" summary:"表格最大排序"`
}
type MaxSortRes struct {
*sysin.TableMaxSortModel
}
// StatusReq 更新状态
type StatusReq struct {
g.Meta `path:"/table/status" method:"post" tags:"表格" summary:"更新表格状态"`
sysin.TableStatusInp
}
type StatusRes struct{}
// SwitchReq 更新开关状态
type SwitchReq struct {
g.Meta `path:"/table/switch" method:"post" tags:"表格" summary:"更新表格状态"`
sysin.TableSwitchInp
}
type SwitchRes struct{}

View File

@@ -0,0 +1,22 @@
// Package index
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package index
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/addons/hgexample/model/input/sysin"
)
// TestReq 测试
type TestReq struct {
g.Meta `path:"/index/test" method:"get" tags:"功能案例" summary:"测试"`
sysin.IndexTestInp
}
type TestRes struct {
*sysin.IndexTestModel
}

View File

@@ -0,0 +1,22 @@
// Package index
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package index
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/addons/hgexample/model/input/sysin"
)
// TestReq 测试
type TestReq struct {
g.Meta `path:"/index/test" method:"get" summary:"功能案例" tags:"测试首页"`
sysin.IndexTestInp
}
type TestRes struct {
g.Meta `mime:"text/html" type:"string" example:"<html/>"`
}

View File

@@ -0,0 +1,22 @@
// Package index
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package index
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/addons/hgexample/model/input/sysin"
)
// TestReq 测试
type TestReq struct {
g.Meta `path:"/index/test" method:"get" tags:"功能案例" summary:"测试"`
sysin.IndexTestInp
}
type TestRes struct {
*sysin.IndexTestModel
}

View File

@@ -0,0 +1,46 @@
// Package sys
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package sys
import (
"context"
"github.com/gogf/gf/v2/util/gconv"
"hotgo/addons/hgexample/model/input/sysin"
"hotgo/addons/hgexample/service"
"hotgo/api/admin/config"
isysin "hotgo/internal/model/input/sysin"
)
var (
Config = cConfig{}
)
type cConfig struct{}
// GetConfig 获取指定分组的配置
func (c *cConfig) GetConfig(ctx context.Context, req *config.GetReq) (res *config.GetRes, err error) {
var in sysin.GetConfigInp
if err = gconv.Scan(req, &in); err != nil {
return
}
data, err := service.SysConfig().GetConfigByGroup(ctx, in)
res = new(config.GetRes)
res.GetConfigModel = (*isysin.GetConfigModel)(data)
return
}
// UpdateConfig 更新指定分组的配置
func (c *cConfig) UpdateConfig(ctx context.Context, req *config.UpdateReq) (res *config.UpdateRes, err error) {
var in sysin.UpdateConfigInp
if err = gconv.Scan(req, &in); err != nil {
return
}
err = service.SysConfig().UpdateConfigByGroup(ctx, in)
return
}

View File

@@ -0,0 +1,43 @@
// Package sys
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package sys
import (
"context"
"github.com/gogf/gf/v2/util/gconv"
"hotgo/addons/hgexample/api/admin/index"
"hotgo/addons/hgexample/model/input/sysin"
"hotgo/addons/hgexample/service"
"hotgo/utility/validate"
)
var (
Index = cIndex{}
)
type cIndex struct{}
// Test 测试
func (c *cIndex) Test(ctx context.Context, req *index.TestReq) (res *index.TestRes, err error) {
var in sysin.IndexTestInp
if err = gconv.Scan(req, &in); err != nil {
return nil, err
}
if err = validate.PreFilter(ctx, &in); err != nil {
return nil, err
}
data, err := service.SysIndex().Test(ctx, in)
if err != nil {
return
}
res = new(index.TestRes)
res.IndexTestModel = data
return
}

View File

@@ -0,0 +1,135 @@
// Package sys
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package sys
import (
"context"
"github.com/gogf/gf/v2/util/gconv"
"hotgo/addons/hgexample/api/admin/table"
"hotgo/addons/hgexample/model/input/sysin"
"hotgo/addons/hgexample/service"
"hotgo/internal/model/input/form"
"hotgo/utility/validate"
)
var (
Table = cTable{}
)
type cTable struct{}
// List 查看列表
func (c *cTable) List(ctx context.Context, req *table.ListReq) (res *table.ListRes, err error) {
var in sysin.TableListInp
if err = gconv.Scan(req, &in); err != nil {
return
}
if err = validate.PreFilter(ctx, &in); err != nil {
return
}
list, totalCount, err := service.SysTable().List(ctx, in)
if err != nil {
return
}
res = new(table.ListRes)
res.List = list
res.PageCount = form.CalPageCount(totalCount, req.PerPage)
res.Page = req.Page
res.PerPage = req.PerPage
return
}
// Export 导出列表
func (c *cTable) Export(ctx context.Context, req *table.ExportReq) (res *table.ExportRes, err error) {
var in sysin.TableListInp
if err = gconv.Scan(req, &in); err != nil {
return
}
err = service.SysTable().Export(ctx, in)
return
}
// Edit 更新
func (c *cTable) Edit(ctx context.Context, req *table.EditReq) (res *table.EditRes, err error) {
var in sysin.TableEditInp
if err = gconv.Scan(req, &in); err != nil {
return
}
if err = validate.PreFilter(ctx, &in); err != nil {
return
}
err = service.SysTable().Edit(ctx, in)
return
}
// MaxSort 最大排序
func (c *cTable) MaxSort(ctx context.Context, req *table.MaxSortReq) (res *table.MaxSortRes, err error) {
data, err := service.SysTable().MaxSort(ctx, sysin.TableMaxSortInp{})
if err != nil {
return
}
res = new(table.MaxSortRes)
res.TableMaxSortModel = data
return
}
// View 获取指定信息
func (c *cTable) View(ctx context.Context, req *table.ViewReq) (res *table.ViewRes, err error) {
var in sysin.TableViewInp
if err = gconv.Scan(req, &in); err != nil {
return
}
data, err := service.SysTable().View(ctx, in)
if err != nil {
return
}
res = new(table.ViewRes)
res.TableViewModel = data
return
}
// Delete 删除
func (c *cTable) Delete(ctx context.Context, req *table.DeleteReq) (res *table.DeleteRes, err error) {
var in sysin.TableDeleteInp
if err = gconv.Scan(req, &in); err != nil {
return
}
err = service.SysTable().Delete(ctx, in)
return
}
// Status 更新状态
func (c *cTable) Status(ctx context.Context, req *table.StatusReq) (res *table.StatusRes, err error) {
var in sysin.TableStatusInp
if err = gconv.Scan(req, &in); err != nil {
return
}
err = service.SysTable().Status(ctx, in)
return
}
// Switch 更新开关状态
func (c *cTable) Switch(ctx context.Context, req *table.SwitchReq) (res *table.SwitchRes, err error) {
var in sysin.TableSwitchInp
if err = gconv.Scan(req, &in); err != nil {
return
}
err = service.SysTable().Switch(ctx, in)
return
}

View File

@@ -0,0 +1,43 @@
// Package api
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package api
import (
"context"
"github.com/gogf/gf/v2/util/gconv"
"hotgo/addons/hgexample/api/api/index"
"hotgo/addons/hgexample/model/input/sysin"
"hotgo/addons/hgexample/service"
"hotgo/utility/validate"
)
var (
Index = cIndex{}
)
type cIndex struct{}
// Test 测试
func (c *cIndex) Test(ctx context.Context, req *index.TestReq) (res *index.TestRes, err error) {
var in sysin.IndexTestInp
if err = gconv.Scan(req, &in); err != nil {
return nil, err
}
if err = validate.PreFilter(ctx, &in); err != nil {
return nil, err
}
data, err := service.SysIndex().Test(ctx, in)
if err != nil {
return
}
res = new(index.TestRes)
res.IndexTestModel = data
return
}

View File

@@ -0,0 +1,48 @@
// Package home
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package home
import (
"context"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/util/gconv"
"hotgo/addons/hgexample/api/home/index"
"hotgo/addons/hgexample/global"
"hotgo/addons/hgexample/model/input/sysin"
"hotgo/addons/hgexample/service"
"hotgo/internal/model"
isc "hotgo/internal/service"
"hotgo/utility/validate"
)
// Index 基础
var Index = cIndex{}
type cIndex struct{}
func (a *cIndex) Index(ctx context.Context, req *index.TestReq) (res *index.TestRes, err error) {
var in sysin.IndexTestInp
if err = gconv.Scan(req, &in); err != nil {
return nil, err
}
if err = validate.PreFilter(ctx, &in); err != nil {
return nil, err
}
data, err := service.SysIndex().Test(ctx, in)
if err != nil {
return
}
isc.View().RenderTpl(ctx, global.Tpl("home/index.html"), model.View{Data: g.Map{
"name": data.Name,
"module": data.Module,
"time": data.Time,
}})
return
}

View File

@@ -0,0 +1,43 @@
// Package websocket
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package websocket
import (
"context"
"github.com/gogf/gf/v2/util/gconv"
"hotgo/addons/hgexample/api/websocket/index"
"hotgo/addons/hgexample/model/input/sysin"
"hotgo/addons/hgexample/service"
"hotgo/utility/validate"
)
var (
Index = cIndex{}
)
type cIndex struct{}
// Test 测试
func (c *cIndex) Test(ctx context.Context, req *index.TestReq) (res *index.TestRes, err error) {
var in sysin.IndexTestInp
if err = gconv.Scan(req, &in); err != nil {
return nil, err
}
if err = validate.PreFilter(ctx, &in); err != nil {
return nil, err
}
data, err := service.SysIndex().Test(ctx, in)
if err != nil {
return
}
res = new(index.TestRes)
res.IndexTestModel = data
return
}

View File

@@ -0,0 +1,12 @@
// Package global
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package global
import "hotgo/internal/library/addons"
var (
skeleton *addons.Skeleton // 插件架子
)

View File

@@ -0,0 +1,26 @@
// Package global
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package global
import (
"context"
"hotgo/internal/library/addons"
)
func Init(ctx context.Context, sk *addons.Skeleton) {
skeleton = sk
}
func GetSkeleton() *addons.Skeleton {
if skeleton == nil {
panic("addon skeleton not initialized.")
}
return skeleton
}
func Tpl(tpl string) string {
return addons.Tpl(skeleton.Name, tpl)
}

View File

@@ -0,0 +1,9 @@
// ==========================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// ==========================================================================
package logic
import (
_ "hotgo/addons/hgexample/logic/sys"
)

View File

@@ -0,0 +1,54 @@
package sys
import (
"context"
"github.com/gogf/gf/v2/util/gconv"
"hotgo/addons/hgexample/global"
"hotgo/addons/hgexample/model"
"hotgo/addons/hgexample/model/input/sysin"
"hotgo/addons/hgexample/service"
isc "hotgo/internal/service"
)
type sSysConfig struct{}
func NewSysConfig() *sSysConfig {
return &sSysConfig{}
}
func init() {
service.RegisterSysConfig(NewSysConfig())
}
// GetBasic 获取基础配置
func (s *sSysConfig) GetBasic(ctx context.Context) (conf *model.BasicConfig, err error) {
var in sysin.GetConfigInp
in.GetAddonsConfigInp.AddonName = global.GetSkeleton().Name
in.GetAddonsConfigInp.Group = "basic"
models, err := isc.SysAddonsConfig().GetConfigByGroup(ctx, in.GetAddonsConfigInp)
if err != nil {
return
}
err = gconv.Struct(models.List, &conf)
return
}
// GetConfigByGroup 获取指定分组配置
func (s *sSysConfig) GetConfigByGroup(ctx context.Context, in sysin.GetConfigInp) (res *sysin.GetConfigModel, err error) {
in.GetAddonsConfigInp.AddonName = global.GetSkeleton().Name
models, err := isc.SysAddonsConfig().GetConfigByGroup(ctx, in.GetAddonsConfigInp)
if err != nil {
return
}
res = new(sysin.GetConfigModel)
res.List = models.List
return
}
// UpdateConfigByGroup 更新指定分组的配置
func (s *sSysConfig) UpdateConfigByGroup(ctx context.Context, in sysin.UpdateConfigInp) error {
in.UpdateAddonsConfigInp.AddonName = global.GetSkeleton().Name
return isc.SysAddonsConfig().UpdateConfigByGroup(ctx, in.UpdateAddonsConfigInp)
}

View File

@@ -0,0 +1,35 @@
// Package sys
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package sys
import (
"context"
"fmt"
"github.com/gogf/gf/v2/os/gtime"
"hotgo/addons/hgexample/global"
"hotgo/addons/hgexample/model/input/sysin"
"hotgo/addons/hgexample/service"
"hotgo/internal/library/contexts"
)
type sSysIndex struct{}
func NewSysIndex() *sSysIndex {
return &sSysIndex{}
}
func init() {
service.RegisterSysIndex(NewSysIndex())
}
// Test 测试
func (s *sSysIndex) Test(ctx context.Context, in sysin.IndexTestInp) (res *sysin.IndexTestModel, err error) {
res = new(sysin.IndexTestModel)
res.Name = in.Name
res.Module = fmt.Sprintf("当前插件模块是:%s当前应用模块是%s", global.GetSkeleton().Name, contexts.Get(ctx).Module)
res.Time = gtime.Now()
return
}

View File

@@ -0,0 +1,244 @@
// Package sys
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package sys
import (
"context"
"fmt"
"github.com/gogf/gf/v2/database/gdb"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gctx"
"github.com/gogf/gf/v2/util/gconv"
"hotgo/addons/hgexample/model/input/sysin"
"hotgo/addons/hgexample/service"
"hotgo/internal/consts"
"hotgo/internal/dao"
"hotgo/internal/library/contexts"
"hotgo/internal/library/hgorm"
"hotgo/internal/library/hgorm/handler"
"hotgo/internal/model/input/form"
"hotgo/utility/convert"
"hotgo/utility/excel"
"hotgo/utility/validate"
)
type sSysTable struct{}
func NewSysTable() *sSysTable {
return &sSysTable{}
}
func init() {
service.RegisterSysTable(NewSysTable())
}
// Model Orm模型
func (s *sSysTable) Model(ctx context.Context, option ...*handler.Option) *gdb.Model {
return handler.Model(dao.AddonHgexampleTable.Ctx(ctx), option...)
}
// List 获取列表
func (s *sSysTable) List(ctx context.Context, in sysin.TableListInp) (list []*sysin.TableListModel, totalCount int, err error) {
mod := s.Model(ctx)
if in.Title != "" {
mod = mod.WhereLike(dao.AddonHgexampleTable.Columns().Title, "%"+in.Title+"%")
}
if in.Content != "" {
mod = mod.WhereLike(dao.AddonHgexampleTable.Columns().Content, "%"+in.Content+"%")
}
if in.Status > 0 {
mod = mod.Where(dao.AddonHgexampleTable.Columns().Status, in.Status)
}
if in.Switch > 0 {
mod = mod.Where(dao.AddonHgexampleTable.Columns().Switch, in.Switch)
}
if len(in.Price) > 0 {
if in.Price[0] > float64(0) && in.Price[1] > float64(0) {
mod = mod.WhereBetween(dao.AddonHgexampleTable.Columns().Price, in.Price[0], in.Price[1])
} else if in.Price[0] > float64(0) && in.Price[1] == float64(0) {
mod = mod.WhereGTE(dao.AddonHgexampleTable.Columns().Price, in.Price[0])
} else if in.Price[0] == float64(0) && in.Price[1] > float64(0) {
mod = mod.WhereLTE(dao.AddonHgexampleTable.Columns().Price, in.Price[1])
}
}
if in.ActivityAt != nil {
mod = mod.Where(dao.AddonHgexampleTable.Columns().ActivityAt, in.ActivityAt)
}
if len(in.CreatedAt) == 2 {
mod = mod.WhereBetween(dao.AddonHgexampleTable.Columns().CreatedAt, in.CreatedAt[0], in.CreatedAt[1])
}
if !in.Flag.IsNil() {
mod = mod.Where(fmt.Sprintf(`JSON_CONTAINS(%s,'%v')`, dao.AddonHgexampleTable.Columns().Flag, in.Flag))
}
if !in.Hobby.IsNil() {
mod = mod.Where(fmt.Sprintf(`JSON_CONTAINS(%s,'%v')`, dao.AddonHgexampleTable.Columns().Hobby, in.Hobby))
}
//// 关联表testCategory
//mod = mod.LeftJoin(hgorm.GenJoinOnRelation(
// dao.AddonHgexampleTable.Table(), dao.AddonHgexampleTable.Columns().CategoryId, // 主表表名,关联条件
// dao.AddonHgexampleTableCategory.Table(), "testCategory", dao.AddonHgexampleTableCategory.Columns().Id, // 关联表表名,别名,关联条件
//)...)
//
//mod = mod.Where(`testCategory.`+dao.AddonHgexampleTableCategory.Columns().Name, "微信公众号")
totalCount, err = mod.Clone().Count(1)
if err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return
}
if totalCount == 0 {
return
}
////关联表select
//fields, err := hgorm.GenJoinSelect(ctx, sysin.TableListModel{}, dao.AddonHgexampleTable, []*hgorm.Join{
// {Dao: dao.AddonHgexampleTableCategory, Alias: "testCategory"},
// //{Dao: dao.AddonHgexampleTableCategory, Alias: "testCategory"},
//})
fields, err := hgorm.GenSelect(ctx, sysin.TableListModel{}, dao.AddonHgexampleTable)
if err != nil {
return
}
if err = mod.Fields(fields).Page(in.Page, in.PerPage).OrderAsc(dao.AddonHgexampleTable.Columns().Sort).OrderDesc(dao.AddonHgexampleTable.Columns().Id).Scan(&list); err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return
}
return
}
// Export 导出
func (s *sSysTable) Export(ctx context.Context, in sysin.TableListInp) (err error) {
list, totalCount, err := s.List(ctx, in)
if err != nil {
return
}
// 字段的排序是依据tags的字段顺序如果你不想使用默认的排序方式可以直接定义 tags = []string{"字段名称", "字段名称2", ...}
tags, err := convert.GetEntityDescTags(sysin.TableExportModel{})
if err != nil {
return
}
var (
fileName = "表格例子导出-" + gctx.CtxId(ctx) + ".xlsx"
sheetName = fmt.Sprintf("索引条件共%v行,共%v页,当前导出是第%v页,本页共%v行", totalCount, form.CalPageCount(totalCount, in.PerPage), in.Page, len(list))
exports []sysin.TableExportModel
)
if err = gconv.Scan(list, &exports); err != nil {
return
}
if err = excel.ExportByStructs(ctx, tags, exports, fileName, sheetName); err != nil {
return
}
return
}
// Edit 修改/新增
func (s *sSysTable) Edit(ctx context.Context, in sysin.TableEditInp) (err error) {
if err = hgorm.IsUnique(ctx, dao.AddonHgexampleTable, g.Map{dao.AddonHgexampleTable.Columns().Qq: in.Qq}, "QQ号码已存在请换一个", in.Id); err != nil {
return
}
// 修改
if in.Id > 0 {
in.UpdatedBy = contexts.GetUserId(ctx)
_, err = s.Model(ctx).Where(dao.AddonHgexampleTable.Columns().Id, in.Id).Data(in).Update()
return
}
// 新增
in.CreatedBy = contexts.GetUserId(ctx)
_, err = s.Model(ctx, &handler.Option{FilterAuth: false}).Data(in).Insert()
return
}
// Delete 删除
func (s *sSysTable) Delete(ctx context.Context, in sysin.TableDeleteInp) (err error) {
_, err = s.Model(ctx).Where(dao.AddonHgexampleTable.Columns().Id, in.Id).Delete()
return
}
// Status 更新状态
func (s *sSysTable) Status(ctx context.Context, in sysin.TableStatusInp) (err error) {
if in.Id <= 0 {
err = gerror.New("ID不能为空")
return
}
if in.Status <= 0 {
err = gerror.New("状态不能为空")
return
}
if !validate.InSliceInt(consts.StatusMap, in.Status) {
err = gerror.New("状态不正确")
return
}
// 修改
_, err = s.Model(ctx).Where(dao.AddonHgexampleTable.Columns().Id, in.Id).Data(g.Map{
dao.AddonHgexampleTable.Columns().Status: in.Status,
dao.AddonHgexampleTable.Columns().UpdatedBy: contexts.GetUserId(ctx),
}).Update()
return
}
// Switch 更新开关状态
func (s *sSysTable) Switch(ctx context.Context, in sysin.TableSwitchInp) (err error) {
var fields = []string{
dao.AddonHgexampleTable.Columns().Switch,
// ...
}
if !validate.InSliceString(fields, in.Key) {
err = gerror.New("开关键名不在白名单")
return
}
// 修改
_, err = s.Model(ctx).Where(dao.AddonHgexampleTable.Columns().Id, in.Id).Data(g.Map{
in.Key: in.Value,
dao.AddonHgexampleTable.Columns().UpdatedBy: contexts.GetUserId(ctx),
}).Update()
return
}
// MaxSort 最大排序
func (s *sSysTable) MaxSort(ctx context.Context, in sysin.TableMaxSortInp) (res *sysin.TableMaxSortModel, err error) {
if err = dao.AddonHgexampleTable.Ctx(ctx).Fields(dao.AddonHgexampleTable.Columns().Sort).OrderDesc(dao.AddonHgexampleTable.Columns().Sort).Scan(&res); err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return
}
if res == nil {
res = new(sysin.TableMaxSortModel)
}
res.Sort = form.DefaultMaxSort(ctx, res.Sort)
return
}
// View 获取指定信息
func (s *sSysTable) View(ctx context.Context, in sysin.TableViewInp) (res *sysin.TableViewModel, err error) {
err = s.Model(ctx).Where(dao.AddonHgexampleTable.Columns().Id, in.Id).Scan(&res)
return
}

View File

@@ -0,0 +1,89 @@
// Package hgexample
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package hgexample
import (
"context"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/os/gctx"
"hotgo/addons/hgexample/global"
_ "hotgo/addons/hgexample/logic"
"hotgo/addons/hgexample/router"
"hotgo/internal/library/addons"
"sync"
)
type module struct {
skeleton *addons.Skeleton
ctx context.Context
sync.Mutex
}
func init() {
newModule()
}
func newModule() {
m := &module{
skeleton: &addons.Skeleton{
Label: "功能案例",
Name: "hgexample",
Group: 1,
Logo: "",
Brief: "系统的一些功能案例",
Description: "系统自带的功能使用示例及其说明,包含一些简单的交互",
Author: "孟帅",
Version: "v1.0.0", // 当该版本号高于已安装的版本号时,会提示可以更新
RootPath: addons.GetModulePath("hgexample"),
},
ctx: gctx.New(),
}
addons.RegisterModule(m)
}
// Init 初始化
func (m *module) Init(ctx context.Context) {
global.Init(ctx, m.skeleton)
// ...
}
// InitRouter 初始化WEB路由
func (m *module) InitRouter(ctx context.Context, group *ghttp.RouterGroup) {
m.Init(ctx)
router.Admin(ctx, group)
router.Api(ctx, group)
router.Home(ctx, group)
router.WebSocket(ctx, group)
}
// Ctx 上下文
func (m *module) Ctx() context.Context {
return m.ctx
}
// GetSkeleton 架子
func (m *module) GetSkeleton() *addons.Skeleton {
return m.skeleton
}
// Install 安装模块
func (m *module) Install(ctx context.Context) (err error) {
// ...
return
}
// Upgrade 更新模块
func (m *module) Upgrade(ctx context.Context) (err error) {
// ...
return
}
// UnInstall 卸载模块
func (m *module) UnInstall(ctx context.Context) (err error) {
// ...
return
}

View File

@@ -0,0 +1,11 @@
// Package model
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package model
// BasicConfig 基础配置
type BasicConfig struct {
Test string `json:"basicTest"`
}

View File

@@ -0,0 +1,24 @@
// Package sysin
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package sysin
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/internal/model/input/sysin"
)
// UpdateConfigInp 更新指定配置
type UpdateConfigInp struct {
sysin.UpdateAddonsConfigInp
}
type GetConfigInp struct {
sysin.GetAddonsConfigInp
}
type GetConfigModel struct {
List g.Map `json:"list"`
}

View File

@@ -0,0 +1,27 @@
// Package sysin
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package sysin
import (
"context"
"github.com/gogf/gf/v2/os/gtime"
)
// IndexTestInp 测试
type IndexTestInp struct {
Name string `json:"name" d:"HotGo" dc:"名称"`
}
func (in *IndexTestInp) Filter(ctx context.Context) (err error) {
return
}
type IndexTestModel struct {
Name string `json:"name" dc:"名称"`
Module string `json:"module" dc:"当前插件模块"`
Time *gtime.Time `json:"time" dc:"当前时间"`
}

View File

@@ -1,10 +1,10 @@
// Package adminin
// Package sysin
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package adminin
package sysin
import (
"context"
@@ -18,14 +18,14 @@ import (
"hotgo/utility/validate"
)
// TestEditInp 修改/新增
type TestEditInp struct {
entity.Test
// TableEditInp 修改/新增
type TableEditInp struct {
entity.AddonHgexampleTable
}
type TestEditModel struct{}
type TableEditModel struct{}
func (in *TestEditInp) Filter(ctx context.Context) (err error) {
func (in *TableEditInp) Filter(ctx context.Context) (err error) {
if in.Map.IsNil() {
in.Map = gjson.New(consts.NilJsonToString)
}
@@ -57,24 +57,24 @@ func (in *TestEditInp) Filter(ctx context.Context) (err error) {
return
}
// TestDeleteInp 删除类型
type TestDeleteInp struct {
Id interface{} `json:"id" v:"required#测试ID不能为空" dc:"测试ID"`
// TableDeleteInp 删除类型
type TableDeleteInp struct {
Id interface{} `json:"id" v:"required#表格ID不能为空" dc:"表格ID"`
}
type TestDeleteModel struct{}
type TableDeleteModel struct{}
// TestViewInp 获取信息
type TestViewInp struct {
Id int64 `json:"id" v:"required#测试ID不能为空" dc:"测试ID"`
// TableViewInp 获取信息
type TableViewInp struct {
Id int64 `json:"id" v:"required#表格ID不能为空" dc:"表格ID"`
}
type TestViewModel struct {
entity.Test
type TableViewModel struct {
entity.AddonHgexampleTable
}
// TestListInp 获取列表
type TestListInp struct {
// TableListInp 获取列表
type TableListInp struct {
form.PageReq
Id int64 `json:"id" description:""`
Flag *gjson.Json `json:"flag" description:"标签"`
@@ -88,15 +88,15 @@ type TestListInp struct {
CreatedAt []*gtime.Time `json:"createdAt" description:"创建时间"`
}
type TestListModel struct {
entity.Test
TestCategoryName string `json:"testCategoryName" description:"分类名称"`
TestCategoryDescription string `json:"testCategoryDescription" description:"分类描述"`
TestCategoryRemark string `json:"testCategoryRemark" description:"分类备注"`
SysProvincesTitle string `json:"sysProvincesTitle" description:""`
type TableListModel struct {
entity.AddonHgexampleTable
TableCategoryName string `json:"TableCategoryName" description:"分类名称"`
TableCategoryDescription string `json:"TableCategoryDescription" description:"分类描述"`
TableCategoryRemark string `json:"TableCategoryRemark" description:"分类备注"`
SysProvincesTitle string `json:"sysProvincesTitle" description:""`
}
func (in *TestListInp) Filter(ctx context.Context) (err error) {
func (in *TableListInp) Filter(ctx context.Context) (err error) {
if !in.Flag.IsNil() {
in.Flag = gjson.New(in.Flag.Var().Ints())
}
@@ -106,7 +106,7 @@ func (in *TestListInp) Filter(ctx context.Context) (err error) {
return
}
type TestExportModel struct {
type TableExportModel struct {
Id int64 `json:"id" description:""`
CategoryId int64 `json:"categoryId" description:"分类ID"`
Flag *gjson.Json `json:"flag" description:"标签"`
@@ -138,25 +138,25 @@ type TestExportModel struct {
DeletedAt *gtime.Time `json:"deletedAt" description:"删除时间"`
}
// TestMaxSortInp 最大排序
type TestMaxSortInp struct{}
// TableMaxSortInp 最大排序
type TableMaxSortInp struct{}
type TestMaxSortModel struct {
type TableMaxSortModel struct {
Sort int `json:"sort" description:"排序"`
}
// TestStatusInp 更新状态
type TestStatusInp struct {
Id int64 `json:"id" v:"required#测试ID不能为空" dc:"测试ID"`
// TableStatusInp 更新状态
type TableStatusInp struct {
Id int64 `json:"id" v:"required#表格ID不能为空" dc:"表格ID"`
Status int `json:"status" dc:"状态"`
}
type TestStatusModel struct{}
type TableStatusModel struct{}
// TestSwitchInp 更新开关状态
type TestSwitchInp struct {
// TableSwitchInp 更新开关状态
type TableSwitchInp struct {
form.SwitchReq
Id int64 `json:"id" v:"required#测试ID不能为空" dc:"测试ID"`
Id int64 `json:"id" v:"required#表格ID不能为空" dc:"表格ID"`
}
type TestSwitchModel struct{}
type TableSwitchModel struct{}

View File

@@ -0,0 +1,34 @@
// Package router
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package router
import (
"context"
"github.com/gogf/gf/v2/net/ghttp"
"hotgo/addons/hgexample/controller/admin/sys"
"hotgo/addons/hgexample/global"
"hotgo/addons/hgexample/router/genrouter"
"hotgo/internal/consts"
"hotgo/internal/library/addons"
"hotgo/internal/service"
)
func Admin(ctx context.Context, group *ghttp.RouterGroup) {
prefix := addons.RouterPrefix(ctx, consts.AppAdmin, global.GetSkeleton().Name)
group.Group(prefix, func(group *ghttp.RouterGroup) {
group.Bind(
sys.Index,
)
group.Middleware(service.Middleware().AdminAuth)
group.Bind(
sys.Config,
sys.Table,
)
})
// 注册生成路由
genrouter.Register(ctx, group)
}

View File

@@ -0,0 +1,32 @@
// Package router
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package router
import (
"context"
"github.com/gogf/gf/v2/net/ghttp"
"hotgo/addons/hgexample/controller/api"
"hotgo/addons/hgexample/global"
"hotgo/internal/consts"
"hotgo/internal/library/addons"
"hotgo/internal/service"
)
// Api 前台路由
func Api(ctx context.Context, group *ghttp.RouterGroup) {
prefix := addons.RouterPrefix(ctx, consts.AppApi, global.GetSkeleton().Name)
group.Group(prefix, func(group *ghttp.RouterGroup) {
group.Bind(
// 无需验证的路由
api.Index,
)
group.Middleware(service.Middleware().ApiAuth)
group.Bind(
// 需要验证的路由
// ...
)
})
}

View File

@@ -0,0 +1,34 @@
// Package genrouter
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package genrouter
import (
"context"
"github.com/gogf/gf/v2/net/ghttp"
"hotgo/addons/hgexample/global"
"hotgo/internal/consts"
"hotgo/internal/library/addons"
"hotgo/internal/service"
)
var (
NoLogin []interface{} // 无需登录
LoginRequiredRouter []interface{} // 需要登录
)
// Register 注册通过代码生成的后台路由
func Register(ctx context.Context, group *ghttp.RouterGroup) {
prefix := addons.RouterPrefix(ctx, consts.AppAdmin, global.GetSkeleton().Name)
group.Group(prefix, func(group *ghttp.RouterGroup) {
if len(NoLogin) > 0 {
group.Bind(NoLogin...)
}
group.Middleware(service.Middleware().AdminAuth)
if len(LoginRequiredRouter) > 0 {
group.Bind(LoginRequiredRouter...)
}
})
}

View File

@@ -0,0 +1,25 @@
// Package router
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package router
import (
"context"
"github.com/gogf/gf/v2/net/ghttp"
"hotgo/addons/hgexample/controller/home"
"hotgo/addons/hgexample/global"
"hotgo/internal/consts"
"hotgo/internal/library/addons"
)
// Home 前台页面路由
func Home(ctx context.Context, group *ghttp.RouterGroup) {
prefix := addons.RouterPrefix(ctx, consts.AppHome, global.GetSkeleton().Name)
group.Group(prefix, func(group *ghttp.RouterGroup) {
group.Bind(
home.Index,
)
})
}

View File

@@ -0,0 +1,40 @@
// Package router
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package router
import (
"context"
"github.com/gogf/gf/v2/net/ghttp"
"hotgo/addons/hgexample/controller/websocket"
"hotgo/addons/hgexample/global"
"hotgo/internal/consts"
"hotgo/internal/library/addons"
"hotgo/internal/service"
ws "hotgo/internal/websocket"
)
// WebSocket ws路由配置
func WebSocket(ctx context.Context, group *ghttp.RouterGroup) {
prefix := addons.RouterPrefix(ctx, consts.AppWebSocket, global.GetSkeleton().Name)
group.Group(prefix, func(group *ghttp.RouterGroup) {
group.Bind(
// 无需验证的路由
websocket.Index,
)
// ws连接中间件
group.Middleware(service.Middleware().WebSocketToken)
group.Bind(
// 需要验证的路由
// ..
)
})
// 注册消息路由
ws.RegisterMsg(ws.EventHandlers{
// ...
})
}

View File

View File

@@ -0,0 +1,76 @@
// ================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// You can delete these comments if you wish manually maintain this interface file.
// ================================================================================
package service
import (
"context"
"hotgo/addons/hgexample/model"
"hotgo/addons/hgexample/model/input/sysin"
"hotgo/internal/library/hgorm/handler"
"github.com/gogf/gf/v2/database/gdb"
)
type (
ISysConfig interface {
GetBasic(ctx context.Context) (conf *model.BasicConfig, err error)
GetConfigByGroup(ctx context.Context, in sysin.GetConfigInp) (res *sysin.GetConfigModel, err error)
UpdateConfigByGroup(ctx context.Context, in sysin.UpdateConfigInp) error
}
ISysIndex interface {
Test(ctx context.Context, in sysin.IndexTestInp) (res *sysin.IndexTestModel, err error)
}
ISysTable interface {
Model(ctx context.Context, option ...*handler.Option) *gdb.Model
List(ctx context.Context, in sysin.TableListInp) (list []*sysin.TableListModel, totalCount int, err error)
Export(ctx context.Context, in sysin.TableListInp) (err error)
Edit(ctx context.Context, in sysin.TableEditInp) (err error)
Delete(ctx context.Context, in sysin.TableDeleteInp) (err error)
Status(ctx context.Context, in sysin.TableStatusInp) (err error)
Switch(ctx context.Context, in sysin.TableSwitchInp) (err error)
MaxSort(ctx context.Context, in sysin.TableMaxSortInp) (res *sysin.TableMaxSortModel, err error)
View(ctx context.Context, in sysin.TableViewInp) (res *sysin.TableViewModel, err error)
}
)
var (
localSysTable ISysTable
localSysConfig ISysConfig
localSysIndex ISysIndex
)
func SysConfig() ISysConfig {
if localSysConfig == nil {
panic("implement not found for interface ISysConfig, forgot register?")
}
return localSysConfig
}
func RegisterSysConfig(i ISysConfig) {
localSysConfig = i
}
func SysIndex() ISysIndex {
if localSysIndex == nil {
panic("implement not found for interface ISysIndex, forgot register?")
}
return localSysIndex
}
func RegisterSysIndex(i ISysIndex) {
localSysIndex = i
}
func SysTable() ISysTable {
if localSysTable == nil {
panic("implement not found for interface ISysTable, forgot register?")
}
return localSysTable
}
func RegisterSysTable(i ISysTable) {
localSysTable = i
}

View File

View File

@@ -0,0 +1,8 @@
// Package modules
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package modules
import _ "hotgo/addons/hgexample"

View File

@@ -0,0 +1,62 @@
// Package addons
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package addons
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/internal/model/input/form"
"hotgo/internal/model/input/sysin"
)
// ListReq 查询列表
type ListReq struct {
g.Meta `path:"/addons/list" method:"get" tags:"插件管理" summary:"获取插件列表"`
sysin.AddonsListInp
}
type ListRes struct {
List []*sysin.AddonsListModel `json:"list" dc:"数据列表"`
form.PageRes
}
type SelectsReq struct {
g.Meta `path:"/addons/selects" method:"get" tags:"插件管理" summary:"生成入口选项"`
}
type SelectsRes struct {
*sysin.AddonsSelectsModel
}
// BuildReq 提交生成
type BuildReq struct {
g.Meta `path:"/addons/build" method:"post" tags:"插件管理" summary:"提交生成"`
sysin.AddonsBuildInp
}
type BuildRes struct {
}
// InstallReq 安装模块
type InstallReq struct {
g.Meta `path:"/addons/install" method:"post" tags:"插件管理" summary:"安装模块"`
sysin.AddonsInstallInp
}
type InstallRes struct {
}
// UpgradeReq 更新模块
type UpgradeReq struct {
g.Meta `path:"/addons/upgrade" method:"post" tags:"插件管理" summary:"更新模块"`
sysin.AddonsUpgradeInp
}
type UpgradeRes struct {
}
// UnInstallReq 卸载模块
type UnInstallReq struct {
g.Meta `path:"/addons/uninstall" method:"post" tags:"插件管理" summary:"卸载模块"`
sysin.AddonsUnInstallInp
}
type UnInstallRes struct {
}

View File

@@ -1,6 +1,6 @@
// Package attachment
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//

View File

@@ -1,6 +1,6 @@
// Package blacklist
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//

View File

@@ -1,6 +1,6 @@
// Package common
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//

View File

@@ -1,6 +1,6 @@
// Package common
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//

View File

@@ -1,6 +1,6 @@
// Package common
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
@@ -47,6 +47,7 @@ type SiteConfigReq struct {
type SiteConfigRes struct {
Version string `json:"version" dc:"系统版本"`
WsAddr string `json:"wsAddr" dc:"客户端websocket地址"`
Domain string `json:"domain" dc:"对外域名"`
}
// SitePingReq ping

View File

@@ -1,6 +1,6 @@
// Package common
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//

View File

@@ -1,6 +1,6 @@
// Package common
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//

View File

@@ -1,9 +1,8 @@
// Package config
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package config
import (

View File

@@ -1,6 +1,6 @@
// Package cron
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//

View File

@@ -1,6 +1,6 @@
// Package cron
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//

View File

@@ -3,8 +3,8 @@
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
// @AutoGenerate Version 2.1.2
// @AutoGenerate Date 2023-02-08 17:47:32
// @AutoGenerate Version 2.1.4
// @AutoGenerate Date 2023-02-20 16:41:58
//
package curddemo

View File

@@ -1,6 +1,6 @@
// Package dept
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//

View File

@@ -1,6 +1,6 @@
// Package dict
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//

View File

@@ -1,6 +1,6 @@
// Package dict
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//

View File

@@ -1,3 +1,9 @@
// Package emslog
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package emslog
import (

View File

@@ -1,6 +1,6 @@
// Package hggen
// Package gencodes
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//

View File

@@ -1,6 +1,6 @@
// Package log
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//

View File

@@ -1,6 +1,6 @@
// Package member
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//

View File

@@ -1,6 +1,6 @@
// Package menu
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//

View File

@@ -1,6 +1,6 @@
// Package monitor
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//

View File

@@ -1,6 +1,6 @@
// Package notice
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//

View File

@@ -1,6 +1,6 @@
// Package post
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//

View File

@@ -1,6 +1,6 @@
// Package provinces
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//

View File

@@ -1,6 +1,6 @@
// Package role
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//

View File

@@ -1,6 +1,6 @@
// Package user
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//

View File

@@ -1,6 +1,6 @@
// Package member
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//

View File

@@ -1,6 +1,6 @@
// Package user
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//

View File

@@ -1,77 +0,0 @@
// Package test
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package test
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/internal/model/input/adminin"
"hotgo/internal/model/input/form"
)
// ListReq 查询列表
type ListReq struct {
g.Meta `path:"/test/list" method:"get" tags:"测试" summary:"获取测试列表"`
adminin.TestListInp
}
type ListRes struct {
form.PageRes
List []*adminin.TestListModel `json:"list" dc:"数据列表"`
}
// ExportReq 导出列表
type ExportReq struct {
g.Meta `path:"/test/export" method:"get" tags:"测试" summary:"导出测试列表"`
adminin.TestListInp
}
type ExportRes struct{}
// ViewReq 获取信息
type ViewReq struct {
g.Meta `path:"/test/view" method:"get" tags:"测试" summary:"获取指定信息"`
adminin.TestViewInp
}
type ViewRes struct {
*adminin.TestViewModel
}
// EditReq 修改/新增
type EditReq struct {
g.Meta `path:"/test/edit" method:"post" tags:"测试" summary:"修改/新增测试"`
adminin.TestEditInp
}
type EditRes struct{}
// DeleteReq 删除
type DeleteReq struct {
g.Meta `path:"/test/delete" method:"post" tags:"测试" summary:"删除测试"`
adminin.TestDeleteInp
}
type DeleteRes struct{}
// MaxSortReq 最大排序
type MaxSortReq struct {
g.Meta `path:"/test/maxSort" method:"get" tags:"测试" summary:"测试最大排序"`
}
type MaxSortRes struct {
*adminin.TestMaxSortModel
}
// StatusReq 更新状态
type StatusReq struct {
g.Meta `path:"/test/status" method:"post" tags:"测试" summary:"更新测试状态"`
adminin.TestStatusInp
}
type StatusRes struct{}
// SwitchReq 更新开关状态
type SwitchReq struct {
g.Meta `path:"/test/switch" method:"post" tags:"测试" summary:"更新测试状态"`
adminin.TestSwitchInp
}
type SwitchRes struct{}

View File

@@ -1,6 +1,6 @@
// Package base
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//

View File

@@ -0,0 +1,15 @@
package base
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/internal/model/input/websocketin"
)
// SendToTagReq 发送标签消息
type SendToTagReq struct {
g.Meta `path:"/send/toTag" method:"post" tags:"WebSocket" summary:"发送标签消息"`
websocketin.SendToTagInput
}
type SendToTagRes struct {
}

View File

@@ -1,9 +1,8 @@
module hotgo
go 1.15
go 1.18
require (
github.com/BurntSushi/toml v1.2.1 // indirect
github.com/Shopify/sarama v1.34.1
github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.2
github.com/alibabacloud-go/dysmsapi-20170525/v3 v3.0.5
@@ -13,37 +12,98 @@ require (
github.com/axgle/mahonia v0.0.0-20180208002826-3358181d7394
github.com/bufanyun/pool v0.2.1
github.com/casbin/casbin/v2 v2.55.0
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/clbanning/mxj/v2 v2.5.7 // indirect
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/fatih/color v1.14.1 // indirect
github.com/forgoer/openssl v1.4.0
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-resty/resty/v2 v2.7.0
github.com/go-sql-driver/mysql v1.7.0 // indirect
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.3.1
github.com/gogf/gf/contrib/nosql/redis/v2 v2.3.1
github.com/gogf/gf/v2 v2.3.1
github.com/golang/mock v1.6.0 // indirect
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.3.2
github.com/gogf/gf/contrib/nosql/redis/v2 v2.3.2
github.com/gogf/gf/v2 v2.3.2
github.com/gomodule/redigo v1.8.8
github.com/google/btree v1.1.2 // indirect
github.com/gorilla/websocket v1.5.0
github.com/kayon/iploc v0.0.0-20200312105652-bda3e968a794
github.com/magiconair/properties v1.8.7 // indirect
github.com/mattn/go-runewidth v0.0.14 // indirect
github.com/mojocn/base64Captcha v1.3.5
github.com/olekukonko/tablewriter v0.0.5
github.com/rivo/uniseg v0.4.3 // indirect
github.com/shirou/gopsutil v3.21.11+incompatible
github.com/shopspring/decimal v1.3.1
github.com/tklauser/go-sysconf v0.3.10 // indirect
github.com/ufilesdk-dev/ufile-gosdk v1.0.3
github.com/xuri/excelize/v2 v2.6.0
github.com/yusufpapurcu/wmi v1.2.2 // indirect
go.opentelemetry.io/otel/sdk v1.11.2 // indirect
go.uber.org/atomic v1.7.0 // indirect
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect
golang.org/x/net v0.5.0 // indirect
golang.org/x/tools v0.1.12
gopkg.in/yaml.v3 v3.0.1
)
require (
github.com/BurntSushi/toml v1.2.1 // indirect
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible // indirect
github.com/alibabacloud-go/alibabacloud-gateway-spi v0.0.4 // indirect
github.com/alibabacloud-go/debug v0.0.0-20190504072949-9472017b5c68 // indirect
github.com/alibabacloud-go/endpoint-util v1.1.0 // indirect
github.com/alibabacloud-go/openapi-util v0.1.0 // indirect
github.com/alibabacloud-go/tea-utils v1.3.1 // indirect
github.com/alibabacloud-go/tea-xml v1.1.2 // indirect
github.com/aliyun/credentials-go v1.1.2 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/clbanning/mxj/v2 v2.5.7 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/eapache/go-resiliency v1.2.0 // indirect
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 // indirect
github.com/eapache/queue v1.1.0 // indirect
github.com/emirpasic/gods v1.12.0 // indirect
github.com/fatih/color v1.14.1 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-redis/redis/v8 v8.11.5 // indirect
github.com/go-sql-driver/mysql v1.7.0 // indirect
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
github.com/golang/mock v1.6.0 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/btree v1.1.2 // indirect
github.com/grokify/html-strip-tags-go v0.0.1 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-uuid v1.0.2 // indirect
github.com/jcmturner/aescts/v2 v2.0.0 // indirect
github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect
github.com/jcmturner/gofork v1.0.0 // indirect
github.com/jcmturner/gokrb5/v8 v8.4.2 // indirect
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.15.6 // 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.17 // indirect
github.com/mattn/go-runewidth v0.0.14 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/pierrec/lz4/v4 v4.1.14 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/richardlehane/mscfb v1.0.4 // indirect
github.com/richardlehane/msoleps v1.0.1 // indirect
github.com/rivo/uniseg v0.4.3 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/tidwall/gjson v1.2.1 // indirect
github.com/tidwall/match v1.0.1 // indirect
github.com/tidwall/pretty v0.0.0-20190325153808-1166b9ac2b65 // indirect
github.com/tjfoc/gmsm v1.3.2 // indirect
github.com/tklauser/go-sysconf v0.3.10 // indirect
github.com/tklauser/numcpus v0.4.0 // indirect
github.com/xuri/efp v0.0.0-20220407160117-ad0f7a785be8 // indirect
github.com/xuri/nfp v0.0.0-20220409054826-5e722a1d9e22 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect
go.opentelemetry.io/otel v1.13.0 // indirect
go.opentelemetry.io/otel/sdk v1.13.0 // indirect
go.opentelemetry.io/otel/trace v1.13.0 // indirect
go.uber.org/atomic v1.7.0 // indirect
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect
golang.org/x/image v0.0.0-20211028202545-6944b10bf410 // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
gopkg.in/ini.v1 v1.56.0 // indirect
stathat.com/c/consistent v1.0.0 // indirect
)

View File

@@ -161,13 +161,13 @@ github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ
github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.3.1 h1:uSZtDmlTFS51A98KPgZElPigSGDi7PPDN6mxeIXtsLo=
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.3.1/go.mod h1:z+/0qiOwMroAnj5ESuobTv0l5P83rf+XR3r6Fj8WJyk=
github.com/gogf/gf/contrib/nosql/redis/v2 v2.3.1 h1:0pt3KCUtVtBPC6m/6natIeBKBYAQUcfSqy5IR58ogLo=
github.com/gogf/gf/contrib/nosql/redis/v2 v2.3.1/go.mod h1:V9o2BF9ovJnaZhHImHAanqUgjX4kI51lgU45u5rPqvw=
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.3.2 h1:BZww6QOFgiN/YvovUtN64sgnq59TIg8vtkG8AL6eSl0=
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.3.2/go.mod h1:z+/0qiOwMroAnj5ESuobTv0l5P83rf+XR3r6Fj8WJyk=
github.com/gogf/gf/contrib/nosql/redis/v2 v2.3.2 h1:AsYganxtge0nz7eYDYdvGH6E2pRe5IuK45/OLHIFrj8=
github.com/gogf/gf/contrib/nosql/redis/v2 v2.3.2/go.mod h1:V9o2BF9ovJnaZhHImHAanqUgjX4kI51lgU45u5rPqvw=
github.com/gogf/gf/v2 v2.0.0/go.mod h1:apktt6TleWtCIwpz63vBqUnw8MX8gWKoZyxgDpXFtgM=
github.com/gogf/gf/v2 v2.3.1 h1:uptCJK47N6KSRwTBnFAqBWYnYa/OXBkZ0OlhO9CK7bQ=
github.com/gogf/gf/v2 v2.3.1/go.mod h1:tsbmtwcAl2chcYoq/fP9W2FZf06aw4i89X34nbSHo9Y=
github.com/gogf/gf/v2 v2.3.2 h1:nlJ0zuDWqFb93/faZmr7V+GADx/lzz5Unz/9x6OJ2u8=
github.com/gogf/gf/v2 v2.3.2/go.mod h1:tsbmtwcAl2chcYoq/fP9W2FZf06aw4i89X34nbSHo9Y=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
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=
@@ -199,7 +199,6 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
@@ -221,7 +220,6 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
@@ -240,9 +238,7 @@ github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORR
github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 h1:l5lAOZEym3oK3SQ2HBHWsJUfbNBiTXJDeW2QDxw9AQ0=
github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ=
github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4=
github.com/gorilla/sessions v1.2.1 h1:DHd3rPN5lE3Ts3D8rKkQ8x/0kqfeNmBAaiSi+o7FsgI=
github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM=
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
@@ -340,7 +336,6 @@ github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
github.com/onsi/ginkgo/v2 v2.0.0 h1:CcuG/HvWNkkaqCUpJifQY8z7qEMBJya6aLPx6ftGyjQ=
github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
@@ -407,8 +402,6 @@ github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
@@ -416,9 +409,7 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/tidwall/gjson v1.2.1 h1:j0efZLrZUvNerEf6xqoi0NjWMK5YlLrR7Guo/dxY174=
github.com/tidwall/gjson v1.2.1/go.mod h1:c/nTNbUr0E0OrXEhq1pwa8iEgc2DOt4ZZqAt1HtCkPA=
github.com/tidwall/match v1.0.1 h1:PnKP62LPNxHKTwvHHZZzdOAOCtsJTjo6dZLCwpKm5xc=
@@ -450,7 +441,6 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg=
github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
@@ -460,16 +450,16 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opentelemetry.io/otel v1.0.0/go.mod h1:AjRVh9A5/5DE7S+mZtTR6t8vpKKryam+0lREnfmS4cg=
go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk=
go.opentelemetry.io/otel v1.11.2 h1:YBZcQlsVekzFsFbjygXMOXSs6pialIZxcjfO/mBDmR0=
go.opentelemetry.io/otel v1.11.2/go.mod h1:7p4EUV+AqgdlNV9gL97IgUZiVR3yrFXYo53f9BM3tRI=
go.opentelemetry.io/otel v1.13.0 h1:1ZAKnNQKwBBxFtww/GwxNUyTf0AxkZzrukO8MeXqe4Y=
go.opentelemetry.io/otel v1.13.0/go.mod h1:FH3RtdZCzRkJYFTCsAKDy9l/XYjMdNv6QrkFFB8DvVg=
go.opentelemetry.io/otel/sdk v1.0.0/go.mod h1:PCrDHlSy5x1kjezSdL37PhbFUMjrsLRshJ2zCzeXwbM=
go.opentelemetry.io/otel/sdk v1.7.0/go.mod h1:uTEOTwaqIVuTGiJN7ii13Ibp75wJmYUDe374q6cZwUU=
go.opentelemetry.io/otel/sdk v1.11.2 h1:GF4JoaEx7iihdMFu30sOyRx52HDHOkl9xQ8SMqNXUiU=
go.opentelemetry.io/otel/sdk v1.11.2/go.mod h1:wZ1WxImwpq+lVRo4vsmSOxdd+xwoUJ6rqyLc3SyX9aU=
go.opentelemetry.io/otel/sdk v1.13.0 h1:BHib5g8MvdqS65yo2vV1s6Le42Hm6rrw08qU6yz5JaM=
go.opentelemetry.io/otel/sdk v1.13.0/go.mod h1:YLKPx5+6Vx/o1TCUYYs+bpymtkmazOMT6zoRrC7AQ7I=
go.opentelemetry.io/otel/trace v1.0.0/go.mod h1:PXTWqayeFUlJV1YDNhsJYB184+IvAH814St6o6ajzIs=
go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48yyE4TNvoHqU=
go.opentelemetry.io/otel/trace v1.11.2 h1:Xf7hWSF2Glv0DE3MH7fBHvtpSBsjcBUe5MYAmZM/+y0=
go.opentelemetry.io/otel/trace v1.11.2/go.mod h1:4N+yC7QEz7TTsG9BSRLNAa63eg5E06ObSbKPmxQ/pKA=
go.opentelemetry.io/otel/trace v1.13.0 h1:CBgRZ6ntv+Amuj1jDsMhZtlAPT6gbyIRdaIzFhfBSdY=
go.opentelemetry.io/otel/trace v1.13.0/go.mod h1:muCvmmO9KKpvuXSf3KKAXXB2ygNYHQ+ZfI5X08d3tds=
go.uber.org/atomic v1.5.1/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
@@ -482,7 +472,6 @@ golang.org/x/crypto v0.0.0-20191219195013-becbf705a915/go.mod h1:LzIPMQfyMNhhGPh
golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220408190544-5352b0902921/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 h1:kUhD7nTDoI3fVd9G4ORWrbV5NY0liEs/Jg2pv5f+bBA=
@@ -554,7 +543,6 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
@@ -563,9 +551,8 @@ golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qx
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220407224826-aac1ed45d8e3/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.5.0 h1:GyT4nK/YDHSqa1c4753ouYCDajOYKTja9Xb/OHtgvSw=
golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws=
golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -583,7 +570,6 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -639,17 +625,12 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
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.0.0-20220919091848-fb04ddd9f9c8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18=
golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -658,8 +639,8 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2/go.mod h1:EFNZuWvGYxIRUEX+K8UmCFwYmZjqcrnq15ZuVldZkZ0=
golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k=
golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@@ -789,7 +770,6 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD
google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=

View File

@@ -3,14 +3,14 @@
gfcli:
build:
name: "hotgo"
arch: "amd64"
system: "linux"
# arch: "all" #amd64
# system: "all" #linux
mod: "none"
cgo: 0
packSrc: "resource"
packDst: "internal/packed/packed.go"
version: ""
output: "./bin"
output: "./temp/hotgo"
extra: ""
# gf生成代码如果你想调整hotgo中代码生成的相关daoservice代码同样也受用于此配置
@@ -20,12 +20,13 @@ gfcli:
group: "default" # 分组使用hotgo代码生成功能时必须填
# path: "./app"
# tables: "" #指定当前数据库中需要执行代码生成的数据表如果为空表示数据库的所有表都会生成
# tablesEx: "" #指定当前数据库中需要排除代码生成的数据表
tablesEx: "hg_sys_addons_install" #指定当前数据库中需要排除代码生成的数据表
removePrefix: "hg_"
descriptionTag: true
noModelComment: true
jsonCase: "CamelLower"
gJsonSupport: true
clear: true
# service: # 生成业务配置
# srcFolder: "internal/logic"

View File

@@ -1,6 +1,6 @@
// Package cmd
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
@@ -41,7 +41,7 @@ var (
---------------------------------------------------------------------------------
更多
github地址https://github.com/bufanyun/hotgo
文档地址:文档正在书写中,请耐心等一等。
文档地址:https://github.com/bufanyun/hotgo/tree/v2.0/docs
HotGo框架交流1群190966648
`,
}

View File

@@ -1,6 +1,6 @@
// Package cmd
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//

View File

@@ -1,9 +1,8 @@
// Package cmd
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package cmd
import (
@@ -11,6 +10,7 @@ import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/os/gcmd"
"hotgo/internal/library/addons"
"hotgo/internal/library/casbin"
"hotgo/internal/router"
"hotgo/internal/service"
@@ -36,8 +36,7 @@ var (
})
// 请求结束事件回调
s.BindHookHandler("/*any", ghttp.HookAfterOutput, service.Hook().AccessLog)
s.BindHookHandler("/*any", ghttp.HookAfterOutput, service.Hook().LastActive)
s.BindHookHandler("/*any", ghttp.HookAfterOutput, service.Hook().AfterOutput)
s.Group("/", func(group *ghttp.RouterGroup) {
@@ -61,6 +60,9 @@ var (
// 注册前台页面路由
router.Home(ctx, group)
// 注册插件路由
addons.RegisterModulesRouter(ctx, group)
})
// 启动定时任务

View File

@@ -1,6 +1,6 @@
// Package cmd
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//

View File

@@ -1,6 +1,6 @@
// Package cmd
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//

View File

@@ -0,0 +1,51 @@
package consts
const (
AddonsTag = "addons_" // 插件标签前缀
AddonsDir = "addons" // 插件路径
)
const (
AddonsGroupPlug = 1 // 功能扩展
AddonsGroupBusiness = 2 // 主要业务
AddonsGroupThirdParty = 3 // 第三方插件
AddonsGroupMiniApp = 4 // 小程序
AddonsGroupCustomer = 5 // 客户关系
AddonsGroupActivity = 6 // 营销及活动
AddonsGroupServices = 7 // 常用服务及工具
AddonsGroupBiz = 8 // 行业解决方案
)
var AddonsGroupNameMap = map[int]string{
AddonsGroupPlug: "功能扩展",
AddonsGroupBusiness: "主要业务",
AddonsGroupThirdParty: "第三方插件",
AddonsGroupMiniApp: "小程序",
AddonsGroupCustomer: "客户关系",
AddonsGroupActivity: "营销及活动",
AddonsGroupServices: "常用服务及工具",
AddonsGroupBiz: "行业解决方案",
}
var AddonsGroupIconMap = map[int]string{
AddonsGroupPlug: "AppstoreAddOutlined",
AddonsGroupBusiness: "FireOutlined",
AddonsGroupThirdParty: "ApiOutlined",
AddonsGroupMiniApp: "RocketOutlined",
AddonsGroupCustomer: "UserSwitchOutlined",
AddonsGroupActivity: "TagOutlined",
AddonsGroupServices: "ToolOutlined",
AddonsGroupBiz: "CheckCircleOutlined",
}
const (
AddonsInstallStatusOk = 1 // 已安装
AddonsInstallStatusNo = 2 // 未安装
AddonsInstallStatusUn = 3 // 已卸载
)
var AddonsInstallStatusNameMap = map[int]string{
AddonsInstallStatusOk: "已安装",
AddonsInstallStatusNo: "未安装",
AddonsInstallStatusUn: "已卸载",
}

View File

@@ -1,14 +1,15 @@
// Package consts
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package consts
// 应用类型
const (
AppAdmin = "admin"
AppApi = "api"
AppDefault = "default"
AppAdmin = "admin"
AppApi = "api"
AppHome = "home"
AppWebSocket = "websocket"
AppDefault = "default"
)

View File

@@ -1,13 +1,12 @@
// Package consts
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package consts
// redis
// cache
const (
RedisJwtToken = "jwtToken:" // JWT-token
RedisJwtUserBind = "jwtUserBind:" // JWT-用户身份绑定
CacheJwtToken = "jwt_token:" // JWT-token
CacheJwtUserBind = "jwt_user_bind:" // JWT-用户身份绑定
)

View File

@@ -1,6 +1,6 @@
// Package consts
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//

View File

@@ -1,6 +1,6 @@
// Package consts
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//

View File

@@ -1,6 +1,6 @@
// Package consts
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//

View File

@@ -1,6 +1,6 @@
// Package consts
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//

View File

@@ -1,6 +1,6 @@
// Package consts
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//

View File

@@ -1,6 +1,6 @@
// Package consts
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//

View File

@@ -1,6 +1,6 @@
// Package consts
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//

View File

@@ -1,6 +1,6 @@
// Package consts
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//

View File

@@ -1,6 +1,6 @@
// Package consts
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//

View File

@@ -1,6 +1,6 @@
// Package consts
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//

View File

@@ -1,12 +1,11 @@
// Package consts
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package consts
// VersionApp HotGo版本
const (
VersionApp = "2.1.3"
VersionApp = "2.2.10"
)

View File

@@ -1,6 +1,6 @@
// Package admin
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
@@ -9,7 +9,7 @@ package admin
import (
"context"
"github.com/gogf/gf/v2/util/gconv"
"hotgo/api/backend/dept"
"hotgo/api/admin/dept"
"hotgo/internal/model/input/adminin"
"hotgo/internal/service"
)

View File

@@ -1,6 +1,6 @@
// Package admin
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
@@ -10,7 +10,7 @@ import (
"context"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/util/gconv"
"hotgo/api/backend/member"
"hotgo/api/admin/member"
"hotgo/internal/library/contexts"
"hotgo/internal/model/input/adminin"
"hotgo/internal/model/input/form"

View File

@@ -1,6 +1,6 @@
// Package admin
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
@@ -9,7 +9,7 @@ package admin
import (
"context"
"github.com/gogf/gf/v2/util/gconv"
"hotgo/api/backend/menu"
"hotgo/api/admin/menu"
"hotgo/internal/model/input/adminin"
"hotgo/internal/service"
)

View File

@@ -1,6 +1,6 @@
// Package admin
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
@@ -11,7 +11,7 @@ import (
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/text/gstr"
"hotgo/api/backend/monitor"
"hotgo/api/admin/monitor"
"hotgo/internal/consts"
"hotgo/internal/model/input/form"
"hotgo/internal/websocket"

View File

@@ -1,6 +1,6 @@
// Package admin
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
@@ -9,7 +9,7 @@ package admin
import (
"context"
"github.com/gogf/gf/v2/util/gconv"
"hotgo/api/backend/notice"
"hotgo/api/admin/notice"
"hotgo/internal/consts"
"hotgo/internal/model/input/adminin"
"hotgo/internal/model/input/form"

View File

@@ -1,6 +1,6 @@
// Package admin
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
@@ -9,7 +9,7 @@ package admin
import (
"context"
"github.com/gogf/gf/v2/util/gconv"
"hotgo/api/backend/post"
"hotgo/api/admin/post"
"hotgo/internal/model/input/adminin"
"hotgo/internal/model/input/form"
"hotgo/internal/service"

View File

@@ -1,6 +1,6 @@
// Package admin
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
@@ -9,7 +9,7 @@ package admin
import (
"context"
"github.com/gogf/gf/v2/util/gconv"
"hotgo/api/backend/role"
"hotgo/api/admin/role"
"hotgo/internal/library/contexts"
"hotgo/internal/model/input/adminin"
"hotgo/internal/model/input/form"

Some files were not shown because too many files have changed in this diff Show More