Documentation ¶
Index ¶
- type CommentSvc
- func (co *CommentSvc) Create(commentInput models.CommentCreateInput) (comment models.Comment, err error)
- func (co *CommentSvc) Delete(commentId int) (err error)
- func (co *CommentSvc) GetAll(photoId int) (comments []models.Comment, err error)
- func (co *CommentSvc) GetOneById(photoId int, commentId int) (comment models.Comment, err error)
- func (co *CommentSvc) Update(commentInput models.CommentUpdateInput) (comment models.Comment, err error)
- type CommentSvcInterface
- type PhotoSvc
- func (p *PhotoSvc) Create(photoInput models.PhotoCreateInput, photoFileHeader *multipart.FileHeader) (photo models.Photo, err error)
- func (p *PhotoSvc) Delete(id int) (err error)
- func (p *PhotoSvc) GetAll() (photos []models.Photo, err error)
- func (p *PhotoSvc) GetOneById(id int) (photo models.Photo, err error)
- func (p *PhotoSvc) Update(photoInput models.PhotoUpdateInput, photoFileHeader *multipart.FileHeader) (photo models.Photo, err error)
- type PhotoSvcInterface
- type SocialMediaSvc
- func (s *SocialMediaSvc) Create(socialMediaInput models.SocialMediaCreateInput) (socialMedia models.SocialMedia, err error)
- func (s *SocialMediaSvc) Delete(id int) (err error)
- func (s *SocialMediaSvc) GetAll() (socialMedias []models.SocialMedia, err error)
- func (s *SocialMediaSvc) GetOneById(id int) (socialMedia models.SocialMedia, err error)
- func (s *SocialMediaSvc) Update(socialMediaInput models.SocialMediaUpdateInput) (socialMedia models.SocialMedia, err error)
- type SocialMediaSvcInterface
- type UserSvc
- type UserSvcInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommentSvc ¶
type CommentSvc struct {
// contains filtered or unexported fields
}
func (*CommentSvc) Create ¶
func (co *CommentSvc) Create(commentInput models.CommentCreateInput) (comment models.Comment, err error)
func (*CommentSvc) Delete ¶
func (co *CommentSvc) Delete(commentId int) (err error)
func (*CommentSvc) GetAll ¶
func (co *CommentSvc) GetAll(photoId int) (comments []models.Comment, err error)
func (*CommentSvc) GetOneById ¶
func (*CommentSvc) Update ¶
func (co *CommentSvc) Update(commentInput models.CommentUpdateInput) (comment models.Comment, err error)
type CommentSvcInterface ¶
type CommentSvcInterface interface { GetAll(photoId int) (comments []models.Comment, err error) GetOneById(photoId int, commentId int) (comment models.Comment, err error) Create(commentInput models.CommentCreateInput) (comment models.Comment, err error) Update(commentInput models.CommentUpdateInput) (comment models.Comment, err error) Delete(commentId int) (err error) }
func NewCommentSvc ¶
func NewCommentSvc(commentRepo repositories.CommentRepoInterface) CommentSvcInterface
type PhotoSvc ¶
type PhotoSvc struct {
// contains filtered or unexported fields
}
func (*PhotoSvc) Create ¶
func (p *PhotoSvc) Create(photoInput models.PhotoCreateInput, photoFileHeader *multipart.FileHeader) (photo models.Photo, err error)
func (*PhotoSvc) Update ¶
func (p *PhotoSvc) Update(photoInput models.PhotoUpdateInput, photoFileHeader *multipart.FileHeader) (photo models.Photo, err error)
type PhotoSvcInterface ¶
type PhotoSvcInterface interface { GetAll() (photos []models.Photo, err error) GetOneById(id int) (photo models.Photo, err error) Create(photoInput models.PhotoCreateInput, photoFileHeader *multipart.FileHeader) (photo models.Photo, err error) Update(photoInput models.PhotoUpdateInput, photoFileHeader *multipart.FileHeader) (photo models.Photo, err error) Delete(id int) (err error) }
func NewPhotoSvc ¶
func NewPhotoSvc(photoRepo repositories.PhotoRepoInterface) PhotoSvcInterface
type SocialMediaSvc ¶
type SocialMediaSvc struct {
// contains filtered or unexported fields
}
func (*SocialMediaSvc) Create ¶
func (s *SocialMediaSvc) Create(socialMediaInput models.SocialMediaCreateInput) (socialMedia models.SocialMedia, err error)
func (*SocialMediaSvc) Delete ¶
func (s *SocialMediaSvc) Delete(id int) (err error)
func (*SocialMediaSvc) GetAll ¶
func (s *SocialMediaSvc) GetAll() (socialMedias []models.SocialMedia, err error)
func (*SocialMediaSvc) GetOneById ¶
func (s *SocialMediaSvc) GetOneById(id int) (socialMedia models.SocialMedia, err error)
func (*SocialMediaSvc) Update ¶
func (s *SocialMediaSvc) Update(socialMediaInput models.SocialMediaUpdateInput) (socialMedia models.SocialMedia, err error)
type SocialMediaSvcInterface ¶
type SocialMediaSvcInterface interface { GetAll() (socialMedias []models.SocialMedia, err error) GetOneById(id int) (socialMedia models.SocialMedia, err error) Create(socialMediaInput models.SocialMediaCreateInput) (socialMedia models.SocialMedia, err error) Update(socialMediaInput models.SocialMediaUpdateInput) (socialMedia models.SocialMedia, err error) Delete(id int) (err error) }
func NewSocialMediaSvc ¶
func NewSocialMediaSvc(socialMediaRepo repositories.SocialMediaRepoInterface) SocialMediaSvcInterface
type UserSvc ¶
type UserSvc struct {
// contains filtered or unexported fields
}
type UserSvcInterface ¶
type UserSvcInterface interface { Register(userInput models.UserRegisterInput) (user models.User, err error) Login(userInput models.UserLoginInput) (token string, err error) }
func NewUserSvc ¶
func NewUserSvc(userRepo repositories.UserRepoInterface) UserSvcInterface
Click to show internal directories.
Click to hide internal directories.