storage

package
v0.0.0-...-095c751 Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdvertStorage

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

func NewAdvertStorage

func NewAdvertStorage(pool *pgxpool.Pool, metrics *mymetrics.DatabaseMetrics) *AdvertStorage

func (*AdvertStorage) CheckAdvertOwnership

func (ads *AdvertStorage) CheckAdvertOwnership(ctx context.Context, advertID, userID uint) bool

func (*AdvertStorage) CloseAdvert

func (ads *AdvertStorage) CloseAdvert(ctx context.Context, advertID uint) error

func (*AdvertStorage) CreateAdvert

func (*AdvertStorage) EditAdvert

func (*AdvertStorage) GetAdvert

func (ads *AdvertStorage) GetAdvert(ctx context.Context, userID, advertID uint) (*models.ReturningAdvert, error)

func (*AdvertStorage) GetAdvertImagesURLs

func (ads *AdvertStorage) GetAdvertImagesURLs(ctx context.Context, advertID uint) ([]string, error)

func (*AdvertStorage) GetAdvertOnlyByID

func (ads *AdvertStorage) GetAdvertOnlyByID(ctx context.Context, advertID uint) (*models.ReturningAdvert, error)

func (*AdvertStorage) GetAdvertsByCategory

func (ads *AdvertStorage) GetAdvertsByCategory(ctx context.Context, category, city string, userID, startID,
	num uint) ([]*models.ReturningAdInList, error)

func (*AdvertStorage) GetAdvertsByCity

func (ads *AdvertStorage) GetAdvertsByCity(ctx context.Context, city string, userID, startID,
	num uint) ([]*models.ReturningAdInList, error)

func (*AdvertStorage) GetAdvertsForUserWhereStatusIs

func (ads *AdvertStorage) GetAdvertsForUserWhereStatusIs(ctx context.Context, userID, authorID,
	deleted, advertNum uint) ([]*models.ReturningAdInList, error)

func (*AdvertStorage) GetPaymnetUUIDList

func (ads *AdvertStorage) GetPaymnetUUIDList(ctx context.Context, advertID uint) (*models.PaymnetUUIDList, error)

func (*AdvertStorage) GetPriceHistory

func (ads *AdvertStorage) GetPriceHistory(ctx context.Context, userID uint) ([]*models.PriceHistoryItem, error)

func (*AdvertStorage) GetPromotionData

func (ads *AdvertStorage) GetPromotionData(ctx context.Context, advertID uint) (*models.Promotion, error)

func (*AdvertStorage) GetSuggestions

func (ads *AdvertStorage) GetSuggestions(ctx context.Context, title string, num uint) ([]string, error)

func (*AdvertStorage) InsertView

func (ads *AdvertStorage) InsertView(ctx context.Context, userID, advertID uint) error

func (*AdvertStorage) SearchAdvertByTitle

func (ads *AdvertStorage) SearchAdvertByTitle(ctx context.Context, title string, userID, startID,
	num uint) ([]*models.ReturningAdInList, error)

func (*AdvertStorage) SetAdvertImages

func (ads *AdvertStorage) SetAdvertImages(ctx context.Context, files []*multipart.FileHeader, originalImageFolderName,
	resizedImageFolderName string, advertID uint) ([]string, error)

func (*AdvertStorage) YuKassaUpdateDB

func (ads *AdvertStorage) YuKassaUpdateDB(ctx context.Context, paymentList *models.PaymentList, advertID uint) error

ПЕРЕПИСАТЬ ЧЕРЕЗ ПЕРЕСЕЧЕНИЕ МНОЖЕСТВ И BULK UPDATE

func (*AdvertStorage) YuKassaUpdateOneRecord

func (ads *AdvertStorage) YuKassaUpdateOneRecord(ctx context.Context, uuid string) error

ПЕРЕПИСАТЬ ЧЕРЕЗ ПЕРЕСЕЧЕНИЕ МНОЖЕСТВ И BULK UPDATE

Jump to

Keyboard shortcuts

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