Documentation
¶
Index ¶
- Variables
- type Handler
- type Repository
- func (rpo *Repository) GetUserByEmail(ctx context.Context, tx *sql.Tx, email string) (*model.User, error)
- func (rpo *Repository) GetUserByID(ctx context.Context, tx *sql.Tx, id string) (*model.User, error)
- func (rpo *Repository) GetUserByUsername(ctx context.Context, tx *sql.Tx, username string) (*model.User, error)
- func (rpo *Repository) SaveUser(ctx context.Context, tx *sql.Tx, data *model.User)
- func (rpo *Repository) UpdateProfilePhotoUser(ctx context.Context, tx *sql.Tx, data *model.User)
- func (rpo *Repository) UpdateUser(ctx context.Context, tx *sql.Tx, data *model.User)
- type Router
- type Service
- func (svc *Service) GetUserByEmail(ctx context.Context, email string) model.UserResponse
- func (svc *Service) GetUserByID(ctx context.Context, id string) model.UserResponse
- func (svc *Service) GetUserByUsername(ctx context.Context, username string) model.UserResponse
- func (svc *Service) SaveUser(ctx context.Context, request *model.SaveRequestUser) model.UserResponse
- func (svc *Service) UpdateProfilePhotoUser(ctx context.Context, fileName string, claims jwt.MapClaims) model.UserResponse
- func (svc *Service) UpdateUser(ctx context.Context, request *model.UpdateRequestUser, claims jwt.MapClaims) model.UserResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ProviderSet = wire.NewSet( ProvideRoute, ProvideHandler, ProvideService, ProvideRepository, wire.Bind(new(model.UserHandler), new(*Handler)), wire.Bind(new(model.UserService), new(*Service)), wire.Bind(new(model.UserRepository), new(*Repository)), ) )
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func ProvideHandler ¶
func ProvideHandler(svc model.UserService, validate *validator.Validate) *Handler
func (*Handler) GetUserByToken ¶
func (hdl *Handler) GetUserByToken() http.HandlerFunc
func (*Handler) GetUserPhotoProfile ¶
func (hdl *Handler) GetUserPhotoProfile() http.HandlerFunc
func (*Handler) SaveUser ¶
func (hdl *Handler) SaveUser() http.HandlerFunc
func (*Handler) UpdateProfilePhotoUser ¶
func (hdl *Handler) UpdateProfilePhotoUser() http.HandlerFunc
func (*Handler) UpdateUser ¶
func (hdl *Handler) UpdateUser() http.HandlerFunc
type Repository ¶
type Repository struct{}
func ProvideRepository ¶
func ProvideRepository() *Repository
func (*Repository) GetUserByEmail ¶
func (*Repository) GetUserByID ¶
func (*Repository) GetUserByUsername ¶
func (*Repository) UpdateProfilePhotoUser ¶
func (*Repository) UpdateUser ¶
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func ProvideRoute ¶
func ProvideRoute(hdl model.UserHandler) *Router
func (*Router) InitializeRoutes ¶
func (router *Router) InitializeRoutes(route chi.Router)
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func ProvideService ¶
func ProvideService(rpo model.UserRepository, db *sql.DB) *Service
func (*Service) GetUserByEmail ¶
func (*Service) GetUserByID ¶
func (*Service) GetUserByUsername ¶
func (*Service) SaveUser ¶
func (svc *Service) SaveUser(ctx context.Context, request *model.SaveRequestUser) model.UserResponse
func (*Service) UpdateProfilePhotoUser ¶
func (*Service) UpdateUser ¶
func (svc *Service) UpdateUser(ctx context.Context, request *model.UpdateRequestUser, claims jwt.MapClaims) model.UserResponse
Click to show internal directories.
Click to hide internal directories.