Documentation ¶
Index ¶
- type Comment
- type CommentIdWithAuthorAndPhoto
- type Controller
- type Dao
- type DbDao
- func (db DbDao) CreateComment(newComment entityComment) error
- func (db DbDao) DeleteByIdPhotoAndAuthor(commentUuid uuid.UUID, photoUuid uuid.UUID, userUuid uuid.UUID) (bool, error)
- func (db DbDao) GetCommentByIdAs(commentId uuid.UUID, userId uuid.UUID) (*EntityCommentWithCustom, error)
- func (db DbDao) GetCommentInfoIds(commentUuid uuid.UUID) (*CommentIdWithAuthorAndPhoto, error)
- func (db DbDao) GetCommentsAfter(photoUuid uuid.UUID, userUuid uuid.UUID, afterComment uuid.UUID, ...) ([]EntityCommentWithCustom, error)
- type EntityCommentWithCustom
- type Service
- type ServiceImpl
- func (service ServiceImpl) CommentPhoto(photoId string, userId string, comment newComment) (Comment, error)
- func (service ServiceImpl) DeleteCommentOnPhotoIfAuthor(commentId string, photoId string, userId string) error
- func (service ServiceImpl) GetCommentsPageAs(photoId string, userId string, pageCursor string) ([]Comment, *string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommentIdWithAuthorAndPhoto ¶
type CommentIdWithAuthorAndPhoto struct { CommentId []byte `json:"commentId"` CommentAuthorId []byte `json:"commentAuthorId"` PhotoId []byte `json:"photoId"` PhotoAuthorId []byte `json:"photoAuthorId"` }
CommentIdWithAuthorAndPhoto is a simple view with just the IDs
type Controller ¶
type Controller struct {
Service Service
}
func (Controller) ListRoutes ¶
func (controller Controller) ListRoutes() []route.Route
type Dao ¶
type Dao interface { CreateComment(newComment entityComment) error GetCommentByIdAs(commentId uuid.UUID, userId uuid.UUID) (*EntityCommentWithCustom, error) DeleteByIdPhotoAndAuthor(commentUuid uuid.UUID, photoUuid uuid.UUID, userUuid uuid.UUID) (bool, error) GetCommentInfoIds(commentUuid uuid.UUID) (*CommentIdWithAuthorAndPhoto, error) GetCommentsAfter(photoUuid uuid.UUID, userUuid uuid.UUID, afterComment uuid.UUID, beforeDate string) ([]EntityCommentWithCustom, error) }
type DbDao ¶
type DbDao struct {
Db database.AppDatabase
}
func (DbDao) CreateComment ¶
func (DbDao) DeleteByIdPhotoAndAuthor ¶
func (DbDao) GetCommentByIdAs ¶
func (DbDao) GetCommentInfoIds ¶
func (db DbDao) GetCommentInfoIds(commentUuid uuid.UUID) (*CommentIdWithAuthorAndPhoto, error)
type EntityCommentWithCustom ¶
type EntityCommentWithCustom struct { user.ModelUserWithCustom // contains filtered or unexported fields }
type ServiceImpl ¶
type ServiceImpl struct { Db Dao BanService user.BanService PhotoService photo.Service TimeProvider timeprovider.TimeProvider }
func (ServiceImpl) CommentPhoto ¶
func (service ServiceImpl) CommentPhoto(photoId string, userId string, comment newComment) (Comment, error)
func (ServiceImpl) DeleteCommentOnPhotoIfAuthor ¶
func (service ServiceImpl) DeleteCommentOnPhotoIfAuthor(commentId string, photoId string, userId string) error
func (ServiceImpl) GetCommentsPageAs ¶
Click to show internal directories.
Click to hide internal directories.