profile

package
v0.0.0-rc6 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

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

func (h *Handler) CreateMasterProfile(ctx *gin.Context)

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

func (h *Handler) FindMasterProfiles(ctx *gin.Context)

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

func (h *Handler) GetMasterProfile(ctx *gin.Context)

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

func (h *Handler) UpdateMasterProfile(ctx *gin.Context)

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]

Jump to

Keyboard shortcuts

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