Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorMiddleware ¶
func ErrorMiddleware(handler ErrorHandlerFunc) http.HandlerFunc
Types ¶
type AuthRepository ¶
type CoreHandler ¶
type CoreHandler struct { BaseURL string StorageURL string FeaturesURL string // contains filtered or unexported fields }
func NewCoreHandler ¶
func NewCoreHandler( authRepository AuthRepository, tokenGenerator TokenGenerator, BaseURL string, FeaturesURL string, StorageURL string, transactor postgresql.Transactor, validator *validator.Validate, logger *zap.Logger, ) *CoreHandler
func (*CoreHandler) Login ¶
func (c *CoreHandler) Login(w http.ResponseWriter, r *http.Request) error
Login godoc
@Summary Принимает данные пользователя для входа в систему @ID login @Tags auth @Param user_credentials body fixtures.LoginRequest true "Данные для логина" @Success 200 {object} fixtures.LoginResponse @Failure 400 {object} app_errors.AppError @Router /auth/login [post]
func (*CoreHandler) Register ¶
func (c *CoreHandler) Register(w http.ResponseWriter, r *http.Request) error
Register godoc
@Summary Принимает данные пользователя и регистрирует его @ID register @Tags auth @Param user_data body fixtures.RegisterRequest true "Данные для регистрации" @Success 204 @Failure 400 {object} app_errors.AppError @Router /auth/register [post]
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 ErrorHandlerFunc ¶
type ErrorHandlerFunc func(http.ResponseWriter, *http.Request) error
type TokenGenerator ¶
type TokenHandler ¶
type TokenHandler struct {
// contains filtered or unexported fields
}
func NewTokenHandler ¶
func NewTokenHandler(jwtSecret string) *TokenHandler
func (*TokenHandler) CreateAccessToken ¶
func (*TokenHandler) GetUserIDFromToken ¶
Click to show internal directories.
Click to hide internal directories.