Documentation
¶
Index ¶
- type Handler
- func (h *Handler) Delete(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetAll(w http.ResponseWriter, r *http.Request)
- func (h *Handler) LoadNoti(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Register(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Routes() []router.Route
- func (h *Handler) Update(w http.ResponseWriter, r *http.Request)
- type MongoDBRepository
- func (r *MongoDBRepository) CheckUserEnrolled(ctx context.Context, idUser string, idCom string) (string, error)
- func (r *MongoDBRepository) Create(ctx context.Context, user *types.User) error
- func (r *MongoDBRepository) Delete(ctx context.Context, id string) error
- func (r *MongoDBRepository) EnrollUser(ctx context.Context, idUser string, idCom string) error
- func (r *MongoDBRepository) FindAll(context.Context) ([]*types.User, error)
- func (r *MongoDBRepository) FindUserByMail(ctx context.Context, email string) (*types.User, error)
- func (r *MongoDBRepository) GetMods(ctx context.Context, listID []string) ([]*types.User, error)
- func (r *MongoDBRepository) GetUsersCommunity(ctx context.Context, idCom string) ([]*types.User, error)
- func (r *MongoDBRepository) UpdateInfo(ctx context.Context, userID string, user *types.User) error
- type NotiService
- type PolicyService
- type Service
- func (s *Service) Auth(ctx context.Context, email, password string) (*types.User, error)
- func (s *Service) CheckUserEnrolled(ctx context.Context, idUser string, idCom string) (string, error)
- func (s *Service) Delete(ctx context.Context, userID string) error
- func (s *Service) EnrollUser(ctx context.Context, idCom, idUser string) error
- func (s *Service) FindAll(ctx context.Context) ([]*types.User, error)
- func (s *Service) GetMods(ctx context.Context, listID []string) ([]*types.User, error)
- func (s *Service) GetUsersCommunity(ctx context.Context, idCom string) ([]*types.User, error)
- func (s *Service) LoadNotification(ctx context.Context, ID string) ([]*types.PushNotification, error)
- func (s *Service) Register(ctx context.Context, req *types.RegisterRequest) (*types.User, error)
- func (s *Service) SearchUser(ctx context.Context, req *types.User) (*types.User, error)
- func (s *Service) Update(ctx context.Context, userID string, user *types.User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
Svc service
}
func NewHandler ¶
func NewHandler(svc service) *Handler
type MongoDBRepository ¶
type MongoDBRepository struct {
// contains filtered or unexported fields
}
func NewMongoDBRepo ¶
func NewMongoDBRepo(session *mgo.Session) *MongoDBRepository
func (*MongoDBRepository) CheckUserEnrolled ¶
func (*MongoDBRepository) Delete ¶
func (r *MongoDBRepository) Delete(ctx context.Context, id string) error
func (*MongoDBRepository) EnrollUser ¶
func (*MongoDBRepository) FindUserByMail ¶
func (*MongoDBRepository) GetUsersCommunity ¶
func (*MongoDBRepository) UpdateInfo ¶
type NotiService ¶
type PolicyService ¶
type Service ¶
type Service struct { Repo repoProvider // contains filtered or unexported fields }
func NewService ¶
func NewService(repo repoProvider, policySvc PolicyService, notiSvc NotiService) *Service
func (*Service) CheckUserEnrolled ¶
func (*Service) EnrollUser ¶
func (*Service) GetUsersCommunity ¶
func (*Service) LoadNotification ¶
func (*Service) SearchUser ¶
Click to show internal directories.
Click to hide internal directories.