Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DAO ¶
type DAO struct {
// contains filtered or unexported fields
}
func (*DAO) CreateUser ¶
func (*DAO) GetAllUsers ¶
type User ¶
type User struct { ID primitive.ObjectID `json:"id" bson:"_id,omitempty"` Username string `json:"username" bson:"username"` Email string `json:"email" bson:"email"` Password string `json:"-" bson:"password"` FirstName string `json:"firstName" bson:"firstName,omitempty"` LastName string `json:"lastName" bson:"lastName,omitempty"` CreatedAt time.Time `json:"createdAt" bson:"createdAt"` UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"` }
type UserHandler ¶
type UserHandler struct {
// contains filtered or unexported fields
}
func NewUserHandler ¶
func NewUserHandler(userService *UserService) *UserHandler
func (*UserHandler) CreateUser ¶
func (h *UserHandler) CreateUser(c *gin.Context)
func (*UserHandler) GetAllUsers ¶
func (h *UserHandler) GetAllUsers(c *gin.Context)
func (*UserHandler) GetUser ¶
func (h *UserHandler) GetUser(c *gin.Context)
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func NewUserService(userDAO *DAO) *UserService
func (*UserService) CreateUser ¶
func (us *UserService) CreateUser(user User) (*User, error)
func (*UserService) GetAllUsers ¶
func (us *UserService) GetAllUsers() ([]User, error)
Click to show internal directories.
Click to hide internal directories.