Documentation ¶
Index ¶
- type CommentRepo
- func (co *CommentRepo) Delete(comment models.Comment) (err error)
- func (co *CommentRepo) FindAll(photoId int) (comments []models.Comment, err error)
- func (co *CommentRepo) FindById(photoId int, commentId int) (comment models.Comment, err error)
- func (co *CommentRepo) Save(comment models.Comment) (models.Comment, error)
- func (co *CommentRepo) Update(comment models.Comment) (models.Comment, error)
- type CommentRepoInterface
- type PhotoRepo
- func (p *PhotoRepo) Delete(photo models.Photo) (err error)
- func (p *PhotoRepo) FindAll() (photos []models.Photo, err error)
- func (p *PhotoRepo) FindById(id int) (photo models.Photo, err error)
- func (p *PhotoRepo) Save(photo models.Photo) (models.Photo, error)
- func (p *PhotoRepo) Update(photo models.Photo) (models.Photo, error)
- type PhotoRepoInterface
- type SocialMediaRepo
- func (s *SocialMediaRepo) Delete(socialMedia models.SocialMedia) (err error)
- func (s *SocialMediaRepo) FindAll() (socialMedias []models.SocialMedia, err error)
- func (s *SocialMediaRepo) FindById(id int) (socialMedia models.SocialMedia, err error)
- func (s *SocialMediaRepo) Save(socialMedia models.SocialMedia) (models.SocialMedia, error)
- func (s *SocialMediaRepo) Update(socialMedia models.SocialMedia) (models.SocialMedia, error)
- type SocialMediaRepoInterface
- type UserRepo
- type UserRepoInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommentRepo ¶
type CommentRepo struct {
// contains filtered or unexported fields
}
func (*CommentRepo) FindAll ¶
func (co *CommentRepo) FindAll(photoId int) (comments []models.Comment, err error)
type CommentRepoInterface ¶
type CommentRepoInterface interface { FindAll(photoId int) (comments []models.Comment, err error) FindById(photoId int, commentId int) (comment models.Comment, err error) Save(comment models.Comment) (models.Comment, error) Update(comment models.Comment) (models.Comment, error) Delete(comment models.Comment) (err error) }
func NewCommentRepo ¶
func NewCommentRepo(db *gorm.DB) CommentRepoInterface
type PhotoRepoInterface ¶
type PhotoRepoInterface interface { FindAll() (photos []models.Photo, err error) FindById(id int) (photo models.Photo, err error) Save(photo models.Photo) (models.Photo, error) Update(photo models.Photo) (models.Photo, error) Delete(photo models.Photo) (err error) }
func NewPhotoRepo ¶
func NewPhotoRepo(db *gorm.DB) PhotoRepoInterface
type SocialMediaRepo ¶
type SocialMediaRepo struct {
// contains filtered or unexported fields
}
func (*SocialMediaRepo) Delete ¶
func (s *SocialMediaRepo) Delete(socialMedia models.SocialMedia) (err error)
func (*SocialMediaRepo) FindAll ¶
func (s *SocialMediaRepo) FindAll() (socialMedias []models.SocialMedia, err error)
func (*SocialMediaRepo) FindById ¶
func (s *SocialMediaRepo) FindById(id int) (socialMedia models.SocialMedia, err error)
func (*SocialMediaRepo) Save ¶
func (s *SocialMediaRepo) Save(socialMedia models.SocialMedia) (models.SocialMedia, error)
func (*SocialMediaRepo) Update ¶
func (s *SocialMediaRepo) Update(socialMedia models.SocialMedia) (models.SocialMedia, error)
type SocialMediaRepoInterface ¶
type SocialMediaRepoInterface interface { FindAll() (socialMedias []models.SocialMedia, err error) FindById(id int) (socialMedia models.SocialMedia, err error) Save(socialMedia models.SocialMedia) (models.SocialMedia, error) Update(socialMedia models.SocialMedia) (models.SocialMedia, error) Delete(socialMedia models.SocialMedia) (err error) }
func NewSocialMediaRepo ¶
func NewSocialMediaRepo(db *gorm.DB) SocialMediaRepoInterface
type UserRepo ¶
type UserRepo struct {
// contains filtered or unexported fields
}
func (*UserRepo) FindByEmail ¶
Click to show internal directories.
Click to hide internal directories.