Documentation
¶
Index ¶
Constants ¶
View Source
const ( // ContextKeyCurrentUser defines the name of the key in our echo.Context to get CurrentUser if any ContextKeyCurrentUser = "CUser_" // ContextKeySession defines the name of the key in our echo.Contexdt to get Session of the CurrentUser if any ContextKeySession = "Session_" // HeaderKeyAuthorization defines the name of the header that should be set in the request to authentify the user HeaderKeyAuthorization = "X-Authorization" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPResponse ¶
type HTTPResponse struct { Status HTTPResponseStatus `json:"status"` Data interface{} `json:"data"` }
func HandleHTTPResponse ¶
func HandleHTTPResponse(statusCode int, message string, data interface{}) HTTPResponse
type HTTPResponseStatus ¶
type Server ¶
type Server struct { Router *echo.Echo Port string Middlewares *middlewares UserService *backapi.UserService SessionService *backapi.SessionService }
func NewServer ¶
func NewServer( UserService *backapi.UserService, SessionService *backapi.SessionService) *Server
NewServer returns a new instantiated Server with all the fields filled The logic and configuration itself is done only on the Setup step
type SessionHandler ¶
type SessionHandler struct {
SessionService *backapi.SessionService
}
func (*SessionHandler) CreateSession ¶
func (h *SessionHandler) CreateSession(c echo.Context) error
func (*SessionHandler) RemoveSession ¶
func (h *SessionHandler) RemoveSession(c echo.Context) error
type UserHandler ¶
type UserHandler struct { // Defines required Services here UserService *backapi.UserService }
func (*UserHandler) CreateUser ¶
func (h *UserHandler) CreateUser(c echo.Context) error
func (*UserHandler) UserChangeEmail ¶
func (h *UserHandler) UserChangeEmail(c echo.Context) error
func (*UserHandler) UserChangePassword ¶
func (h *UserHandler) UserChangePassword(c echo.Context) error
Click to show internal directories.
Click to hide internal directories.