Documentation
¶
Index ¶
- func NewRepository(dbExecutor db.DBTX, logger *zerolog.Logger) *repository
- func Routes(h *Handler, authMW *middle.AuthMiddleware) chi.Router
- type CreateUserCmd
- type GetProfileResponse
- type Handler
- type LogInRequest
- type LogInResponse
- type LogInUserCmd
- type LogInUserResult
- type RegisterRequest
- type RegisterResponse
- type Service
- func (s *Service) GetProfile(ctx context.Context, userId uuid.UUID) (User, error)
- func (s *Service) GetUserByID(ctx context.Context, userID uuid.UUID) (User, error)
- func (s *Service) IncrementMonitorCount(ctx context.Context, userID uuid.UUID) error
- func (s *Service) LogIn(ctx context.Context, data LogInUserCmd) (LogInUserResult, error)
- func (s *Service) Register(ctx context.Context, data CreateUserCmd) (uuid.UUID, error)
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateUserCmd ¶
type GetProfileResponse ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) GetProfile ¶
func (h *Handler) GetProfile(w http.ResponseWriter, r *http.Request)
type LogInRequest ¶
type LogInResponse ¶
type LogInUserCmd ¶
type LogInUserResult ¶
type RegisterRequest ¶
type RegisterResponse ¶
type RegisterResponse struct {
UserID string `json:"user_id"`
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(repo *repository, tokenSvc *security.TokenService) *Service
func (*Service) GetProfile ¶
func (*Service) GetUserByID ¶
func (*Service) IncrementMonitorCount ¶
func (*Service) LogIn ¶
func (s *Service) LogIn(ctx context.Context, data LogInUserCmd) (LogInUserResult, error)
Click to show internal directories.
Click to hide internal directories.