mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-08-28 06:56:10 +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:
76
server/addons/hgexample/service/sys.go
Normal file
76
server/addons/hgexample/service/sys.go
Normal 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
|
||||
}
|
Reference in New Issue
Block a user