Documentation ¶
Index ¶
- type Handler
- func (h *Handler) CreateMasterProfile(ctx *gin.Context)
- func (h *Handler) FindMasterProfiles(ctx *gin.Context)
- func (h *Handler) GetMasterProfile(ctx *gin.Context)
- func (h *Handler) RegisterRoutes(router *gin.Engine, middlewares handler.RouteMiddlewares)
- func (h *Handler) UpdateMasterProfile(ctx *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(svc service.MasterProfileService) *Handler
func (*Handler) CreateMasterProfile ¶
CreateMasterProfile godoc
@Id CreateMasterProfile @Summary Create master profile @Description Request for creating master profile. User must be logged in. In response will be returned created master profile. @Security BearerAuth @Tags Master Profile API @Accept json @Produce json @Param body body dto.CreateMasterProfileInput true "Create master profile request body" @Success 201 {object} dto.OwnMasterProfileOutput "Created master profile" @Failure 400 {object} dto.ErrorResponse "Validation error" @Failure 401 {object} dto.ErrorResponse "Unauthorized error" @Failure 404 {object} dto.ErrorResponse "Master profile not found" @Failure 404 {object} dto.ErrorResponse "User not found" @Failure 409 {object} dto.ErrorResponse "Master profile already exists" @Failure 500 {object} dto.ErrorResponse "Internal server error" @Router /v0/masters/profile [post]
func (*Handler) FindMasterProfiles ¶
FindMasterProfiles godoc
@Id FindMasterProfiles @Summary Find master profiles @Description Request for finding master profiles. User must be logged in. In response will be returned found master profiles. @Security BearerAuth @Tags Master Profile API @Accept json @Produce json @Param input query dto.FindMasterProfilesInput true "Query parameters for finding master profiles" @Success 200 {object} dto.MasterProfilesOutput "Found master profiles" @Failure 400 {object} dto.ErrorResponse "Validation error" @Failure 401 {object} dto.ErrorResponse "Unauthorized error" @Failure 404 {object} dto.ErrorResponse "Master profile not found" @Failure 500 {object} dto.ErrorResponse "Internal server error" @Router /v0/masters/profile [get]
func (*Handler) GetMasterProfile ¶
GetMasterProfile godoc
@Id GetMasterProfile @Summary Get master profile @Description Request for getting master profile. User must be logged in. In response will be returned found master profile. @Security BearerAuth @Tags Master Profile API @Accept json @Produce json @Param username path string true "Username" @Success 200 {object} dto.MasterProfileOutput "Found master profile" @Success 200 {object} dto.OwnMasterProfileOutput "Found own master profile" @Failure 401 {object} dto.ErrorResponse "Unauthorized error" @Failure 404 {object} dto.ErrorResponse "Master profile not found" @Failure 404 {object} dto.ErrorResponse "User not found" @Failure 500 {object} dto.ErrorResponse "Internal server error" @Router /v0/masters/profile/{username} [get]
func (*Handler) RegisterRoutes ¶
func (h *Handler) RegisterRoutes(router *gin.Engine, middlewares handler.RouteMiddlewares)
func (*Handler) UpdateMasterProfile ¶
UpdateMasterProfile godoc
@Id UpdateMasterProfile @Summary Update master profile @Description Request for updating master profile. User must be logged in. In response will be returned updated master profile. @Security BearerAuth @Tags Master Profile API @Accept json @Produce json @Param body body dto.UpdateMasterProfileInput true "Update master profile request body" @Success 200 {object} dto.OwnMasterProfileOutput "Updated master profile" @Failure 400 {object} dto.ErrorResponse "Validation error" @Failure 401 {object} dto.ErrorResponse "Unauthorized error" @Failure 403 {object} dto.ErrorResponse "User is blocked or deleted" @Failure 404 {object} dto.ErrorResponse "Master profile not found" @Failure 500 {object} dto.ErrorResponse "Internal server error" @Router /v0/masters/profile [patch]
Click to show internal directories.
Click to hide internal directories.