Documentation ¶
Index ¶
- type CreateRequest
- type CreateResponse
- type FetchResponse
- type Handler
- func (h Handler) CreateUser(logger *log.Logger, ds *service.UserService) func(c *routing.Context) error
- func (h Handler) GetUserByCredentials(logger *log.Logger, ds *service.UserService) func(c *routing.Context) error
- func (h Handler) GetUserByID(logger *log.Logger, ds *service.UserService) func(c *routing.Context) error
- func (h Handler) Lock(logger *log.Logger, ds *service.UserService) func(c *routing.Context) error
- func (h Handler) ResetPassword(logger *log.Logger, ds *service.UserService) func(c *routing.Context) error
- func (h Handler) Routes(api *routing.RouteGroup, logger *log.Logger, s *service.UserService)
- type LockRequest
- type ResetPasswordRequest
- type StatusResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateRequest ¶
type CreateRequest struct { Email string `json:"email"` Password string `json:"password"` FullName string `json:"full_name"` }
func (*CreateRequest) Validate ¶
func (cr *CreateRequest) Validate() error
type CreateResponse ¶
type CreateResponse struct {
ID string `json:"id"`
}
func NewCreateResponse ¶
func NewCreateResponse(id string, _ *service.UserService) *CreateResponse
type FetchResponse ¶
func NewFetchResponse ¶
func NewFetchResponse(d domain.User, _ *service.UserService) *FetchResponse
type Handler ¶
type Handler struct{}
Handler is just a route collection
func (Handler) CreateUser ¶
func (Handler) GetUserByCredentials ¶
func (Handler) GetUserByID ¶
func (Handler) ResetPassword ¶
func (Handler) Routes ¶
func (h Handler) Routes(api *routing.RouteGroup, logger *log.Logger, s *service.UserService)
type LockRequest ¶
type LockRequest struct {
Reason string `json:"reason"`
}
type ResetPasswordRequest ¶
func (*ResetPasswordRequest) Validate ¶
func (cr *ResetPasswordRequest) Validate() error
type StatusResponse ¶
type StatusResponse struct {
Status string `json:"status"`
}
func NewStatusResponse ¶
func NewStatusResponse(status string) *StatusResponse
Click to show internal directories.
Click to hide internal directories.