im 管理后台
This commit is contained in:
@@ -0,0 +1,404 @@
|
||||
// ================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// You can delete these comments if you wish manually maintain this interface file.
|
||||
// ================================================================================
|
||||
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"hotgo/api/admin/role"
|
||||
"hotgo/internal/library/hgorm/handler"
|
||||
"hotgo/internal/model"
|
||||
"hotgo/internal/model/entity"
|
||||
"hotgo/internal/model/input/adminin"
|
||||
"hotgo/internal/model/input/form"
|
||||
"hotgo/internal/model/input/payin"
|
||||
"hotgo/utility/tree"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/database/gredis"
|
||||
)
|
||||
|
||||
type (
|
||||
IAdminCash interface {
|
||||
// View 获取指定提现信息
|
||||
View(ctx context.Context, in *adminin.CashViewInp) (res *adminin.CashViewModel, err error)
|
||||
// List 获取列表
|
||||
List(ctx context.Context, in *adminin.CashListInp) (list []*adminin.CashListModel, totalCount int, err error)
|
||||
// Apply 申请提现
|
||||
Apply(ctx context.Context, in *adminin.CashApplyInp) (err error)
|
||||
// Payment 提现打款处理
|
||||
Payment(ctx context.Context, in *adminin.CashPaymentInp) (err error)
|
||||
}
|
||||
IAdminCreditsLog interface {
|
||||
// Model 资产变动ORM模型
|
||||
Model(ctx context.Context, option ...*handler.Option) *gdb.Model
|
||||
// SaveBalance 更新余额
|
||||
SaveBalance(ctx context.Context, in *adminin.CreditsLogSaveBalanceInp) (res *adminin.CreditsLogSaveBalanceModel, err error)
|
||||
// SaveIntegral 更新积分
|
||||
SaveIntegral(ctx context.Context, in *adminin.CreditsLogSaveIntegralInp) (res *adminin.CreditsLogSaveIntegralModel, err error)
|
||||
// List 获取资产变动列表
|
||||
List(ctx context.Context, in *adminin.CreditsLogListInp) (list []*adminin.CreditsLogListModel, totalCount int, err error)
|
||||
// Export 导出资产变动
|
||||
Export(ctx context.Context, in *adminin.CreditsLogListInp) (err error)
|
||||
}
|
||||
IAdminDept interface {
|
||||
// Model 部门ORM模型
|
||||
Model(ctx context.Context, option ...*handler.Option) *gdb.Model
|
||||
// Delete 删除
|
||||
Delete(ctx context.Context, in *adminin.DeptDeleteInp) (err error)
|
||||
// VerifyUnique 验证部门唯一属性
|
||||
VerifyUnique(ctx context.Context, in *adminin.VerifyUniqueInp) (err error)
|
||||
// Edit 修改/新增
|
||||
Edit(ctx context.Context, in *adminin.DeptEditInp) (err error)
|
||||
// MaxSort 最大排序
|
||||
MaxSort(ctx context.Context, in *adminin.DeptMaxSortInp) (res *adminin.DeptMaxSortModel, err error)
|
||||
// View 获取指定部门信息
|
||||
View(ctx context.Context, in *adminin.DeptViewInp) (res *adminin.DeptViewModel, err error)
|
||||
// List 获取列表
|
||||
List(ctx context.Context, in *adminin.DeptListInp) (res *adminin.DeptListModel, err error)
|
||||
// GetName 获取部门名称
|
||||
GetName(ctx context.Context, id int64) (name string, err error)
|
||||
// VerifyDeptId 验证部门ID
|
||||
VerifyDeptId(ctx context.Context, id int64) (err error)
|
||||
// Option 获取当前登录用户可选的部门选项
|
||||
Option(ctx context.Context, in *adminin.DeptOptionInp) (res *adminin.DeptOptionModel, totalCount int, err error)
|
||||
// TreeOption 获取部门关系树选项
|
||||
TreeOption(ctx context.Context) (nodes []tree.Node, err error)
|
||||
}
|
||||
IAdminMember interface {
|
||||
// AddBalance 增加余额
|
||||
AddBalance(ctx context.Context, in *adminin.MemberAddBalanceInp) (err error)
|
||||
// AddIntegral 增加积分
|
||||
AddIntegral(ctx context.Context, in *adminin.MemberAddIntegralInp) (err error)
|
||||
// UpdateCash 修改提现信息
|
||||
UpdateCash(ctx context.Context, in *adminin.MemberUpdateCashInp) (err error)
|
||||
// UpdateEmail 换绑邮箱
|
||||
UpdateEmail(ctx context.Context, in *adminin.MemberUpdateEmailInp) (err error)
|
||||
// UpdateMobile 换绑手机号
|
||||
UpdateMobile(ctx context.Context, in *adminin.MemberUpdateMobileInp) (err error)
|
||||
// UpdateProfile 更新用户资料
|
||||
UpdateProfile(ctx context.Context, in *adminin.MemberUpdateProfileInp) (err error)
|
||||
// UpdatePwd 修改登录密码
|
||||
UpdatePwd(ctx context.Context, in *adminin.MemberUpdatePwdInp) (err error)
|
||||
// ResetPwd 重置密码
|
||||
ResetPwd(ctx context.Context, in *adminin.MemberResetPwdInp) (err error)
|
||||
// VerifyUnique 验证管理员唯一属性
|
||||
VerifyUnique(ctx context.Context, in *adminin.VerifyUniqueInp) (err error)
|
||||
// Delete 删除用户
|
||||
Delete(ctx context.Context, in *adminin.MemberDeleteInp) (err error)
|
||||
// Edit 修改/新增用户
|
||||
Edit(ctx context.Context, in *adminin.MemberEditInp) (err error)
|
||||
// View 获取用户信息
|
||||
View(ctx context.Context, in *adminin.MemberViewInp) (res *adminin.MemberViewModel, err error)
|
||||
// List 获取用户列表
|
||||
List(ctx context.Context, in *adminin.MemberListInp) (list []*adminin.MemberListModel, totalCount int, err error)
|
||||
// Status 更新状态
|
||||
Status(ctx context.Context, in *adminin.MemberStatusInp) (err error)
|
||||
// GenTree 生成关系树
|
||||
GenTree(ctx context.Context, pid int64) (level int, newTree string, err error)
|
||||
// LoginMemberInfo 获取登录用户信息
|
||||
LoginMemberInfo(ctx context.Context) (res *adminin.LoginMemberInfoModel, err error)
|
||||
// MemberLoginStat 用户登录统计
|
||||
MemberLoginStat(ctx context.Context, in *adminin.MemberLoginStatInp) (res *adminin.MemberLoginStatModel, err error)
|
||||
// GetIdByCode 通过邀请码获取用户ID
|
||||
GetIdByCode(ctx context.Context, in *adminin.GetIdByCodeInp) (res *adminin.GetIdByCodeModel, err error)
|
||||
// Select 获取可选的用户选项
|
||||
Select(ctx context.Context, in *adminin.MemberSelectInp) (res []*adminin.MemberSelectModel, err error)
|
||||
// GetLowerIds 获取指定用户的所有下级ID集合
|
||||
GetLowerIds(ctx context.Context, memberId int64) (ids []int64, err error)
|
||||
// GetComplexMemberIds 组合查找符合条件的用户ID
|
||||
GetComplexMemberIds(ctx context.Context, memberIdx string, opt string) (ids []int64, err error)
|
||||
// GetIdsByKeyword 根据关键词查找符合条件的用户ID
|
||||
GetIdsByKeyword(ctx context.Context, ks string) (res []int64, err error)
|
||||
// VerifySuperId 验证是否为超管
|
||||
VerifySuperId(ctx context.Context, verifyId int64) bool
|
||||
// LoadSuperAdmin 加载超管数据
|
||||
LoadSuperAdmin(ctx context.Context)
|
||||
// ClusterSyncSuperAdmin 集群同步
|
||||
ClusterSyncSuperAdmin(ctx context.Context, message *gredis.Message)
|
||||
// FilterAuthModel 过滤用户操作权限
|
||||
// 非超管用户只能操作自己的下级角色用户,并且需要满足自身角色的数据权限设置
|
||||
FilterAuthModel(ctx context.Context, memberId int64) *gdb.Model
|
||||
}
|
||||
IAdminMemberPost interface {
|
||||
// UpdatePostIds 更新用户岗位
|
||||
UpdatePostIds(ctx context.Context, memberId int64, postIds []int64) (err error)
|
||||
}
|
||||
IAdminMenu interface {
|
||||
// Model Orm模型
|
||||
Model(ctx context.Context, option ...*handler.Option) *gdb.Model
|
||||
// Delete 删除
|
||||
Delete(ctx context.Context, in *adminin.MenuDeleteInp) (err error)
|
||||
// VerifyUnique 验证菜单唯一属性
|
||||
VerifyUnique(ctx context.Context, in *adminin.VerifyUniqueInp) (err error)
|
||||
// Edit 修改/新增
|
||||
Edit(ctx context.Context, in *adminin.MenuEditInp) (err error)
|
||||
// List 获取菜单列表
|
||||
List(ctx context.Context, in *adminin.MenuListInp) (res *adminin.MenuListModel, err error)
|
||||
// GetMenuList 获取菜单列表
|
||||
GetMenuList(ctx context.Context, memberId int64) (res *role.DynamicRes, err error)
|
||||
// LoginPermissions 获取登录成功后的细粒度权限
|
||||
LoginPermissions(ctx context.Context, memberId int64) (lists adminin.MemberLoginPermissions, err error)
|
||||
// GetFastList 获取菜单列表
|
||||
GetFastList(ctx context.Context) (res map[int64]*entity.AdminMenu, err error)
|
||||
}
|
||||
IAdminMonitor interface {
|
||||
// StartMonitor 启动服务监控
|
||||
StartMonitor(ctx context.Context)
|
||||
// GetMeta 获取监控元数据
|
||||
GetMeta(ctx context.Context) *model.MonitorData
|
||||
}
|
||||
IAdminNotice interface {
|
||||
// Model Orm模型
|
||||
Model(ctx context.Context, option ...*handler.Option) *gdb.Model
|
||||
// Delete 删除
|
||||
Delete(ctx context.Context, in *adminin.NoticeDeleteInp) (err error)
|
||||
// Edit 修改/新增
|
||||
Edit(ctx context.Context, in *adminin.NoticeEditInp) (err error)
|
||||
// Status 更新部门状态
|
||||
Status(ctx context.Context, in *adminin.NoticeStatusInp) (err error)
|
||||
// MaxSort 最大排序
|
||||
MaxSort(ctx context.Context, in *adminin.NoticeMaxSortInp) (res *adminin.NoticeMaxSortModel, err error)
|
||||
// View 获取指定字典类型信息
|
||||
View(ctx context.Context, in *adminin.NoticeViewInp) (res *adminin.NoticeViewModel, err error)
|
||||
// api列表 不需要登陆
|
||||
ApiList(ctx context.Context, in *adminin.NoticeListInp) (list []*adminin.NoticeViewModel, totalCount int, err error)
|
||||
// List 获取列表
|
||||
List(ctx context.Context, in *adminin.NoticeListInp) (list []*adminin.NoticeListModel, totalCount int, err error)
|
||||
// PullMessages 拉取未读消息列表
|
||||
PullMessages(ctx context.Context, in *adminin.PullMessagesInp) (res *adminin.PullMessagesModel, err error)
|
||||
// UnreadCount 获取所有类型消息的未读数量
|
||||
UnreadCount(ctx context.Context, in *adminin.NoticeUnreadCountInp) (res *adminin.NoticeUnreadCountModel, err error)
|
||||
// UpRead 更新已读
|
||||
UpRead(ctx context.Context, in *adminin.NoticeUpReadInp) (err error)
|
||||
// ReadAll 已读全部
|
||||
ReadAll(ctx context.Context, in *adminin.NoticeReadAllInp) (err error)
|
||||
// MessageList 我的消息列表
|
||||
MessageList(ctx context.Context, in *adminin.NoticeMessageListInp) (list []*adminin.NoticeMessageListModel, totalCount int, err error)
|
||||
}
|
||||
IAdminOrder interface {
|
||||
// Model 充值订单ORM模型
|
||||
Model(ctx context.Context, option ...*handler.Option) *gdb.Model
|
||||
// AcceptRefund 受理申请退款
|
||||
AcceptRefund(ctx context.Context, in *adminin.OrderAcceptRefundInp) (err error)
|
||||
// ApplyRefund 申请退款
|
||||
ApplyRefund(ctx context.Context, in *adminin.OrderApplyRefundInp) (err error)
|
||||
// PayNotify 支付成功通知
|
||||
PayNotify(ctx context.Context, in *payin.NotifyCallFuncInp) (err error)
|
||||
// Create 创建充值订单
|
||||
Create(ctx context.Context, in *adminin.OrderCreateInp) (res *adminin.OrderCreateModel, err error)
|
||||
// List 获取充值订单列表
|
||||
List(ctx context.Context, in *adminin.OrderListInp) (list []*adminin.OrderListModel, totalCount int, err error)
|
||||
// Export 导出充值订单
|
||||
Export(ctx context.Context, in *adminin.OrderListInp) (err error)
|
||||
// Edit 修改/新增充值订单
|
||||
Edit(ctx context.Context, in *adminin.OrderEditInp) (err error)
|
||||
// Delete 删除充值订单
|
||||
Delete(ctx context.Context, in *adminin.OrderDeleteInp) (err error)
|
||||
// View 获取充值订单指定信息
|
||||
View(ctx context.Context, in *adminin.OrderViewInp) (res *adminin.OrderViewModel, err error)
|
||||
// Status 更新充值订单状态
|
||||
Status(ctx context.Context, in *adminin.OrderStatusInp) (err error)
|
||||
}
|
||||
IAdminPost interface {
|
||||
// Delete 删除
|
||||
Delete(ctx context.Context, in *adminin.PostDeleteInp) (err error)
|
||||
// VerifyUnique 验证部门唯一属性
|
||||
VerifyUnique(ctx context.Context, in *adminin.VerifyUniqueInp) (err error)
|
||||
// Edit 修改/新增
|
||||
Edit(ctx context.Context, in *adminin.PostEditInp) (err error)
|
||||
// MaxSort 最大排序
|
||||
MaxSort(ctx context.Context, in *adminin.PostMaxSortInp) (res *adminin.PostMaxSortModel, err error)
|
||||
// View 获取指定岗位信息
|
||||
View(ctx context.Context, in *adminin.PostViewInp) (res *adminin.PostViewModel, err error)
|
||||
// List 获取列表
|
||||
List(ctx context.Context, in *adminin.PostListInp) (list []*adminin.PostListModel, totalCount int, err error)
|
||||
// Option 岗位选项
|
||||
Option(ctx context.Context) (opts []*model.Option, err error)
|
||||
// GetMemberByStartName 获取指定用户的第一岗位
|
||||
GetMemberByStartName(ctx context.Context, memberId int64) (name string, err error)
|
||||
// Status 更新状态
|
||||
Status(ctx context.Context, in *adminin.PostStatusInp) (err error)
|
||||
}
|
||||
IAdminRole interface {
|
||||
// Verify 验证权限
|
||||
Verify(ctx context.Context, path string, method string) bool
|
||||
// List 获取列表
|
||||
List(ctx context.Context, in *adminin.RoleListInp) (res *adminin.RoleListModel, totalCount int, err error)
|
||||
// GetName 获取指定角色的名称
|
||||
GetName(ctx context.Context, id int64) (name string, err error)
|
||||
// GetMemberList 获取指定用户的岗位列表
|
||||
GetMemberList(ctx context.Context, id int64) (list []*adminin.RoleListModel, err error)
|
||||
// GetPermissions 更改角色菜单权限
|
||||
GetPermissions(ctx context.Context, in *adminin.GetPermissionsInp) (res *adminin.GetPermissionsModel, err error)
|
||||
// UpdatePermissions 更改角色菜单权限
|
||||
UpdatePermissions(ctx context.Context, in *adminin.UpdatePermissionsInp) (err error)
|
||||
Edit(ctx context.Context, in *adminin.RoleEditInp) (err error)
|
||||
Delete(ctx context.Context, in *adminin.RoleDeleteInp) (err error)
|
||||
DataScopeSelect() (res form.Selects)
|
||||
DataScopeEdit(ctx context.Context, in *adminin.DataScopeEditInp) (err error)
|
||||
// VerifyRoleId 验证角色ID
|
||||
VerifyRoleId(ctx context.Context, id int64) (err error)
|
||||
// GetSubRoleIds 获取所有下级角色ID
|
||||
GetSubRoleIds(ctx context.Context, roleId int64, isSuper bool) (ids []int64, err error)
|
||||
}
|
||||
IAdminSite interface {
|
||||
// Register 账号注册
|
||||
Register(ctx context.Context, in *adminin.RegisterInp) (err error)
|
||||
// AccountLogin 账号登录
|
||||
AccountLogin(ctx context.Context, in *adminin.AccountLoginInp) (res *adminin.LoginModel, err error)
|
||||
// MobileLogin 手机号登录
|
||||
MobileLogin(ctx context.Context, in *adminin.MobileLoginInp) (res *adminin.LoginModel, err error)
|
||||
// BindUserContext 绑定用户上下文
|
||||
BindUserContext(ctx context.Context, claims *model.Identity) (err error)
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
localAdminCash IAdminCash
|
||||
localAdminCreditsLog IAdminCreditsLog
|
||||
localAdminDept IAdminDept
|
||||
localAdminMember IAdminMember
|
||||
localAdminMemberPost IAdminMemberPost
|
||||
localAdminMenu IAdminMenu
|
||||
localAdminMonitor IAdminMonitor
|
||||
localAdminNotice IAdminNotice
|
||||
localAdminOrder IAdminOrder
|
||||
localAdminPost IAdminPost
|
||||
localAdminRole IAdminRole
|
||||
localAdminSite IAdminSite
|
||||
)
|
||||
|
||||
func AdminCash() IAdminCash {
|
||||
if localAdminCash == nil {
|
||||
panic("implement not found for interface IAdminCash, forgot register?")
|
||||
}
|
||||
return localAdminCash
|
||||
}
|
||||
|
||||
func RegisterAdminCash(i IAdminCash) {
|
||||
localAdminCash = i
|
||||
}
|
||||
|
||||
func AdminCreditsLog() IAdminCreditsLog {
|
||||
if localAdminCreditsLog == nil {
|
||||
panic("implement not found for interface IAdminCreditsLog, forgot register?")
|
||||
}
|
||||
return localAdminCreditsLog
|
||||
}
|
||||
|
||||
func RegisterAdminCreditsLog(i IAdminCreditsLog) {
|
||||
localAdminCreditsLog = i
|
||||
}
|
||||
|
||||
func AdminDept() IAdminDept {
|
||||
if localAdminDept == nil {
|
||||
panic("implement not found for interface IAdminDept, forgot register?")
|
||||
}
|
||||
return localAdminDept
|
||||
}
|
||||
|
||||
func RegisterAdminDept(i IAdminDept) {
|
||||
localAdminDept = i
|
||||
}
|
||||
|
||||
func AdminMember() IAdminMember {
|
||||
if localAdminMember == nil {
|
||||
panic("implement not found for interface IAdminMember, forgot register?")
|
||||
}
|
||||
return localAdminMember
|
||||
}
|
||||
|
||||
func RegisterAdminMember(i IAdminMember) {
|
||||
localAdminMember = i
|
||||
}
|
||||
|
||||
func AdminMemberPost() IAdminMemberPost {
|
||||
if localAdminMemberPost == nil {
|
||||
panic("implement not found for interface IAdminMemberPost, forgot register?")
|
||||
}
|
||||
return localAdminMemberPost
|
||||
}
|
||||
|
||||
func RegisterAdminMemberPost(i IAdminMemberPost) {
|
||||
localAdminMemberPost = i
|
||||
}
|
||||
|
||||
func AdminMenu() IAdminMenu {
|
||||
if localAdminMenu == nil {
|
||||
panic("implement not found for interface IAdminMenu, forgot register?")
|
||||
}
|
||||
return localAdminMenu
|
||||
}
|
||||
|
||||
func RegisterAdminMenu(i IAdminMenu) {
|
||||
localAdminMenu = i
|
||||
}
|
||||
|
||||
func AdminMonitor() IAdminMonitor {
|
||||
if localAdminMonitor == nil {
|
||||
panic("implement not found for interface IAdminMonitor, forgot register?")
|
||||
}
|
||||
return localAdminMonitor
|
||||
}
|
||||
|
||||
func RegisterAdminMonitor(i IAdminMonitor) {
|
||||
localAdminMonitor = i
|
||||
}
|
||||
|
||||
func AdminNotice() IAdminNotice {
|
||||
if localAdminNotice == nil {
|
||||
panic("implement not found for interface IAdminNotice, forgot register?")
|
||||
}
|
||||
return localAdminNotice
|
||||
}
|
||||
|
||||
func RegisterAdminNotice(i IAdminNotice) {
|
||||
localAdminNotice = i
|
||||
}
|
||||
|
||||
func AdminOrder() IAdminOrder {
|
||||
if localAdminOrder == nil {
|
||||
panic("implement not found for interface IAdminOrder, forgot register?")
|
||||
}
|
||||
return localAdminOrder
|
||||
}
|
||||
|
||||
func RegisterAdminOrder(i IAdminOrder) {
|
||||
localAdminOrder = i
|
||||
}
|
||||
|
||||
func AdminPost() IAdminPost {
|
||||
if localAdminPost == nil {
|
||||
panic("implement not found for interface IAdminPost, forgot register?")
|
||||
}
|
||||
return localAdminPost
|
||||
}
|
||||
|
||||
func RegisterAdminPost(i IAdminPost) {
|
||||
localAdminPost = i
|
||||
}
|
||||
|
||||
func AdminRole() IAdminRole {
|
||||
if localAdminRole == nil {
|
||||
panic("implement not found for interface IAdminRole, forgot register?")
|
||||
}
|
||||
return localAdminRole
|
||||
}
|
||||
|
||||
func RegisterAdminRole(i IAdminRole) {
|
||||
localAdminRole = i
|
||||
}
|
||||
|
||||
func AdminSite() IAdminSite {
|
||||
if localAdminSite == nil {
|
||||
panic("implement not found for interface IAdminSite, forgot register?")
|
||||
}
|
||||
return localAdminSite
|
||||
}
|
||||
|
||||
func RegisterAdminSite(i IAdminSite) {
|
||||
localAdminSite = i
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
// ================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// You can delete these comments if you wish manually maintain this interface file.
|
||||
// ================================================================================
|
||||
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"hotgo/internal/model/input/commonin"
|
||||
"hotgo/internal/model/input/sysin"
|
||||
|
||||
"github.com/gogf/gf/v2/net/ghttp"
|
||||
)
|
||||
|
||||
type (
|
||||
ICommonUpload interface {
|
||||
// UploadFile 上传文件
|
||||
UploadFile(ctx context.Context, uploadType string, file *ghttp.UploadFile) (res *sysin.AttachmentListModel, err error)
|
||||
// CheckMultipart 检查文件分片
|
||||
CheckMultipart(ctx context.Context, in *sysin.CheckMultipartInp) (res *sysin.CheckMultipartModel, err error)
|
||||
// UploadPart 上传分片
|
||||
UploadPart(ctx context.Context, in *sysin.UploadPartInp) (res *sysin.UploadPartModel, err error)
|
||||
// ImageTransferStorage 图片链接转存
|
||||
ImageTransferStorage(ctx context.Context, in *sysin.ImageTransferStorageInp) (res *sysin.ImageTransferStorageModel, err error)
|
||||
}
|
||||
ICommonWechat interface {
|
||||
// Authorize 微信用户授权
|
||||
Authorize(ctx context.Context, in *commonin.WechatAuthorizeInp) (res *commonin.WechatAuthorizeModel, err error)
|
||||
AuthorizeCall(ctx context.Context, in *commonin.WechatAuthorizeCallInp) (res *commonin.WechatAuthorizeCallModel, err error)
|
||||
// GetOpenId 从缓存中获取临时openid
|
||||
GetOpenId(ctx context.Context) (openId string, err error)
|
||||
GetCacheKey(typ string, ak string) string
|
||||
// CleanTempMap 清理临时map
|
||||
CleanTempMap(ctx context.Context)
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
localCommonUpload ICommonUpload
|
||||
localCommonWechat ICommonWechat
|
||||
)
|
||||
|
||||
func CommonUpload() ICommonUpload {
|
||||
if localCommonUpload == nil {
|
||||
panic("implement not found for interface ICommonUpload, forgot register?")
|
||||
}
|
||||
return localCommonUpload
|
||||
}
|
||||
|
||||
func RegisterCommonUpload(i ICommonUpload) {
|
||||
localCommonUpload = i
|
||||
}
|
||||
|
||||
func CommonWechat() ICommonWechat {
|
||||
if localCommonWechat == nil {
|
||||
panic("implement not found for interface ICommonWechat, forgot register?")
|
||||
}
|
||||
return localCommonWechat
|
||||
}
|
||||
|
||||
func RegisterCommonWechat(i ICommonWechat) {
|
||||
localCommonWechat = i
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
// ================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// You can delete these comments if you wish manually maintain this interface file.
|
||||
// ================================================================================
|
||||
|
||||
package service
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/net/ghttp"
|
||||
)
|
||||
|
||||
type (
|
||||
IHook interface {
|
||||
BeforeServe(r *ghttp.Request)
|
||||
AfterOutput(r *ghttp.Request)
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
localHook IHook
|
||||
)
|
||||
|
||||
func Hook() IHook {
|
||||
if localHook == nil {
|
||||
panic("implement not found for interface IHook, forgot register?")
|
||||
}
|
||||
return localHook
|
||||
}
|
||||
|
||||
func RegisterHook(i IHook) {
|
||||
localHook = i
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
// ================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// You can delete these comments if you wish manually maintain this interface file.
|
||||
// ================================================================================
|
||||
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/net/ghttp"
|
||||
)
|
||||
|
||||
type (
|
||||
IMiddleware interface {
|
||||
// AdminAuth 后台鉴权中间件
|
||||
AdminAuth(r *ghttp.Request)
|
||||
// ApiAuth API鉴权中间件
|
||||
ApiAuth(r *ghttp.Request)
|
||||
// HomeAuth 前台页面鉴权中间件
|
||||
HomeAuth(r *ghttp.Request)
|
||||
// Ctx 初始化请求上下文
|
||||
Ctx(r *ghttp.Request)
|
||||
// CORS allows Cross-origin resource sharing.
|
||||
CORS(r *ghttp.Request)
|
||||
// DemoLimit 演示系统操作限制
|
||||
DemoLimit(r *ghttp.Request)
|
||||
// Addon 插件中间件
|
||||
Addon(r *ghttp.Request)
|
||||
// DeliverUserContext 将用户信息传递到上下文中
|
||||
DeliverUserContext(r *ghttp.Request) (err error)
|
||||
// IsExceptAuth 是否是不需要验证权限的路由地址
|
||||
IsExceptAuth(ctx context.Context, appName string, path string) bool
|
||||
// IsExceptLogin 是否是不需要登录的路由地址
|
||||
IsExceptLogin(ctx context.Context, appName string, path string) bool
|
||||
// Blacklist IP黑名单限制中间件
|
||||
Blacklist(r *ghttp.Request)
|
||||
// Develop 开发工具白名单过滤
|
||||
Develop(r *ghttp.Request)
|
||||
// PreFilter 请求输入预处理
|
||||
// api使用gf规范路由并且XxxReq结构体实现了validate.Filter接口即可
|
||||
PreFilter(r *ghttp.Request)
|
||||
// ResponseHandler HTTP响应预处理
|
||||
ResponseHandler(r *ghttp.Request)
|
||||
// WebSocketAuth websocket鉴权中间件
|
||||
WebSocketAuth(r *ghttp.Request)
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
localMiddleware IMiddleware
|
||||
)
|
||||
|
||||
func Middleware() IMiddleware {
|
||||
if localMiddleware == nil {
|
||||
panic("implement not found for interface IMiddleware, forgot register?")
|
||||
}
|
||||
return localMiddleware
|
||||
}
|
||||
|
||||
func RegisterMiddleware(i IMiddleware) {
|
||||
localMiddleware = i
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
// ================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// You can delete these comments if you wish manually maintain this interface file.
|
||||
// ================================================================================
|
||||
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"hotgo/internal/library/hgorm/handler"
|
||||
"hotgo/internal/model/input/payin"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
)
|
||||
|
||||
type (
|
||||
IPay interface {
|
||||
// Create 创建支付订单和日志
|
||||
Create(ctx context.Context, in payin.PayCreateInp) (res *payin.PayCreateModel, err error)
|
||||
// GenNotifyURL 生成支付通知地址
|
||||
GenNotifyURL(ctx context.Context, in payin.PayCreateInp) (notifyURL string, err error)
|
||||
// RegisterNotifyCall 注册支付成功回调方法
|
||||
RegisterNotifyCall()
|
||||
// Notify 异步通知
|
||||
Notify(ctx context.Context, in *payin.PayNotifyInp) (res *payin.PayNotifyModel, err error)
|
||||
// Model 支付日志ORM模型
|
||||
Model(ctx context.Context, option ...*handler.Option) *gdb.Model
|
||||
// List 获取支付日志列表
|
||||
List(ctx context.Context, in payin.PayListInp) (list []*payin.PayListModel, totalCount int, err error)
|
||||
// Export 导出支付日志
|
||||
Export(ctx context.Context, in payin.PayListInp) (err error)
|
||||
// Edit 修改/新增支付日志
|
||||
Edit(ctx context.Context, in payin.PayEditInp) (err error)
|
||||
// Delete 删除支付日志
|
||||
Delete(ctx context.Context, in payin.PayDeleteInp) (err error)
|
||||
// View 获取支付日志指定信息
|
||||
View(ctx context.Context, in payin.PayViewInp) (res *payin.PayViewModel, err error)
|
||||
// Status 更新支付日志状态
|
||||
Status(ctx context.Context, in payin.PayStatusInp) (err error)
|
||||
}
|
||||
IPayRefund interface {
|
||||
// Model 交易退款ORM模型
|
||||
Model(ctx context.Context, option ...*handler.Option) *gdb.Model
|
||||
// Refund 订单退款
|
||||
Refund(ctx context.Context, in *payin.PayRefundInp) (res *payin.PayRefundModel, err error)
|
||||
// List 获取交易退款列表
|
||||
List(ctx context.Context, in *payin.PayRefundListInp) (list []*payin.PayRefundListModel, totalCount int, err error)
|
||||
// Export 导出交易退款
|
||||
Export(ctx context.Context, in *payin.PayRefundListInp) (err error)
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
localPay IPay
|
||||
localPayRefund IPayRefund
|
||||
)
|
||||
|
||||
func Pay() IPay {
|
||||
if localPay == nil {
|
||||
panic("implement not found for interface IPay, forgot register?")
|
||||
}
|
||||
return localPay
|
||||
}
|
||||
|
||||
func RegisterPay(i IPay) {
|
||||
localPay = i
|
||||
}
|
||||
|
||||
func PayRefund() IPayRefund {
|
||||
if localPayRefund == nil {
|
||||
panic("implement not found for interface IPayRefund, forgot register?")
|
||||
}
|
||||
return localPayRefund
|
||||
}
|
||||
|
||||
func RegisterPayRefund(i IPayRefund) {
|
||||
localPayRefund = i
|
||||
}
|
||||
@@ -0,0 +1,661 @@
|
||||
// ================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// You can delete these comments if you wish manually maintain this interface file.
|
||||
// ================================================================================
|
||||
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"hotgo/internal/library/hgorm/handler"
|
||||
"hotgo/internal/model"
|
||||
"hotgo/internal/model/entity"
|
||||
"hotgo/internal/model/input/sysin"
|
||||
"hotgo/utility/tree"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/database/gredis"
|
||||
"github.com/gogf/gf/v2/encoding/gjson"
|
||||
"github.com/gogf/gf/v2/net/ghttp"
|
||||
)
|
||||
|
||||
type (
|
||||
ISysAddons interface {
|
||||
// List 获取列表
|
||||
List(ctx context.Context, in *sysin.AddonsListInp) (list []*sysin.AddonsListModel, totalCount int, err error)
|
||||
// Build 提交生成
|
||||
Build(ctx context.Context, in *sysin.AddonsBuildInp) (err error)
|
||||
// Install 安装模块
|
||||
Install(ctx context.Context, in *sysin.AddonsInstallInp) (err error)
|
||||
// Upgrade 更新模块
|
||||
Upgrade(ctx context.Context, in *sysin.AddonsUpgradeInp) (err error)
|
||||
// UnInstall 卸载模块
|
||||
UnInstall(ctx context.Context, in *sysin.AddonsUnInstallInp) (err error)
|
||||
}
|
||||
ISysAddonsConfig interface {
|
||||
// GetConfigByGroup 获取指定分组的配置
|
||||
GetConfigByGroup(ctx context.Context, in *sysin.GetAddonsConfigInp) (res *sysin.GetAddonsConfigModel, err error)
|
||||
// ConversionType 转换类型
|
||||
ConversionType(ctx context.Context, models *entity.SysAddonsConfig) (value interface{}, err error)
|
||||
// UpdateConfigByGroup 更新指定分组的配置
|
||||
UpdateConfigByGroup(ctx context.Context, in *sysin.UpdateAddonsConfigInp) (err error)
|
||||
}
|
||||
ISysAttachment interface {
|
||||
// Model ORM模型
|
||||
Model(ctx context.Context, option ...*handler.Option) *gdb.Model
|
||||
// Delete 删除附件
|
||||
Delete(ctx context.Context, in *sysin.AttachmentDeleteInp) (err error)
|
||||
// View 获取附件信息
|
||||
View(ctx context.Context, in *sysin.AttachmentViewInp) (res *sysin.AttachmentViewModel, err error)
|
||||
// List 获取附件列表
|
||||
List(ctx context.Context, in *sysin.AttachmentListInp) (list []*sysin.AttachmentListModel, totalCount int, err error)
|
||||
// ClearKind 清空上传类型
|
||||
ClearKind(ctx context.Context, in *sysin.AttachmentClearKindInp) (err error)
|
||||
// AttachmentKindOption 上传类型选项
|
||||
AttachmentKindOption(ctx context.Context) (opts []*model.Option, err error)
|
||||
}
|
||||
ISysBlacklist interface {
|
||||
// Delete 删除
|
||||
Delete(ctx context.Context, in *sysin.BlacklistDeleteInp) (err error)
|
||||
// Edit 修改/新增
|
||||
Edit(ctx context.Context, in *sysin.BlacklistEditInp) (err error)
|
||||
// Status 更新状态
|
||||
Status(ctx context.Context, in *sysin.BlacklistStatusInp) (err error)
|
||||
// View 获取指定信息
|
||||
View(ctx context.Context, in *sysin.BlacklistViewInp) (res *sysin.BlacklistViewModel, err error)
|
||||
// List 获取列表
|
||||
List(ctx context.Context, in *sysin.BlacklistListInp) (list []*sysin.BlacklistListModel, totalCount int, err error)
|
||||
// VariableLoad 变化加载
|
||||
VariableLoad(ctx context.Context, err error)
|
||||
// Load 加载黑名单
|
||||
Load(ctx context.Context)
|
||||
// VerifyRequest 验证请求的访问IP是否在黑名单,如果存在则返回错误
|
||||
VerifyRequest(r *ghttp.Request) (err error)
|
||||
// ClusterSync 集群同步
|
||||
ClusterSync(ctx context.Context, message *gredis.Message)
|
||||
}
|
||||
ISysConfig interface {
|
||||
// InitConfig 初始化系统配置
|
||||
InitConfig(ctx context.Context)
|
||||
// LoadConfig 加载系统配置
|
||||
LoadConfig(ctx context.Context) (err error)
|
||||
// GetLogin 获取登录配置
|
||||
GetLogin(ctx context.Context) (conf *model.LoginConfig, err error)
|
||||
// GetWechat 获取微信配置
|
||||
GetWechat(ctx context.Context) (conf *model.WechatConfig, err error)
|
||||
// GetPay 获取支付配置
|
||||
GetPay(ctx context.Context) (conf *model.PayConfig, err error)
|
||||
// GetSms 获取短信配置
|
||||
GetSms(ctx context.Context) (conf *model.SmsConfig, err error)
|
||||
// GetGeo 获取地理配置
|
||||
GetGeo(ctx context.Context) (conf *model.GeoConfig, err error)
|
||||
// GetUpload 获取上传配置
|
||||
GetUpload(ctx context.Context) (conf *model.UploadConfig, err error)
|
||||
// GetSmtp 获取邮件配置
|
||||
GetSmtp(ctx context.Context) (conf *model.EmailConfig, err error)
|
||||
// GetBasic 获取基础配置
|
||||
GetBasic(ctx context.Context) (conf *model.BasicConfig, err error)
|
||||
// GetLoadTCP 获取本地tcp配置
|
||||
GetLoadTCP(ctx context.Context) (conf *model.TCPConfig, err error)
|
||||
// GetLoadGenerate 获取本地生成配置
|
||||
GetLoadGenerate(ctx context.Context) (conf *model.GenerateConfig, err error)
|
||||
// GetLoadToken 获取本地token配置
|
||||
GetLoadToken(ctx context.Context) (conf *model.TokenConfig, err error)
|
||||
// GetLoadLog 获取本地日志配置
|
||||
GetLoadLog(ctx context.Context) (conf *model.LogConfig, err error)
|
||||
// GetLoadServeLog 获取本地服务日志配置
|
||||
GetLoadServeLog(ctx context.Context) (conf *model.ServeLogConfig, err error)
|
||||
// GetConfigByGroup 获取指定分组的配置
|
||||
GetConfigByGroup(ctx context.Context, in *sysin.GetConfigInp) (res *sysin.GetConfigModel, err error)
|
||||
// ConversionType 转换类型
|
||||
ConversionType(ctx context.Context, models *entity.SysConfig) (value interface{}, err error)
|
||||
// UpdateConfigByGroup 更新指定分组的配置
|
||||
UpdateConfigByGroup(ctx context.Context, in *sysin.UpdateConfigInp) (err error)
|
||||
// ClusterSync 集群同步
|
||||
ClusterSync(ctx context.Context, message *gredis.Message)
|
||||
}
|
||||
ISysCron interface {
|
||||
StartCron(ctx context.Context)
|
||||
// Delete 删除
|
||||
Delete(ctx context.Context, in *sysin.CronDeleteInp) (err error)
|
||||
// Edit 修改/新增
|
||||
Edit(ctx context.Context, in *sysin.CronEditInp) (err error)
|
||||
// Status 更新状态
|
||||
Status(ctx context.Context, in *sysin.CronStatusInp) (err error)
|
||||
// MaxSort 最大排序
|
||||
MaxSort(ctx context.Context, in *sysin.CronMaxSortInp) (res *sysin.CronMaxSortModel, err error)
|
||||
// View 获取指定信息
|
||||
View(ctx context.Context, in *sysin.CronViewInp) (res *sysin.CronViewModel, err error)
|
||||
// List 获取列表
|
||||
List(ctx context.Context, in *sysin.CronListInp) (list []*sysin.CronListModel, totalCount int, err error)
|
||||
// GetName 获取分组名称
|
||||
GetName(ctx context.Context, id int64) (name string, err error)
|
||||
// OnlineExec 在线执行
|
||||
OnlineExec(ctx context.Context, in *sysin.OnlineExecInp) (err error)
|
||||
// DispatchLog 查看指定任务的调度日志
|
||||
DispatchLog(ctx context.Context, in *sysin.DispatchLogInp) (res *sysin.DispatchLogModel, err error)
|
||||
}
|
||||
ISysCronGroup interface {
|
||||
// Delete 删除
|
||||
Delete(ctx context.Context, in *sysin.CronGroupDeleteInp) (err error)
|
||||
// Edit 修改/新增
|
||||
Edit(ctx context.Context, in *sysin.CronGroupEditInp) (err error)
|
||||
// Status 更新状态
|
||||
Status(ctx context.Context, in *sysin.CronGroupStatusInp) (err error)
|
||||
// MaxSort 最大排序
|
||||
MaxSort(ctx context.Context, in *sysin.CronGroupMaxSortInp) (res *sysin.CronGroupMaxSortModel, err error)
|
||||
// View 获取指定信息
|
||||
View(ctx context.Context, in *sysin.CronGroupViewInp) (res *sysin.CronGroupViewModel, err error)
|
||||
// List 获取列表
|
||||
List(ctx context.Context, in *sysin.CronGroupListInp) (list []*sysin.CronGroupListModel, totalCount int, err error)
|
||||
// Select 选项
|
||||
Select(ctx context.Context, in *sysin.CronGroupSelectInp) (res *sysin.CronGroupSelectModel, err error)
|
||||
}
|
||||
ISysCurdDemo interface {
|
||||
// Model CURD列表ORM模型
|
||||
Model(ctx context.Context, option ...*handler.Option) *gdb.Model
|
||||
// List 获取CURD列表列表
|
||||
List(ctx context.Context, in *sysin.CurdDemoListInp) (list []*sysin.CurdDemoListModel, totalCount int, err error)
|
||||
// Export 导出CURD列表
|
||||
Export(ctx context.Context, in *sysin.CurdDemoListInp) (err error)
|
||||
// Edit 修改/新增CURD列表
|
||||
Edit(ctx context.Context, in *sysin.CurdDemoEditInp) (err error)
|
||||
// Delete 删除CURD列表
|
||||
Delete(ctx context.Context, in *sysin.CurdDemoDeleteInp) (err error)
|
||||
// MaxSort 获取CURD列表最大排序
|
||||
MaxSort(ctx context.Context, in *sysin.CurdDemoMaxSortInp) (res *sysin.CurdDemoMaxSortModel, err error)
|
||||
// View 获取CURD列表指定信息
|
||||
View(ctx context.Context, in *sysin.CurdDemoViewInp) (res *sysin.CurdDemoViewModel, err error)
|
||||
// Status 更新CURD列表状态
|
||||
Status(ctx context.Context, in *sysin.CurdDemoStatusInp) (err error)
|
||||
// Switch 更新CURD列表开关
|
||||
Switch(ctx context.Context, in *sysin.CurdDemoSwitchInp) (err error)
|
||||
}
|
||||
ISysDictData interface {
|
||||
// Delete 删除
|
||||
Delete(ctx context.Context, in *sysin.DictDataDeleteInp) error
|
||||
// Edit 修改/新增
|
||||
Edit(ctx context.Context, in *sysin.DictDataEditInp) (err error)
|
||||
// List 获取列表
|
||||
List(ctx context.Context, in *sysin.DictDataListInp) (list []*sysin.DictDataListModel, totalCount int, err error)
|
||||
// GetId 获取指定类型的ID
|
||||
GetId(ctx context.Context, t string) (id int64, err error)
|
||||
// GetType 获取指定ID的类型标识
|
||||
GetType(ctx context.Context, id int64) (types string, err error)
|
||||
// GetTypes 获取指定ID的所有类型标识,包含下级
|
||||
GetTypes(ctx context.Context, id int64) (types []string, err error)
|
||||
// Select 获取列表
|
||||
Select(ctx context.Context, in *sysin.DataSelectInp) (list sysin.DataSelectModel, err error)
|
||||
}
|
||||
ISysDictType interface {
|
||||
// Tree 树
|
||||
Tree(ctx context.Context) (list []*sysin.DictTypeTree, err error)
|
||||
// Delete 删除
|
||||
Delete(ctx context.Context, in *sysin.DictTypeDeleteInp) (err error)
|
||||
// Edit 修改/新增
|
||||
Edit(ctx context.Context, in *sysin.DictTypeEditInp) (err error)
|
||||
// TreeSelect 获取类型关系树选项
|
||||
TreeSelect(ctx context.Context, in *sysin.DictTreeSelectInp) (list []*sysin.DictTypeTree, err error)
|
||||
// BuiltinSelect 内置字典选项
|
||||
BuiltinSelect() (list []*sysin.DictTypeTree)
|
||||
}
|
||||
ISysEmsLog interface {
|
||||
// Delete 删除
|
||||
Delete(ctx context.Context, in *sysin.EmsLogDeleteInp) (err error)
|
||||
// Edit 修改/新增
|
||||
Edit(ctx context.Context, in *sysin.EmsLogEditInp) (err error)
|
||||
// Status 更新部门状态
|
||||
Status(ctx context.Context, in *sysin.EmsLogStatusInp) (err error)
|
||||
// View 获取指定字典类型信息
|
||||
View(ctx context.Context, in *sysin.EmsLogViewInp) (res *sysin.EmsLogViewModel, err error)
|
||||
// List 获取列表
|
||||
List(ctx context.Context, in *sysin.EmsLogListInp) (list []*sysin.EmsLogListModel, totalCount int, err error)
|
||||
// Send 发送邮件
|
||||
Send(ctx context.Context, in *sysin.SendEmsInp) (err error)
|
||||
// GetTemplate 获取指定邮件模板
|
||||
GetTemplate(ctx context.Context, template string, config *model.EmailConfig) (val string, err error)
|
||||
// AllowSend 是否允许发送
|
||||
AllowSend(ctx context.Context, models *entity.SysEmsLog, config *model.EmailConfig) (err error)
|
||||
// NowDayIpSendCount 当天IP累计发送次数
|
||||
NowDayIpSendCount(ctx context.Context, event string) (count int, err error)
|
||||
// VerifyCode 效验验证码
|
||||
VerifyCode(ctx context.Context, in *sysin.VerifyEmsCodeInp) (err error)
|
||||
}
|
||||
ISysGenCodes interface {
|
||||
// Delete 删除
|
||||
Delete(ctx context.Context, in *sysin.GenCodesDeleteInp) (err error)
|
||||
// Edit 修改/新增
|
||||
Edit(ctx context.Context, in *sysin.GenCodesEditInp) (res *sysin.GenCodesEditModel, err error)
|
||||
// Status 更新部门状态
|
||||
Status(ctx context.Context, in *sysin.GenCodesStatusInp) (err error)
|
||||
// MaxSort 最大排序
|
||||
MaxSort(ctx context.Context, in *sysin.GenCodesMaxSortInp) (res *sysin.GenCodesMaxSortModel, err error)
|
||||
// View 获取指定字典类型信息
|
||||
View(ctx context.Context, in *sysin.GenCodesViewInp) (res *sysin.GenCodesViewModel, err error)
|
||||
// List 获取列表
|
||||
List(ctx context.Context, in *sysin.GenCodesListInp) (list []*sysin.GenCodesListModel, totalCount int, err error)
|
||||
// Selects 选项
|
||||
Selects(ctx context.Context, in *sysin.GenCodesSelectsInp) (res *sysin.GenCodesSelectsModel, err error)
|
||||
// TableSelect 表选项
|
||||
TableSelect(ctx context.Context, in *sysin.GenCodesTableSelectInp) (res []*sysin.GenCodesTableSelectModel, err error)
|
||||
// ColumnSelect 表字段选项
|
||||
ColumnSelect(ctx context.Context, in *sysin.GenCodesColumnSelectInp) (res []*sysin.GenCodesColumnSelectModel, err error)
|
||||
// ColumnList 表字段列表
|
||||
ColumnList(ctx context.Context, in *sysin.GenCodesColumnListInp) (res []*sysin.GenCodesColumnListModel, err error)
|
||||
// Preview 生成预览
|
||||
Preview(ctx context.Context, in *sysin.GenCodesPreviewInp) (res *sysin.GenCodesPreviewModel, err error)
|
||||
// Build 提交生成
|
||||
Build(ctx context.Context, in *sysin.GenCodesBuildInp) (err error)
|
||||
}
|
||||
ISysLog interface {
|
||||
// Model 请求日志Orm模型
|
||||
Model(ctx context.Context, option ...*handler.Option) *gdb.Model
|
||||
// Export 导出
|
||||
Export(ctx context.Context, in *sysin.LogListInp) (err error)
|
||||
// RealWrite 真实写入
|
||||
RealWrite(ctx context.Context, log entity.SysLog) (err error)
|
||||
// AutoLog 根据配置自动记录请求日志
|
||||
AutoLog(ctx context.Context) error
|
||||
// AnalysisLog 解析日志数据
|
||||
AnalysisLog(ctx context.Context) entity.SysLog
|
||||
// SimplifyHeaderParams 过滤掉请求头中的大参数
|
||||
SimplifyHeaderParams(data *gjson.Json) *gjson.Json
|
||||
// View 获取指定请求日志信息
|
||||
View(ctx context.Context, in *sysin.LogViewInp) (res *sysin.LogViewModel, err error)
|
||||
// Delete 删除请求日志
|
||||
Delete(ctx context.Context, in *sysin.LogDeleteInp) (err error)
|
||||
// List 请求日志列表
|
||||
List(ctx context.Context, in *sysin.LogListInp) (list []*sysin.LogListModel, totalCount int, err error)
|
||||
}
|
||||
ISysLoginLog interface {
|
||||
// Model 登录日志Orm模型
|
||||
Model(ctx context.Context, option ...*handler.Option) *gdb.Model
|
||||
// List 获取登录日志列表
|
||||
List(ctx context.Context, in *sysin.LoginLogListInp) (list []*sysin.LoginLogListModel, totalCount int, err error)
|
||||
// Export 导出登录日志
|
||||
Export(ctx context.Context, in *sysin.LoginLogListInp) (err error)
|
||||
// Delete 删除登录日志
|
||||
Delete(ctx context.Context, in *sysin.LoginLogDeleteInp) (err error)
|
||||
// Push 推送登录日志
|
||||
Push(ctx context.Context, in *sysin.LoginLogPushInp)
|
||||
// RealWrite 真实写入
|
||||
RealWrite(ctx context.Context, models entity.SysLoginLog) (err error)
|
||||
}
|
||||
ISysNormalTreeDemo interface {
|
||||
// Model 普通树表ORM模型
|
||||
Model(ctx context.Context, option ...*handler.Option) *gdb.Model
|
||||
// List 获取普通树表列表
|
||||
List(ctx context.Context, in *sysin.NormalTreeDemoListInp) (list []*sysin.NormalTreeDemoListModel, totalCount int, err error)
|
||||
// Edit 修改/新增普通树表
|
||||
Edit(ctx context.Context, in *sysin.NormalTreeDemoEditInp) (err error)
|
||||
// Delete 删除普通树表
|
||||
Delete(ctx context.Context, in *sysin.NormalTreeDemoDeleteInp) (err error)
|
||||
// MaxSort 获取普通树表最大排序
|
||||
MaxSort(ctx context.Context, in *sysin.NormalTreeDemoMaxSortInp) (res *sysin.NormalTreeDemoMaxSortModel, err error)
|
||||
// View 获取普通树表指定信息
|
||||
View(ctx context.Context, in *sysin.NormalTreeDemoViewInp) (res *sysin.NormalTreeDemoViewModel, err error)
|
||||
// TreeOption 获取普通树表关系树选项
|
||||
TreeOption(ctx context.Context) (nodes []tree.Node, err error)
|
||||
}
|
||||
ISysOptionTreeDemo interface {
|
||||
// Model 选项树表ORM模型
|
||||
Model(ctx context.Context, option ...*handler.Option) *gdb.Model
|
||||
// List 获取选项树表列表
|
||||
List(ctx context.Context, in *sysin.OptionTreeDemoListInp) (list []*sysin.OptionTreeDemoListModel, totalCount int, err error)
|
||||
// Edit 修改/新增选项树表
|
||||
Edit(ctx context.Context, in *sysin.OptionTreeDemoEditInp) (err error)
|
||||
// Delete 删除选项树表
|
||||
Delete(ctx context.Context, in *sysin.OptionTreeDemoDeleteInp) (err error)
|
||||
// MaxSort 获取选项树表最大排序
|
||||
MaxSort(ctx context.Context, in *sysin.OptionTreeDemoMaxSortInp) (res *sysin.OptionTreeDemoMaxSortModel, err error)
|
||||
// View 获取选项树表指定信息
|
||||
View(ctx context.Context, in *sysin.OptionTreeDemoViewInp) (res *sysin.OptionTreeDemoViewModel, err error)
|
||||
// TreeOption 获取选项树表关系树选项
|
||||
TreeOption(ctx context.Context) (nodes []tree.Node, err error)
|
||||
}
|
||||
ISysProvinces interface {
|
||||
// Tree 关系树选项列表
|
||||
Tree(ctx context.Context) (list []*sysin.ProvincesTree, err error)
|
||||
// Delete 删除省市区数据
|
||||
Delete(ctx context.Context, in *sysin.ProvincesDeleteInp) (err error)
|
||||
// Edit 修改/新增省市区数据
|
||||
Edit(ctx context.Context, in *sysin.ProvincesEditInp) (err error)
|
||||
// Status 更新省市区状态
|
||||
Status(ctx context.Context, in *sysin.ProvincesStatusInp) (err error)
|
||||
// MaxSort 最大排序
|
||||
MaxSort(ctx context.Context, in *sysin.ProvincesMaxSortInp) (res *sysin.ProvincesMaxSortModel, err error)
|
||||
// View 获取省市区信息
|
||||
View(ctx context.Context, in *sysin.ProvincesViewInp) (res *sysin.ProvincesViewModel, err error)
|
||||
// List 获取列表
|
||||
List(ctx context.Context, in *sysin.ProvincesListInp) (list []*sysin.ProvincesListModel, totalCount int, err error)
|
||||
// ChildrenList 获取省市区下级列表
|
||||
ChildrenList(ctx context.Context, in *sysin.ProvincesChildrenListInp) (list []*sysin.ProvincesChildrenListModel, totalCount int, err error)
|
||||
// UniqueId 获取省市区下级列表
|
||||
UniqueId(ctx context.Context, in *sysin.ProvincesUniqueIdInp) (res *sysin.ProvincesUniqueIdModel, err error)
|
||||
// Select 省市区选项
|
||||
Select(ctx context.Context, in *sysin.ProvincesSelectInp) (res *sysin.ProvincesSelectModel, err error)
|
||||
}
|
||||
ISysServeLicense interface {
|
||||
// Model 服务许可证ORM模型
|
||||
Model(ctx context.Context, option ...*handler.Option) *gdb.Model
|
||||
// List 获取服务许可证列表
|
||||
List(ctx context.Context, in *sysin.ServeLicenseListInp) (list []*sysin.ServeLicenseListModel, totalCount int, err error)
|
||||
// Export 导出服务许可证
|
||||
Export(ctx context.Context, in *sysin.ServeLicenseListInp) (err error)
|
||||
// Edit 修改/新增服务许可证
|
||||
Edit(ctx context.Context, in *sysin.ServeLicenseEditInp) (err error)
|
||||
// Delete 删除服务许可证
|
||||
Delete(ctx context.Context, in *sysin.ServeLicenseDeleteInp) (err error)
|
||||
// View 获取服务许可证指定信息
|
||||
View(ctx context.Context, in *sysin.ServeLicenseViewInp) (res *sysin.ServeLicenseViewModel, err error)
|
||||
// Status 更新服务许可证状态
|
||||
Status(ctx context.Context, in *sysin.ServeLicenseStatusInp) (err error)
|
||||
// AssignRouter 分配服务许可证路由
|
||||
AssignRouter(ctx context.Context, in *sysin.ServeLicenseAssignRouterInp) (err error)
|
||||
}
|
||||
ISysServeLog interface {
|
||||
// Model 服务日志Orm模型
|
||||
Model(ctx context.Context) *gdb.Model
|
||||
// List 获取服务日志列表
|
||||
List(ctx context.Context, in *sysin.ServeLogListInp) (list []*sysin.ServeLogListModel, totalCount int, err error)
|
||||
// Export 导出服务日志
|
||||
Export(ctx context.Context, in *sysin.ServeLogListInp) (err error)
|
||||
// Delete 删除服务日志
|
||||
Delete(ctx context.Context, in *sysin.ServeLogDeleteInp) (err error)
|
||||
// View 获取服务日志指定信息
|
||||
View(ctx context.Context, in *sysin.ServeLogViewInp) (res *sysin.ServeLogViewModel, err error)
|
||||
// RealWrite 真实写入
|
||||
RealWrite(ctx context.Context, models entity.SysServeLog) (err error)
|
||||
}
|
||||
ISysSmsLog interface {
|
||||
// Delete 删除
|
||||
Delete(ctx context.Context, in *sysin.SmsLogDeleteInp) (err error)
|
||||
// View 获取指定字典类型信息
|
||||
View(ctx context.Context, in *sysin.SmsLogViewInp) (res *sysin.SmsLogViewModel, err error)
|
||||
// List 获取列表
|
||||
List(ctx context.Context, in *sysin.SmsLogListInp) (list []*sysin.SmsLogListModel, totalCount int, err error)
|
||||
// SendCode 发送验证码
|
||||
SendCode(ctx context.Context, in *sysin.SendCodeInp) (err error)
|
||||
// GetTemplate 获取指定短信模板
|
||||
GetTemplate(ctx context.Context, template string, config *model.SmsConfig) (val string, err error)
|
||||
// AllowSend 是否允许发送
|
||||
AllowSend(ctx context.Context, models *entity.SysSmsLog, config *model.SmsConfig) (err error)
|
||||
// NowDayIpSendCount 当天IP累计发送次数
|
||||
NowDayIpSendCount(ctx context.Context, event string) (count int, err error)
|
||||
// VerifyCode 效验验证码
|
||||
VerifyCode(ctx context.Context, in *sysin.VerifyCodeInp) (err error)
|
||||
}
|
||||
ISysTestCategory interface {
|
||||
// Model 测试分类ORM模型
|
||||
Model(ctx context.Context, option ...*handler.Option) *gdb.Model
|
||||
// List 获取测试分类列表
|
||||
List(ctx context.Context, in *sysin.TestCategoryListInp) (list []*sysin.TestCategoryListModel, totalCount int, err error)
|
||||
// Edit 修改/新增测试分类
|
||||
Edit(ctx context.Context, in *sysin.TestCategoryEditInp) (err error)
|
||||
// Delete 删除测试分类
|
||||
Delete(ctx context.Context, in *sysin.TestCategoryDeleteInp) (err error)
|
||||
// MaxSort 获取测试分类最大排序
|
||||
MaxSort(ctx context.Context, in *sysin.TestCategoryMaxSortInp) (res *sysin.TestCategoryMaxSortModel, err error)
|
||||
// View 获取测试分类指定信息
|
||||
View(ctx context.Context, in *sysin.TestCategoryViewInp) (res *sysin.TestCategoryViewModel, err error)
|
||||
// Status 更新测试分类状态
|
||||
Status(ctx context.Context, in *sysin.TestCategoryStatusInp) (err error)
|
||||
// Option 获取测试分类选项
|
||||
Option(ctx context.Context) (opts []*model.Option, err error)
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
localSysAddons ISysAddons
|
||||
localSysAddonsConfig ISysAddonsConfig
|
||||
localSysAttachment ISysAttachment
|
||||
localSysBlacklist ISysBlacklist
|
||||
localSysConfig ISysConfig
|
||||
localSysCron ISysCron
|
||||
localSysCronGroup ISysCronGroup
|
||||
localSysCurdDemo ISysCurdDemo
|
||||
localSysDictData ISysDictData
|
||||
localSysDictType ISysDictType
|
||||
localSysEmsLog ISysEmsLog
|
||||
localSysGenCodes ISysGenCodes
|
||||
localSysLog ISysLog
|
||||
localSysLoginLog ISysLoginLog
|
||||
localSysNormalTreeDemo ISysNormalTreeDemo
|
||||
localSysOptionTreeDemo ISysOptionTreeDemo
|
||||
localSysProvinces ISysProvinces
|
||||
localSysServeLicense ISysServeLicense
|
||||
localSysServeLog ISysServeLog
|
||||
localSysSmsLog ISysSmsLog
|
||||
localSysTestCategory ISysTestCategory
|
||||
)
|
||||
|
||||
func SysAddons() ISysAddons {
|
||||
if localSysAddons == nil {
|
||||
panic("implement not found for interface ISysAddons, forgot register?")
|
||||
}
|
||||
return localSysAddons
|
||||
}
|
||||
|
||||
func RegisterSysAddons(i ISysAddons) {
|
||||
localSysAddons = i
|
||||
}
|
||||
|
||||
func SysAddonsConfig() ISysAddonsConfig {
|
||||
if localSysAddonsConfig == nil {
|
||||
panic("implement not found for interface ISysAddonsConfig, forgot register?")
|
||||
}
|
||||
return localSysAddonsConfig
|
||||
}
|
||||
|
||||
func RegisterSysAddonsConfig(i ISysAddonsConfig) {
|
||||
localSysAddonsConfig = i
|
||||
}
|
||||
|
||||
func SysAttachment() ISysAttachment {
|
||||
if localSysAttachment == nil {
|
||||
panic("implement not found for interface ISysAttachment, forgot register?")
|
||||
}
|
||||
return localSysAttachment
|
||||
}
|
||||
|
||||
func RegisterSysAttachment(i ISysAttachment) {
|
||||
localSysAttachment = i
|
||||
}
|
||||
|
||||
func SysBlacklist() ISysBlacklist {
|
||||
if localSysBlacklist == nil {
|
||||
panic("implement not found for interface ISysBlacklist, forgot register?")
|
||||
}
|
||||
return localSysBlacklist
|
||||
}
|
||||
|
||||
func RegisterSysBlacklist(i ISysBlacklist) {
|
||||
localSysBlacklist = i
|
||||
}
|
||||
|
||||
func SysConfig() ISysConfig {
|
||||
if localSysConfig == nil {
|
||||
panic("implement not found for interface ISysConfig, forgot register?")
|
||||
}
|
||||
return localSysConfig
|
||||
}
|
||||
|
||||
func RegisterSysConfig(i ISysConfig) {
|
||||
localSysConfig = i
|
||||
}
|
||||
|
||||
func SysCron() ISysCron {
|
||||
if localSysCron == nil {
|
||||
panic("implement not found for interface ISysCron, forgot register?")
|
||||
}
|
||||
return localSysCron
|
||||
}
|
||||
|
||||
func RegisterSysCron(i ISysCron) {
|
||||
localSysCron = i
|
||||
}
|
||||
|
||||
func SysCronGroup() ISysCronGroup {
|
||||
if localSysCronGroup == nil {
|
||||
panic("implement not found for interface ISysCronGroup, forgot register?")
|
||||
}
|
||||
return localSysCronGroup
|
||||
}
|
||||
|
||||
func RegisterSysCronGroup(i ISysCronGroup) {
|
||||
localSysCronGroup = i
|
||||
}
|
||||
|
||||
func SysCurdDemo() ISysCurdDemo {
|
||||
if localSysCurdDemo == nil {
|
||||
panic("implement not found for interface ISysCurdDemo, forgot register?")
|
||||
}
|
||||
return localSysCurdDemo
|
||||
}
|
||||
|
||||
func RegisterSysCurdDemo(i ISysCurdDemo) {
|
||||
localSysCurdDemo = i
|
||||
}
|
||||
|
||||
func SysDictData() ISysDictData {
|
||||
if localSysDictData == nil {
|
||||
panic("implement not found for interface ISysDictData, forgot register?")
|
||||
}
|
||||
return localSysDictData
|
||||
}
|
||||
|
||||
func RegisterSysDictData(i ISysDictData) {
|
||||
localSysDictData = i
|
||||
}
|
||||
|
||||
func SysDictType() ISysDictType {
|
||||
if localSysDictType == nil {
|
||||
panic("implement not found for interface ISysDictType, forgot register?")
|
||||
}
|
||||
return localSysDictType
|
||||
}
|
||||
|
||||
func RegisterSysDictType(i ISysDictType) {
|
||||
localSysDictType = i
|
||||
}
|
||||
|
||||
func SysEmsLog() ISysEmsLog {
|
||||
if localSysEmsLog == nil {
|
||||
panic("implement not found for interface ISysEmsLog, forgot register?")
|
||||
}
|
||||
return localSysEmsLog
|
||||
}
|
||||
|
||||
func RegisterSysEmsLog(i ISysEmsLog) {
|
||||
localSysEmsLog = i
|
||||
}
|
||||
|
||||
func SysGenCodes() ISysGenCodes {
|
||||
if localSysGenCodes == nil {
|
||||
panic("implement not found for interface ISysGenCodes, forgot register?")
|
||||
}
|
||||
return localSysGenCodes
|
||||
}
|
||||
|
||||
func RegisterSysGenCodes(i ISysGenCodes) {
|
||||
localSysGenCodes = i
|
||||
}
|
||||
|
||||
func SysLog() ISysLog {
|
||||
if localSysLog == nil {
|
||||
panic("implement not found for interface ISysLog, forgot register?")
|
||||
}
|
||||
return localSysLog
|
||||
}
|
||||
|
||||
func RegisterSysLog(i ISysLog) {
|
||||
localSysLog = i
|
||||
}
|
||||
|
||||
func SysLoginLog() ISysLoginLog {
|
||||
if localSysLoginLog == nil {
|
||||
panic("implement not found for interface ISysLoginLog, forgot register?")
|
||||
}
|
||||
return localSysLoginLog
|
||||
}
|
||||
|
||||
func RegisterSysLoginLog(i ISysLoginLog) {
|
||||
localSysLoginLog = i
|
||||
}
|
||||
|
||||
func SysNormalTreeDemo() ISysNormalTreeDemo {
|
||||
if localSysNormalTreeDemo == nil {
|
||||
panic("implement not found for interface ISysNormalTreeDemo, forgot register?")
|
||||
}
|
||||
return localSysNormalTreeDemo
|
||||
}
|
||||
|
||||
func RegisterSysNormalTreeDemo(i ISysNormalTreeDemo) {
|
||||
localSysNormalTreeDemo = i
|
||||
}
|
||||
|
||||
func SysOptionTreeDemo() ISysOptionTreeDemo {
|
||||
if localSysOptionTreeDemo == nil {
|
||||
panic("implement not found for interface ISysOptionTreeDemo, forgot register?")
|
||||
}
|
||||
return localSysOptionTreeDemo
|
||||
}
|
||||
|
||||
func RegisterSysOptionTreeDemo(i ISysOptionTreeDemo) {
|
||||
localSysOptionTreeDemo = i
|
||||
}
|
||||
|
||||
func SysProvinces() ISysProvinces {
|
||||
if localSysProvinces == nil {
|
||||
panic("implement not found for interface ISysProvinces, forgot register?")
|
||||
}
|
||||
return localSysProvinces
|
||||
}
|
||||
|
||||
func RegisterSysProvinces(i ISysProvinces) {
|
||||
localSysProvinces = i
|
||||
}
|
||||
|
||||
func SysServeLicense() ISysServeLicense {
|
||||
if localSysServeLicense == nil {
|
||||
panic("implement not found for interface ISysServeLicense, forgot register?")
|
||||
}
|
||||
return localSysServeLicense
|
||||
}
|
||||
|
||||
func RegisterSysServeLicense(i ISysServeLicense) {
|
||||
localSysServeLicense = i
|
||||
}
|
||||
|
||||
func SysServeLog() ISysServeLog {
|
||||
if localSysServeLog == nil {
|
||||
panic("implement not found for interface ISysServeLog, forgot register?")
|
||||
}
|
||||
return localSysServeLog
|
||||
}
|
||||
|
||||
func RegisterSysServeLog(i ISysServeLog) {
|
||||
localSysServeLog = i
|
||||
}
|
||||
|
||||
func SysSmsLog() ISysSmsLog {
|
||||
if localSysSmsLog == nil {
|
||||
panic("implement not found for interface ISysSmsLog, forgot register?")
|
||||
}
|
||||
return localSysSmsLog
|
||||
}
|
||||
|
||||
func RegisterSysSmsLog(i ISysSmsLog) {
|
||||
localSysSmsLog = i
|
||||
}
|
||||
|
||||
func SysTestCategory() ISysTestCategory {
|
||||
if localSysTestCategory == nil {
|
||||
panic("implement not found for interface ISysTestCategory, forgot register?")
|
||||
}
|
||||
return localSysTestCategory
|
||||
}
|
||||
|
||||
func RegisterSysTestCategory(i ISysTestCategory) {
|
||||
localSysTestCategory = i
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
// ================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// You can delete these comments if you wish manually maintain this interface file.
|
||||
// ================================================================================
|
||||
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"hotgo/api/servmsg"
|
||||
"hotgo/internal/library/network/tcp"
|
||||
"hotgo/internal/model/input/servmsgin"
|
||||
)
|
||||
|
||||
type (
|
||||
IAuthClient interface {
|
||||
// Instance 获取实例
|
||||
Instance() *tcp.Client
|
||||
// Start 启动服务
|
||||
Start(ctx context.Context)
|
||||
// Stop 停止服务
|
||||
Stop(ctx context.Context)
|
||||
// Summary 获取授权信息
|
||||
Summary() *servmsgin.AuthSummaryModel
|
||||
// OnResponseAuthSummary 响应授权信息
|
||||
OnResponseAuthSummary(ctx context.Context, req *servmsg.AuthSummaryRes)
|
||||
// OnResponseExampleHello 一个tcp请求例子
|
||||
OnResponseExampleHello(ctx context.Context, req *servmsg.ExampleHelloRes)
|
||||
}
|
||||
ICronClient interface {
|
||||
// Instance 获取实例
|
||||
Instance() *tcp.Client
|
||||
// Start 启动服务
|
||||
Start(ctx context.Context)
|
||||
// Stop 停止服务
|
||||
Stop(ctx context.Context)
|
||||
// OnCronDelete 删除任务
|
||||
OnCronDelete(ctx context.Context, req *servmsg.CronDeleteReq) (res *servmsg.CronDeleteRes, err error)
|
||||
// OnCronEdit 编辑任务
|
||||
OnCronEdit(ctx context.Context, req *servmsg.CronEditReq) (res *servmsg.CronEditRes, err error)
|
||||
// OnCronStatus 修改任务状态
|
||||
OnCronStatus(ctx context.Context, req *servmsg.CronStatusReq) (res *servmsg.CronStatusRes, err error)
|
||||
// OnCronOnlineExec 执行一次任务
|
||||
OnCronOnlineExec(ctx context.Context, req *servmsg.CronOnlineExecReq) (res *servmsg.CronOnlineExecRes, err error)
|
||||
// OnCronDispatchLog 查看调度日志
|
||||
OnCronDispatchLog(ctx context.Context, req *servmsg.CronDispatchLogReq) (res *servmsg.CronDispatchLogRes, err error)
|
||||
// DefaultInterceptor 默认拦截器
|
||||
DefaultInterceptor(ctx context.Context, msg *tcp.Message) (err error)
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
localAuthClient IAuthClient
|
||||
localCronClient ICronClient
|
||||
)
|
||||
|
||||
func AuthClient() IAuthClient {
|
||||
if localAuthClient == nil {
|
||||
panic("implement not found for interface IAuthClient, forgot register?")
|
||||
}
|
||||
return localAuthClient
|
||||
}
|
||||
|
||||
func RegisterAuthClient(i IAuthClient) {
|
||||
localAuthClient = i
|
||||
}
|
||||
|
||||
func CronClient() ICronClient {
|
||||
if localCronClient == nil {
|
||||
panic("implement not found for interface ICronClient, forgot register?")
|
||||
}
|
||||
return localCronClient
|
||||
}
|
||||
|
||||
func RegisterCronClient(i ICronClient) {
|
||||
localCronClient = i
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
// ================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// You can delete these comments if you wish manually maintain this interface file.
|
||||
// ================================================================================
|
||||
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"hotgo/api/servmsg"
|
||||
"hotgo/internal/library/cron"
|
||||
"hotgo/internal/library/network/tcp"
|
||||
)
|
||||
|
||||
type (
|
||||
ITCPServer interface {
|
||||
// OnAuthSummary 获取授权信息
|
||||
OnAuthSummary(ctx context.Context, req *servmsg.AuthSummaryReq)
|
||||
// CronDelete 删除任务
|
||||
CronDelete(ctx context.Context, in *servmsg.CronDeleteReq) (err error)
|
||||
// CronEdit 编辑任务
|
||||
CronEdit(ctx context.Context, in *servmsg.CronEditReq) (err error)
|
||||
// CronStatus 修改任务状态
|
||||
CronStatus(ctx context.Context, in *servmsg.CronStatusReq) (err error)
|
||||
// CronOnlineExec 执行一次任务
|
||||
CronOnlineExec(ctx context.Context, in *servmsg.CronOnlineExecReq) (err error)
|
||||
// DispatchLog 查看调度日志
|
||||
DispatchLog(ctx context.Context, in *servmsg.CronDispatchLogReq) (log *cron.Log, err error)
|
||||
// OnExampleHello 一个tcp请求例子
|
||||
OnExampleHello(ctx context.Context, req *servmsg.ExampleHelloReq)
|
||||
// OnExampleRPCHello 一个rpc请求例子
|
||||
OnExampleRPCHello(ctx context.Context, req *servmsg.ExampleRPCHelloReq) (res *servmsg.ExampleRPCHelloRes, err error)
|
||||
// Instance 获取实例
|
||||
Instance() *tcp.Server
|
||||
// Start 启动服务
|
||||
Start(ctx context.Context)
|
||||
// Stop 关闭服务
|
||||
Stop(ctx context.Context)
|
||||
// DefaultInterceptor 默认拦截器
|
||||
DefaultInterceptor(ctx context.Context, msg *tcp.Message) (err error)
|
||||
// PreFilterInterceptor 预处理
|
||||
PreFilterInterceptor(ctx context.Context, msg *tcp.Message) (err error)
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
localTCPServer ITCPServer
|
||||
)
|
||||
|
||||
func TCPServer() ITCPServer {
|
||||
if localTCPServer == nil {
|
||||
panic("implement not found for interface ITCPServer, forgot register?")
|
||||
}
|
||||
return localTCPServer
|
||||
}
|
||||
|
||||
func RegisterTCPServer(i ITCPServer) {
|
||||
localTCPServer = i
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
// ================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// You can delete these comments if you wish manually maintain this interface file.
|
||||
// ================================================================================
|
||||
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"hotgo/internal/model"
|
||||
)
|
||||
|
||||
type (
|
||||
IView interface {
|
||||
// GetBreadCrumb 前台系统-获取面包屑列表
|
||||
GetBreadCrumb(ctx context.Context, in *model.ViewGetBreadCrumbInput) []model.ViewBreadCrumb
|
||||
// GetTitle 前台系统-获取标题
|
||||
GetTitle(ctx context.Context, in *model.ViewGetTitleInput) string
|
||||
// RenderTpl 渲染指定模板页面
|
||||
RenderTpl(ctx context.Context, tpl string, data ...model.View)
|
||||
// Render 渲染默认模板页面
|
||||
Render(ctx context.Context, data ...model.View)
|
||||
// Error 自定义错误页面
|
||||
Error(ctx context.Context, err error)
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
localView IView
|
||||
)
|
||||
|
||||
func View() IView {
|
||||
if localView == nil {
|
||||
panic("implement not found for interface IView, forgot register?")
|
||||
}
|
||||
return localView
|
||||
}
|
||||
|
||||
func RegisterView(i IView) {
|
||||
localView = i
|
||||
}
|
||||
Reference in New Issue
Block a user