sys_config.go 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // ================================================================================
  2. // Code generated by GoFrame CLI tool. DO NOT EDIT.
  3. // You can delete these comments if you wish manually maintain this interface file.
  4. // ================================================================================
  5. package service
  6. import (
  7. "context"
  8. "github.com/tiger1103/gfast/v3/api/v1/system"
  9. "github.com/tiger1103/gfast/v3/internal/app/common/model/entity"
  10. )
  11. type ISysConfig interface {
  12. List(ctx context.Context, req *system.ConfigSearchReq) (res *system.ConfigSearchRes, err error)
  13. Add(ctx context.Context, req *system.ConfigAddReq, userId uint64) (err error)
  14. CheckConfigKeyUnique(ctx context.Context, configKey string, configId ...int64) (err error)
  15. Get(ctx context.Context, id int) (res *system.ConfigGetRes, err error)
  16. Edit(ctx context.Context, req *system.ConfigEditReq, userId uint64) (err error)
  17. Delete(ctx context.Context, ids []int) (err error)
  18. GetConfigByKey(ctx context.Context, key string) (config *entity.SysConfig, err error)
  19. GetByKey(ctx context.Context, key string) (config *entity.SysConfig, err error)
  20. }
  21. var localSysConfig ISysConfig
  22. func SysConfig() ISysConfig {
  23. if localSysConfig == nil {
  24. panic("implement not found for interface ISysConfig, forgot register?")
  25. }
  26. return localSysConfig
  27. }
  28. func RegisterSysConfig(i ISysConfig) {
  29. localSysConfig = i
  30. }