Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController(s IService, store *session.Store) *Controller
func (*Controller) Create ¶
func (uc *Controller) Create(c *fiber.Ctx) error
func (*Controller) Login ¶
func (uc *Controller) Login(c *fiber.Ctx) error
type IRepository ¶
type IService ¶
type IService interface { Create(user *RequestUser) (*User, error) Login(user *RequestUser) (*User, error) }
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(ctx context.Context, client *mongo.Client) *Repository
func (*Repository) GetReqUser ¶
func (r *Repository) GetReqUser(uname string) (*RequestUser, error)
func (*Repository) Upsert ¶
func (r *Repository) Upsert(user *RequestUser) error
func (*Repository) ValidatePassword ¶
func (r *Repository) ValidatePassword(password string) error
func (*Repository) ValidateUsername ¶
func (r *Repository) ValidateUsername(uname string) error
type RequestUser ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(r IRepository) *Service
Click to show internal directories.
Click to hide internal directories.