banner.go 916 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. package v1
  2. import (
  3. "context"
  4. v1pb "go-common/app/admin/live/live-admin/api/http/v1"
  5. "go-common/app/admin/live/live-admin/conf"
  6. )
  7. // BannerService struct
  8. type BannerService struct {
  9. conf *conf.Config
  10. // optionally add other properties here, such as dao
  11. // dao *dao.Dao
  12. }
  13. //NewBannerService init
  14. func NewBannerService(c *conf.Config) (s *BannerService) {
  15. s = &BannerService{
  16. conf: c,
  17. }
  18. return s
  19. }
  20. // GetBlinkBanner implementation
  21. // 获取有效banner配置
  22. // `method:"GET" internal:"true" `
  23. func (s *BannerService) GetBlinkBanner(ctx context.Context, req *v1pb.GetInfoReq) (resp *v1pb.GetInfoResp, err error) {
  24. resp = &v1pb.GetInfoResp{}
  25. return
  26. }
  27. // GetBanner implementation
  28. // 获取有效banner配置
  29. // `method:"GET" internal:"true" `
  30. func (s *BannerService) GetBanner(ctx context.Context, req *v1pb.GetBannerReq) (resp *v1pb.GetBannerResp, err error) {
  31. resp = &v1pb.GetBannerResp{}
  32. return
  33. }