Documentation ¶
Index ¶
- type MongoUser
- type RawUser
- type SignupData
- type User
- type UserHandler
- type UserServiceInterface
- type UsersService
- func (us *UsersService) Create(data *SignupData) (*mongo.InsertOneResult, error)
- func (us *UsersService) FindByEmail(user *RawUser, email string) error
- func (us *UsersService) FindById(id string)
- func (us *UsersService) GetList(users *[]*RawUser, filter interface{}) error
- func (us *UsersService) GetOne(user *RawUser, filter interface{}) error
- func (us *UsersService) List(filter interface{}) ([]*User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SignupData ¶
type UserHandler ¶
type UserHandler struct {
UsersService UserServiceInterface
}
func (*UserHandler) GetOne ¶
func (uh *UserHandler) GetOne(w http.ResponseWriter, r *http.Request)
func (*UserHandler) List ¶
func (uh *UserHandler) List(w http.ResponseWriter, r *http.Request)
type UserServiceInterface ¶
type UsersService ¶
type UsersService struct {
Col *mongo.Collection
}
func (*UsersService) Create ¶
func (us *UsersService) Create(data *SignupData) (*mongo.InsertOneResult, error)
func (*UsersService) FindByEmail ¶
func (us *UsersService) FindByEmail(user *RawUser, email string) error
func (*UsersService) FindById ¶
func (us *UsersService) FindById(id string)
func (*UsersService) GetList ¶
func (us *UsersService) GetList(users *[]*RawUser, filter interface{}) error
func (*UsersService) GetOne ¶
func (us *UsersService) GetOne(user *RawUser, filter interface{}) error
func (*UsersService) List ¶
func (us *UsersService) List(filter interface{}) ([]*User, error)
Click to show internal directories.
Click to hide internal directories.