初始化v1
This commit is contained in:
109
internal/controller/admin/config.go
Normal file
109
internal/controller/admin/config.go
Normal file
@@ -0,0 +1,109 @@
|
||||
package admin
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/net/ghttp"
|
||||
"nl-video-api/internal/service"
|
||||
)
|
||||
|
||||
// ConfigController 系统配置管理控制器
|
||||
type ConfigController struct{}
|
||||
|
||||
// NewConfigController 创建系统配置管理控制器实例
|
||||
func NewConfigController() *ConfigController {
|
||||
return &ConfigController{}
|
||||
}
|
||||
|
||||
// List 获取配置列表
|
||||
func (c *ConfigController) List(r *ghttp.Request) {
|
||||
service.NewConfigService().AdminList(r)
|
||||
}
|
||||
|
||||
// Detail 获取配置详情
|
||||
func (c *ConfigController) Detail(r *ghttp.Request) {
|
||||
service.NewConfigService().AdminDetail(r)
|
||||
}
|
||||
|
||||
// Create 创建配置
|
||||
func (c *ConfigController) Create(r *ghttp.Request) {
|
||||
service.NewConfigService().AdminCreate(r)
|
||||
}
|
||||
|
||||
// Update 更新配置
|
||||
func (c *ConfigController) Update(r *ghttp.Request) {
|
||||
service.NewConfigService().AdminUpdate(r)
|
||||
}
|
||||
|
||||
// Delete 删除配置
|
||||
func (c *ConfigController) Delete(r *ghttp.Request) {
|
||||
service.NewConfigService().AdminDelete(r)
|
||||
}
|
||||
|
||||
// BatchDelete 批量删除配置
|
||||
func (c *ConfigController) BatchDelete(r *ghttp.Request) {
|
||||
service.NewConfigService().AdminBatchDelete(r)
|
||||
}
|
||||
|
||||
// GetByKey 根据键获取配置
|
||||
func (c *ConfigController) GetByKey(r *ghttp.Request) {
|
||||
service.NewConfigService().AdminGetByKey(r)
|
||||
}
|
||||
|
||||
// GetByGroup 根据分组获取配置
|
||||
func (c *ConfigController) GetByGroup(r *ghttp.Request) {
|
||||
service.NewConfigService().AdminGetByGroup(r)
|
||||
}
|
||||
|
||||
// Set 设置配置
|
||||
func (c *ConfigController) Set(r *ghttp.Request) {
|
||||
service.NewConfigService().AdminSet(r)
|
||||
}
|
||||
|
||||
// BatchSet 批量设置配置
|
||||
func (c *ConfigController) BatchSet(r *ghttp.Request) {
|
||||
service.NewConfigService().AdminBatchSet(r)
|
||||
}
|
||||
|
||||
// GetGroupList 获取配置分组列表
|
||||
func (c *ConfigController) GetGroupList(r *ghttp.Request) {
|
||||
service.NewConfigService().AdminGetGroupList(r)
|
||||
}
|
||||
|
||||
// Export 导出配置
|
||||
func (c *ConfigController) Export(r *ghttp.Request) {
|
||||
service.NewConfigService().AdminExport(r)
|
||||
}
|
||||
|
||||
// Import 导入配置
|
||||
func (c *ConfigController) Import(r *ghttp.Request) {
|
||||
service.NewConfigService().AdminImport(r)
|
||||
}
|
||||
|
||||
// Cache 缓存配置
|
||||
func (c *ConfigController) Cache(r *ghttp.Request) {
|
||||
service.NewConfigService().AdminCache(r)
|
||||
}
|
||||
|
||||
// ClearCache 清除配置缓存
|
||||
func (c *ConfigController) ClearCache(r *ghttp.Request) {
|
||||
service.NewConfigService().AdminClearCache(r)
|
||||
}
|
||||
|
||||
// Validate 验证配置
|
||||
func (c *ConfigController) Validate(r *ghttp.Request) {
|
||||
service.NewConfigService().AdminValidate(r)
|
||||
}
|
||||
|
||||
// Backup 备份配置
|
||||
func (c *ConfigController) Backup(r *ghttp.Request) {
|
||||
service.NewConfigService().AdminBackup(r)
|
||||
}
|
||||
|
||||
// Restore 恢复配置
|
||||
func (c *ConfigController) Restore(r *ghttp.Request) {
|
||||
service.NewConfigService().AdminRestore(r)
|
||||
}
|
||||
|
||||
// GetHistory 获取配置历史
|
||||
func (c *ConfigController) GetHistory(r *ghttp.Request) {
|
||||
service.NewConfigService().AdminGetHistory(r)
|
||||
}
|
||||
Reference in New Issue
Block a user