likes

package
v0.0.0-...-1967991 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2023 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	Service Service
}

func (Controller) ListRoutes

func (controller Controller) ListRoutes() []route.Route

type Dao

type Dao interface {
	LikePhoto(photoUuid uuid.UUID, userUuid uuid.UUID) (bool, error)
	UnlikePhoto(photoUuid uuid.UUID, userUuid uuid.UUID) (bool, error)
}

type DbDao

type DbDao struct {
	Db database.AppDatabase
}

func (DbDao) LikePhoto

func (db DbDao) LikePhoto(photoUuid uuid.UUID, userUuid uuid.UUID) (bool, error)

func (DbDao) UnlikePhoto

func (db DbDao) UnlikePhoto(photoUuid uuid.UUID, userUuid uuid.UUID) (bool, error)

type Service

type Service interface {
	LikePhoto(photoId string, userId string) error
	UnlikePhoto(photoId string, userId string) error
}

type ServiceImpl

type ServiceImpl struct {
	Db           Dao
	BanService   user.BanService
	PhotoService photo.Service
}

func (ServiceImpl) LikePhoto

func (service ServiceImpl) LikePhoto(photoId string, userId string) error

func (ServiceImpl) UnlikePhoto

func (service ServiceImpl) UnlikePhoto(photoId string, userId string) error

Jump to

Keyboard shortcuts

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