getcachelogic.go 717 B

1234567891011121314151617181920212223242526272829303132333435
  1. // Code scaffolded by goctl. Safe to edit.
  2. // goctl 1.10.2
  3. package custompage
  4. import (
  5. "context"
  6. pagecache "udeServer/internal/custompage"
  7. "udeServer/internal/svc"
  8. "udeServer/internal/types"
  9. "github.com/zeromicro/go-zero/core/logx"
  10. )
  11. type GetCacheLogic struct {
  12. logx.Logger
  13. ctx context.Context
  14. svcCtx *svc.ServiceContext
  15. }
  16. // 获取自定义页面信息
  17. func NewGetCacheLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetCacheLogic {
  18. return &GetCacheLogic{
  19. Logger: logx.WithContext(ctx),
  20. ctx: ctx,
  21. svcCtx: svcCtx,
  22. }
  23. }
  24. func (l *GetCacheLogic) GetCache() (*types.GetCacheResp, error) {
  25. name, logo := pagecache.GetCache()
  26. return &types.GetCacheResp{Name: name, Logo: logo}, nil
  27. }