sqlite

package
v0.0.0-...-a096607 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

Storage на базе SQLite предназначен для разработки и тестирования работы алгоритма ротации баннеров.

func NewSQLiteStorage

func NewSQLiteStorage(pathToDB string) (*Storage, error)

func (*Storage) Banner

func (s *Storage) Banner(ctx context.Context, slotID, groupID int) (int, error)

func (*Storage) BannerOff

func (s *Storage) BannerOff(ctx context.Context, slotID, bannerID int) error

func (*Storage) BannerOn

func (s *Storage) BannerOn(ctx context.Context, slotID, bannerID int) error

func (*Storage) Close

func (s *Storage) Close() error

func (*Storage) Connect

func (s *Storage) Connect(ctx context.Context) error

func (*Storage) IncClickCount

func (s *Storage) IncClickCount(ctx context.Context, slotID, bannerID, groupID int) error

func (*Storage) IncViewCount

func (s *Storage) IncViewCount(ctx context.Context, slotID, bannerID, groupID int) error

func (*Storage) Stats

func (s *Storage) Stats(ctx context.Context, slotID, groupID int) (storage.Stats, error)

Jump to

Keyboard shortcuts

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