repository

package
v0.0.0-...-1d93362 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 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 AdvertisementRepository

type AdvertisementRepository interface {
	Save(advertisement *entity.Advertisement) *entity.Advertisement
	Update(advertisementId uuid.UUID, advertisement *entity.Advertisement) (*entity.Advertisement, error)
	Delete(advertisementId uuid.UUID) error
	FindById(advertisementId uuid.UUID) (*entity.Advertisement, error)
	FindAll(filters *dto.AdvertisementParamsDto) ([]*entity.Advertisement, int64, error)
}

func NewAdvertisementRepository

func NewAdvertisementRepository(db *gorm.DB) AdvertisementRepository

type AdvertisementRepositoryImpl

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

func (*AdvertisementRepositoryImpl) Delete

func (r *AdvertisementRepositoryImpl) Delete(advertisementId uuid.UUID) error

func (*AdvertisementRepositoryImpl) FindAll

func (*AdvertisementRepositoryImpl) FindById

func (r *AdvertisementRepositoryImpl) FindById(advertisementId uuid.UUID) (*entity.Advertisement, error)

func (*AdvertisementRepositoryImpl) Save

func (*AdvertisementRepositoryImpl) Update

func (r *AdvertisementRepositoryImpl) Update(advertisementId uuid.UUID, updates *entity.Advertisement) (*entity.Advertisement, error)

type AuthRepository

type AuthRepository interface {
	FindUserByID(userID *uuid.UUID) (*entity.User, error)
	FindUserByEmail(email string) (*entity.User, error)
	CreateUser(user *entity.User) error
}

func NewAuthRepository

func NewAuthRepository(db *gorm.DB) AuthRepository

type AuthRepositoryImpl

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

func (*AuthRepositoryImpl) CreateUser

func (ar *AuthRepositoryImpl) CreateUser(user *entity.User) error

func (*AuthRepositoryImpl) FindUserByEmail

func (ar *AuthRepositoryImpl) FindUserByEmail(email string) (*entity.User, error)

func (*AuthRepositoryImpl) FindUserByID

func (ar *AuthRepositoryImpl) FindUserByID(userID *uuid.UUID) (*entity.User, error)

type User

type User struct {
	ID       *uuid.UUID
	Email    string
	Password string
}

Jump to

Keyboard shortcuts

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