Documentation ¶
Overview ¶
Package properties @title properties actions @host localhost:8090
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
func NewHandler(propService PropertiesService, profileService ProfileService) common.Handler
Types ¶
type Handler ¶
type Handler struct { common.BaseHandler // contains filtered or unexported fields }
func (Handler) Get ¶
Get
@Summary Get propertyGetRequest by ID @Description Get propertyGetRequest by ID @Tags properties @Accept json @Produce json @Param id path int true "propertyGetRequest ID" @Success 200 {object} common.DefaultResponse{data=propertyResponse} @Success 404 {object} common.EmptyResponse @Failure 400 {object} common.ErrorResponse @Failure 401 {object} common.ErrorResponse @Failure 403 {object} common.ErrorResponse @Failure 404 {object} common.ErrorResponse @Failure 500 {object} common.ErrorResponse @Router /v1/properties/{id} [GET]
func (Handler) List ¶
List
@Summary List properties by ids. @Description List properties by ids. @Tags properties @Accept json @Produce json @Param Search body propertyListRequest true "property list body" @Success 200 {object} common.DefaultResponse{data=[]propertyResponse} @Failure 400 {object} common.ErrorResponse @Failure 401 {object} common.ErrorResponse @Failure 403 {object} common.ErrorResponse @Failure 404 {object} common.ErrorResponse @Failure 500 {object} common.ErrorResponse @Router /v1/properties/list [POST]
type ImagesService ¶
type ImagesService interface { DeleteAll(ctx context.Context, prop *properties.Property) error DeleteOne(ctx context.Context, propertyId int, imageId string) error Save(ctx context.Context, file *multipart.FileHeader, userId, propId int) error Get(ctx context.Context, id, imgType string) (*properties.Image, *minio.Object, error) ImageTypeExists(imgType string) bool }