github.com/SupenBysz/gf-admin-community@v0.7.4/sys_service/sys_config.go (about)

     1  // ================================================================================
     2  // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
     3  // You can delete these comments if you wish manually maintain this interface file.
     4  // ================================================================================
     5  
     6  package sys_service
     7  
     8  import (
     9  	"context"
    10  
    11  	"github.com/SupenBysz/gf-admin-community/sys_model"
    12  	"github.com/kysion/base-library/base_model"
    13  )
    14  
    15  type (
    16  	ISysConfig interface {
    17  		// QueryList 获取列表
    18  		QueryList(ctx context.Context, params *base_model.SearchParams, isExport bool) (*sys_model.SysConfigListRes, error)
    19  		// GetByName  根据Name获取应用配置
    20  		GetByName(ctx context.Context, name string) (*sys_model.SysConfigRes, error)
    21  		// SaveConfig 保存应用配信息
    22  		SaveConfig(ctx context.Context, info *sys_model.SysConfig) (*sys_model.SysConfigRes, error)
    23  		// DeleteConfig 删除应用配置信息
    24  		DeleteConfig(ctx context.Context, name string) (bool, error)
    25  	}
    26  )
    27  
    28  var (
    29  	localSysConfig ISysConfig
    30  )
    31  
    32  func SysConfig() ISysConfig {
    33  	if localSysConfig == nil {
    34  		panic("implement not found for interface ISysConfig, forgot register?")
    35  	}
    36  	return localSysConfig
    37  }
    38  
    39  func RegisterSysConfig(i ISysConfig) {
    40  	localSysConfig = i
    41  }