repository

package
v0.0.0-...-8d2d31d Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CartRedisRepository

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

func CreateRedisRepository

func CreateRedisRepository(cfg config.Config) CartRedisRepository

func (*CartRedisRepository) Add

func (r *CartRedisRepository) Add(ctx context.Context,
	userId uuid.UUID, postId uuid.UUID) (int, error)

func (*CartRedisRepository) GetUUID

func (r *CartRedisRepository) GetUUID(ctx context.Context,
	userId uuid.UUID) ([]uuid.UUID, int, error)

func (*CartRedisRepository) Remove

func (r *CartRedisRepository) Remove(ctx context.Context,
	userId uuid.UUID, postId uuid.UUID) (int, error)

type PostPostgressRepository

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

func CreatePostgressRepository

func CreatePostgressRepository(cfg config.Config) PostPostgressRepository

func (*PostPostgressRepository) AddFavorite

func (t *PostPostgressRepository) AddFavorite(ctx context.Context, userId uuid.UUID,
	postId uuid.UUID) (int, error)

func (*PostPostgressRepository) Create

func (t *PostPostgressRepository) Create(ctx context.Context,
	post domain.Post) (int, error)

func (*PostPostgressRepository) Delete

func (t *PostPostgressRepository) Delete(ctx context.Context,
	id uuid.UUID) (int, error)

func (PostPostgressRepository) GetCart

func (t PostPostgressRepository) GetCart(ctx context.Context,
	postId []uuid.UUID) ([]domain.Post, int, error)

func (PostPostgressRepository) GetFavorite

func (t PostPostgressRepository) GetFavorite(ctx context.Context,
	userId uuid.UUID) ([]uuid.UUID, int, error)

func (PostPostgressRepository) GetIdPost

func (t PostPostgressRepository) GetIdPost(ctx context.Context,
	id uuid.UUID) (*domain.Post, int, error)

func (PostPostgressRepository) GetMiniPostSortNew

func (t PostPostgressRepository) GetMiniPostSortNew(ctx context.Context,
	par domain.Parameters) ([]domain.Post, int, error)

func (*PostPostgressRepository) RemoveFavorite

func (t *PostPostgressRepository) RemoveFavorite(ctx context.Context, userId uuid.UUID,
	postId uuid.UUID) (int, error)

func (PostPostgressRepository) SearchPost

func (t PostPostgressRepository) SearchPost(ctx context.Context,
	search string) ([]uuid.UUID, int, error)

func (*PostPostgressRepository) Update

func (t *PostPostgressRepository) Update(ctx context.Context,
	post domain.Post) (int, error)

Jump to

Keyboard shortcuts

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