usecases

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: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdvertsStorageInterface

type AdvertsStorageInterface interface {
	GetAdvert(ctx context.Context, userID, advertID uint) (*models.ReturningAdvert, error)
	GetAdvertsByCity(ctx context.Context, city string, userID, startID,
		num uint) ([]*models.ReturningAdInList, error)
	GetAdvertsByCategory(ctx context.Context, category, city string, userID, startID,
		num uint) ([]*models.ReturningAdInList, error)
	GetAdvertOnlyByID(ctx context.Context, advertID uint) (*models.ReturningAdvert, error)
	SearchAdvertByTitle(ctx context.Context, title string, userID, startID,
		num uint) ([]*models.ReturningAdInList, error)
	GetSuggestions(ctx context.Context, title string, num uint) ([]string, error)
	GetPriceHistory(ctx context.Context, userID uint) ([]*models.PriceHistoryItem, error)
	CheckAdvertOwnership(ctx context.Context, advertID, userID uint) bool
	GetPaymnetUUIDList(ctx context.Context, advertID uint) (*models.PaymnetUUIDList, error)
	YuKassaUpdateDB(ctx context.Context, paymentList *models.PaymentList, advertID uint) error
	GetPromotionData(ctx context.Context, advertID uint) (*models.Promotion, error)

	CreateAdvert(ctx context.Context, files []*multipart.FileHeader,
		data models.ReceivedAdData) (*models.ReturningAdvert, error)
	EditAdvert(ctx context.Context, files []*multipart.FileHeader,
		data models.ReceivedAdData) (*models.ReturningAdvert, error)
	GetAdvertsForUserWhereStatusIs(ctx context.Context, userID, authorID, deleted,
		advertNum uint) ([]*models.ReturningAdInList, error)
	CloseAdvert(ctx context.Context, advertID uint) error
	InsertView(ctx context.Context, userID, advertID uint) error
}

Jump to

Keyboard shortcuts

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