Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthHandler ¶
type AuthHandler struct {
// contains filtered or unexported fields
}
func NewAuthHandler ¶
func NewAuthHandler(server *s.Server) *AuthHandler
func (*AuthHandler) Login ¶
func (authHandler *AuthHandler) Login(c echo.Context) error
Login
@Summary Authenticate a user @Description Perform user login @ID user-login @Tags Authentication @Accept json @Produce json @Param params body requests.LoginRequest true "User's credentials" @Success 200 {object} responses.LoginResponse @Failure 401 {object} responses.Error @Router /auth/login [post]
func (*AuthHandler) RefreshToken ¶
func (authHandler *AuthHandler) RefreshToken(c echo.Context) error
RefreshToken
@Summary Refresh access token @Description Perform refresh access token @ID user-refresh @Tags Authentication @Accept json @Produce json @Param params body requests.RefreshRequest true "Refresh token" @Success 200 {object} responses.LoginResponse @Failure 401 {object} responses.Error @Router /auth/refresh [post]
func (*AuthHandler) Register ¶
func (authHandler *AuthHandler) Register(c echo.Context) error
Register
@Summary Register @Description New user registration @ID user-register @Tags Authentication @Accept json @Produce json @Param params body requests.RegisterRequest true "User's email, user's password" @Success 201 {object} responses.Data @Failure 400 {object} responses.Error @Router /auth/register [post]
type GenericHandler ¶
type GenericHandler struct {
// contains filtered or unexported fields
}
func NewGenericHandler ¶
func NewGenericHandler(server *s.Server) *GenericHandler
func (*GenericHandler) HealthHandler ¶
func (g *GenericHandler) HealthHandler(c echo.Context) error
healthHandler checks the health of the server
@Summary Health check @Description Checks the health of the server @Tags Generic @Accept json @Produce json @Success 200 {object} map[string]string @Router /health [get]
func (*GenericHandler) HelloWorldHandler ¶
func (g *GenericHandler) HelloWorldHandler(c echo.Context) error
HelloWorldHandler returns a Hello World message
@Summary Hello World @Description Returns a Hello World message @Tags Generic @Accept json @Produce json @Success 200 {object} map[string]string @Router / [get]
type UserHandler ¶
type UserHandler struct {
// contains filtered or unexported fields
}
func NewUserHandler ¶
func NewUserHandler(server *s.Server) *UserHandler
func (*UserHandler) GetMyUserHandler ¶
func (g *UserHandler) GetMyUserHandler(c echo.Context) error
Get My User
@Summary Get my user @Description get my user @Tags User @Accept json @Produce json @Success 200 {object} map[string]string @Failure 500 {object} error @Security ApiKeyAuth @Router /profile [get]
func (*UserHandler) ListUsersHandler ¶
func (g *UserHandler) ListUsersHandler(c echo.Context) error
ListUsersHandler lists all existing users
@Summary List users @Description get users @Tags User @Accept json @Produce json @Success 200 {array} []map[string]string @Failure 500 {object} error @Security ApiKeyAuth @Router /users [get]
Click to show internal directories.
Click to hide internal directories.