repositories

package
v0.0.0-...-d702761 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

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) Delete

func (co *CommentRepo) Delete(comment models.Comment) (err error)

func (*CommentRepo) FindAll

func (co *CommentRepo) FindAll(photoId int) (comments []models.Comment, err error)

func (*CommentRepo) FindById

func (co *CommentRepo) FindById(photoId int, commentId int) (comment models.Comment, err error)

func (*CommentRepo) Save

func (co *CommentRepo) Save(comment models.Comment) (models.Comment, error)

func (*CommentRepo) Update

func (co *CommentRepo) Update(comment models.Comment) (models.Comment, 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 PhotoRepo

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

func (*PhotoRepo) Delete

func (p *PhotoRepo) Delete(photo models.Photo) (err error)

func (*PhotoRepo) FindAll

func (p *PhotoRepo) FindAll() (photos []models.Photo, err error)

func (*PhotoRepo) FindById

func (p *PhotoRepo) FindById(id int) (photo models.Photo, err error)

func (*PhotoRepo) Save

func (p *PhotoRepo) Save(photo models.Photo) (models.Photo, error)

func (*PhotoRepo) Update

func (p *PhotoRepo) Update(photo models.Photo) (models.Photo, error)

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

func (u *UserRepo) FindByEmail(user models.User) (models.User, error)

func (*UserRepo) Save

func (u *UserRepo) Save(user models.User) (models.User, error)

type UserRepoInterface

type UserRepoInterface interface {
	Save(user models.User) (models.User, error)
	FindByEmail(user models.User) (models.User, error)
}

func NewUserRepo

func NewUserRepo(db *gorm.DB) UserRepoInterface

Jump to

Keyboard shortcuts

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