Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateParams ¶
type FullUpdateParams ¶
type Repository ¶
type Repository interface { Create(params *CreateParams) (models.Pin, error) Get(id int) (models.Pin, error) ListByAuthor(userId int, page, limit int) ([]models.Pin, error) List(page, limit int) ([]models.Pin, error) ListLiked(userID int, page, limit int) ([]models.Pin, error) ListWithLikedField(userID int, page, limit int) ([]models.Pin, error) FullUpdate(params *FullUpdateParams) (models.Pin, error) Delete(id int) error IsLikedByUser(pinId, userId int) (bool, error) CheckWriteAccess(userId, pinId string) (bool, error) CheckReadAccess(userId, pinId string) (bool, error) }
type Service ¶
type Service interface { Create(params *CreateParams) (models.Pin, error) Get(id, userId int) (models.Pin, error) ListByAuthor(authorId, userId, page, limit int) ([]models.Pin, error) List(authorized bool, userId int, liked bool, page, limit int) ([]models.Pin, error) FullUpdate(params *FullUpdateParams) (models.Pin, error) Delete(id int) error SetLikedField(pin *models.Pin, userId int) error CheckWriteAccess(userId, pinId string) (bool, error) CheckReadAccess(userId, pinId string) (bool, error) }
Click to show internal directories.
Click to hide internal directories.