services

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: 7 Imported by: 0

Documentation

Index

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 (co *CommentSvc) GetOneById(photoId int, commentId int) (comment models.Comment, err error)

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

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

func (p *PhotoSvc) Delete(id int) (err error)

func (*PhotoSvc) GetAll

func (p *PhotoSvc) GetAll() (photos []models.Photo, err error)

func (*PhotoSvc) GetOneById

func (p *PhotoSvc) GetOneById(id int) (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)
}

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

type UserSvc

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

func (*UserSvc) Login

func (u *UserSvc) Login(userInput models.UserLoginInput) (token string, err error)

func (*UserSvc) Register

func (u *UserSvc) Register(userInput models.UserRegisterInput) (user models.User, err error)

type UserSvcInterface

type UserSvcInterface interface {
	Register(userInput models.UserRegisterInput) (user models.User, err error)
	Login(userInput models.UserLoginInput) (token string, err error)
}

Jump to

Keyboard shortcuts

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