ads

package
v1.21.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2026 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package ads implements the ads subdomain of the support module. Only the module facade (internal/module/support) may reach it.

Index

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

func (s *Service) Create(ctx context.Context, req *dto.CreateAdsRequest) error

Create stores a new ad; the request carries its schedule in Unix milliseconds.

func (*Service) Delete

func (s *Service) Delete(ctx context.Context, req *dto.DeleteAdsRequest) error

Delete removes an ad.

func (*Service) GetDetail

func (s *Service) GetDetail(ctx context.Context, req *dto.GetAdsDetailRequest) (*dto.Ads, error)

GetDetail returns an ad.

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

List pages the ads for the admin panel.

func (*Service) Update

func (s *Service) Update(ctx context.Context, req *dto.UpdateAdsRequest) error

Update overwrites an ad with the request; the request carries its schedule in Unix milliseconds.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL