mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-08-28 05:48:35 +08:00
发布v2.2.10版本,更新内容请查看:https://github.com/bufanyun/hotgo/tree/v2.0/docs/guide-zh-CN/addon-version-upgrade.md
This commit is contained in:
28
server/addons/hgexample/api/admin/config/config.go
Normal file
28
server/addons/hgexample/api/admin/config/config.go
Normal 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 {
|
||||
}
|
22
server/addons/hgexample/api/admin/index/index.go
Normal file
22
server/addons/hgexample/api/admin/index/index.go
Normal 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
|
||||
}
|
77
server/addons/hgexample/api/admin/table/table.go
Normal file
77
server/addons/hgexample/api/admin/table/table.go
Normal 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{}
|
22
server/addons/hgexample/api/api/index/index.go
Normal file
22
server/addons/hgexample/api/api/index/index.go
Normal 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
|
||||
}
|
22
server/addons/hgexample/api/home/index/index.go
Normal file
22
server/addons/hgexample/api/home/index/index.go
Normal 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/>"`
|
||||
}
|
22
server/addons/hgexample/api/websocket/index/index.go
Normal file
22
server/addons/hgexample/api/websocket/index/index.go
Normal 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
|
||||
}
|
Reference in New Issue
Block a user