Documentation
¶
Overview ¶
Package ads implements the ads subdomain of the support module. Only the module facade (internal/module/support) may reach it.
Index ¶
- type Service
- func (s *Service) Create(ctx context.Context, req *dto.CreateAdsRequest) error
- func (s *Service) Delete(ctx context.Context, req *dto.DeleteAdsRequest) error
- func (s *Service) GetDetail(ctx context.Context, req *dto.GetAdsDetailRequest) (*dto.Ads, error)
- func (s *Service) GetPublicAds(ctx context.Context, _ *dto.GetAdsRequest) (*dto.GetAdsResponse, error)
- func (s *Service) List(ctx context.Context, req *dto.GetAdsListRequest) (*dto.GetAdsListResponse, error)
- func (s *Service) Update(ctx context.Context, req *dto.UpdateAdsRequest) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service manages the ads for the support facade.
func NewService ¶
func NewService(repo repository.AdsRepo) *Service
NewService builds the ads service on the ads repository.
func (*Service) Create ¶
Create stores a new ad; the request carries its schedule in Unix milliseconds.
func (*Service) GetPublicAds ¶
func (s *Service) GetPublicAds(ctx context.Context, _ *dto.GetAdsRequest) (*dto.GetAdsResponse, error)
GetPublicAds lists the ads for the public site: enabled and inside their schedule, so a scheduled ad does not show early and an expired one stops. The request's device and position are not filtered on yet.
func (*Service) List ¶
func (s *Service) List(ctx context.Context, req *dto.GetAdsListRequest) (*dto.GetAdsListResponse, error)
List pages the ads for the admin panel.
Click to show internal directories.
Click to hide internal directories.