banner

package
v0.0.0-...-60a9aaa Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Banner struct {
	Ctx    context.Context
	Repo   repository.Repository
	Config *config.Config
	Cache  *cache.BannerCache
}

func NewBanner

func NewBanner(ctx context.Context, repo repository.Repository, conf *config.Config, cache *cache.BannerCache) *Banner

func (*Banner) Create

func (b *Banner) Create(req *models.Banner) error

func (*Banner) Delete

func (b *Banner) Delete(bannerID int) error

func (*Banner) GetForAdmin

func (b *Banner) GetForAdmin(req *models.Banner, limit, offset int) ([]*models.Banner, error)

func (*Banner) GetForUser

func (b *Banner) GetForUser(req *models.Banner) (*models.Content, error)

func (*Banner) GetForUserLatest

func (b *Banner) GetForUserLatest(req *models.Banner) (*models.Content, error)

func (*Banner) SetVersionActive

func (b *Banner) SetVersionActive(bannerID, version int) error

func (*Banner) Update

func (b *Banner) Update(req *models.Banner) error

Jump to

Keyboard shortcuts

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