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() *Controller
func (*Controller) Login ¶
func (c *Controller) Login(w http.ResponseWriter, r *http.Request)
Login user login @Summary User login @Description User login endpoint. Returns JWT token. Use returned access token in Authorization header as Bearer token @Tags auth @Accept json @Produce json @Param body body request.LoginRequest true "login details" @Success 200 {object} response.LoginResponse "auth token" @Failure 400 {object} response.Error @Router /v1/auth/login [post]
func (*Controller) SignUp ¶
func (c *Controller) SignUp(w http.ResponseWriter, r *http.Request)
SignUp user signUp @Summary User SignUp @Description User SignUp endpoint. @Tags auth @Accept json @Produce json @Param body body request.SignUpRequest true "user create" @Success 201 @Failure 400 {object} response.Error @Router /v1/auth/sign-up [post]