properties

package
v0.0.0-...-946fd12 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: MIT Imports: 12 Imported by: 0

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) AddRoutes

func (t Handler) AddRoutes(e *echo.Group, m ...echo.MiddlewareFunc)

func (Handler) Get

func (t Handler) Get(ctx echo.Context) error

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

func (t Handler) List(ctx echo.Context) error

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
}

type ProfileService

type ProfileService interface {
	GetProfile(ctx context.Context, userID int) (*domain.User, error)
}

type PropertiesService

type PropertiesService interface {
	Get(ctx context.Context, id int) (*properties.Property, error)
	List(ctx context.Context, ids []int) ([]properties.Property, error)
}

type SimilarPropertiesService

type SimilarPropertiesService interface {
	Get(ctx context.Context, id int) (*properties.Property, error)
	List(ctx context.Context, ids []int) ([]properties.Property, error)
}

Jump to

Keyboard shortcuts

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