base

package
v0.0.0-...-f828163 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteSocial

func DeleteSocial(db *gorm.DB, id uuid.UUID) error

func GetSocial

func GetSocial(db *gorm.DB, id uuid.UUID) (*models.Social, error)

func GetSocials

func GetSocials(db *gorm.DB, pageInfo fiberpaginate.PageInfo) ([]models.Social, error)

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

Jump to

Keyboard shortcuts

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