handlers

package
v0.0.0-...-ce453ac Latest Latest
Warning

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

Go to latest
Published: May 25, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorMiddleware

func ErrorMiddleware(handler ErrorHandlerFunc) http.HandlerFunc

func InitRequestID

func InitRequestID(next http.Handler) http.Handler

Types

type CoreHandler

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

func NewCoreHandler

func NewCoreHandler(
	dataRepository DataRepository,
	storageHandlerURL string,
	transactor postgresql.Transactor,
	validator *validator.Validate,
	logger *zap.Logger,
) *CoreHandler

func (*CoreHandler) Router

func (c *CoreHandler) Router() chi.Router

func (*CoreHandler) SaveVideoFeatures

func (c *CoreHandler) SaveVideoFeatures(w http.ResponseWriter, r *http.Request) error

SaveVideoFeatures godoc

@Summary	Принимает csv файл с фичами из видео
@ID			save csv
@Tags		Save CSV
@Param		file	formData	file	true	"Загружаемый csv"
@Success	204
@Failure	400	{object}	app_errors.AppError
@Router		/face_model/save_features [post]

type DataRepository

type DataRepository interface {
	SaveFaceVideoFeatures(ctx context.Context, file multipart.File) (uint64, error)
}

type ErrorHandlerFunc

type ErrorHandlerFunc func(http.ResponseWriter, *http.Request) error

type IncreaseFeaturesRequest

type IncreaseFeaturesRequest struct {
	ModelType     string `json:"model_type"  validate:"required"`
	UserID        string `json:"user_id"  validate:"required"`
	FeaturesCount int    `json:"features_count"  validate:"required"`
}

Jump to

Keyboard shortcuts

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