delivery

package
v0.0.0-...-83b9238 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSocialMediaRoute

func NewSocialMediaRoute(handlers *gin.Engine, cuc models.TrackingUsecase)

func NewUserRoute

func NewUserRoute(handlers *gin.Engine, uuc models.UserUsecase)

Types

type ErrorResponse

type ErrorResponse struct {
	Error   string `json:"error" example:"error"`
	Message string `json:"message" example:"message"`
}

type Tracking

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

func (*Tracking) Delete

func (route *Tracking) Delete(c *gin.Context)

Delete godoc @Summary Delete an socialMedia @Description delete an socialMedia by ID @Tags socialMedias @Accept json @Produce json @Param id path int true "SocialMedia ID" @Success 200 {string} string @Failure 400 {object} ErrorResponse @Failure 401 {object} ErrorResponse @Failure 404 {object} ErrorResponse @Security Bearer @Router /socialMedias/{id} [delete]

func (*Tracking) Fetch

func (route *Tracking) Fetch(c *gin.Context)

? perlu melewati proses autentikasi dan autorisasi terlebih dahulu ? hanya get socialMedia sendiri? Fetch godoc @Summary Fetch socialMedias @Description get socialMedias @Tags socialMedias @Accept json @Produce json @Success 200 {object} []models.Tracking @Failure 400 {object} ErrorResponse @Failure 401 {object} ErrorResponse @Security Bearer @Router /socialMedias [get]

func (*Tracking) Store

func (route *Tracking) Store(c *gin.Context)

Store godoc @Summary Create an socialMedia @Description create and store an socialMedia @Tags socialMedias @Accept json @Produce json @Param json body models.Tracking true "SocialMedia" @Success 201 {object} models.Tracking @Failure 400 {object} ErrorResponse @Failure 401 {object} ErrorResponse @Security Bearer @Router /socialMedias [post]

func (*Tracking) Update

func (route *Tracking) Update(c *gin.Context)

Update godoc @Summary Update an socialMedia @Description update an socialMedia by ID @Tags socialMedias @Accept json @Produce json @Param id path int true "SocialMedia ID" @Success 200 {string} string @Failure 400 {object} ErrorResponse @Failure 401 {object} ErrorResponse @Failure 404 {object} ErrorResponse @Security Bearer @Router /socialMedias/{id} [put]

Jump to

Keyboard shortcuts

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