Documentation ¶
Index ¶
- func DeleteSocial(db *gorm.DB, id uuid.UUID) error
- func GetSocial(db *gorm.DB, id uuid.UUID) (*models.Social, error)
- func GetSocials(db *gorm.DB, pageInfo fiberpaginate.PageInfo) ([]models.Social, error)
- func Social(socialParams types.RouteParams)
- type SocialController
- type SocialService
- type SocialServiceInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSocials ¶
func Social ¶
func Social(socialParams types.RouteParams)
Types ¶
type SocialController ¶
type SocialController struct {
// contains filtered or unexported fields
}
func NewSocialController ¶
func NewSocialController(socialService SocialServiceInterface) *SocialController
func (*SocialController) DeleteSocial ¶
func (co *SocialController) DeleteSocial(c *fiber.Ctx) error
DeleteSocial godoc
@Summary Deletes a social @Description Deletes a social @ID delete-social @Tags social @Accept json @Produce json @Param socialID path string true "Social ID" @Success 201 {object} models.Social @Failure 400 {string} error @Failure 404 {string} error @Failure 500 {string} error @Router /socials/{socialID}/ [delete]
func (*SocialController) GetSocial ¶
func (co *SocialController) GetSocial(c *fiber.Ctx) error
GetSocial godoc
@Summary Retrieves a social @Description Retrieves a social by id @ID get-social @Tags social @Accept json @Produce json @Param socialID path string true "Social ID" @Success 201 {object} models.Social @Failure 400 {string} error @Failure 404 {string} error @Failure 500 {string} error @Router /socials/{socialID}/ [get]
func (*SocialController) GetSocials ¶
func (co *SocialController) GetSocials(c *fiber.Ctx) error
GetSocials godoc
@Summary Retrieve all socials @Description Retrieves all socials @ID get-socials @Tags social @Produce json @Param limit query int false "Limit" @Param page query int false "Page" @Success 200 {object} []models.Social @Failure 400 {string} error @Failure 404 {string} error @Failure 500 {string} error @Router /socials/ [get]
type SocialService ¶
type SocialService struct {
types.ServiceParams
}
func (*SocialService) DeleteSocial ¶
func (c *SocialService) DeleteSocial(socialID string) error
func (*SocialService) GetSocial ¶
func (c *SocialService) GetSocial(socialID string) (*models.Social, error)
func (*SocialService) GetSocials ¶
func (c *SocialService) GetSocials(pageInfo fiberpaginate.PageInfo) ([]models.Social, error)
type SocialServiceInterface ¶
type SocialServiceInterface interface { GetSocials(pageInfo fiberpaginate.PageInfo) ([]models.Social, error) GetSocial(socialID string) (*models.Social, error) DeleteSocial(socialID string) error }
func NewSocialService ¶
func NewSocialService(serviceParams types.ServiceParams) SocialServiceInterface