Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderError ¶
func RenderError(ctx context.Context, rw http.ResponseWriter, err error)
RenderError log the error and it writes the corresponding HTTP response.
Types ¶
type MaponController ¶
type MaponController interface {
GetMaponInfo(rw http.ResponseWriter, r *http.Request)
}
MaponController implements HTTP controller for Mapon requests.
func NewMaponController ¶
func NewMaponController(repo repository.MaponRepository) MaponController
NewMaponController creates a instance of MaponController.
type PagesController ¶
type PagesController interface { StaticFiles(w http.ResponseWriter, r *http.Request) IndexPage(w http.ResponseWriter, r *http.Request) LoginPage(w http.ResponseWriter, r *http.Request) }
PagesController impelements HTTP controller for web pages requests.
func NewPagesController ¶
func NewPagesController(ssnsSvc service.SessionsService, tmplMngr template.Manager) PagesController
NewPagesController creates a new instance of PagesController.
type UserController ¶
type UserController interface { // LoginUser logs in an user in the application LoginUser(rw http.ResponseWriter, r *http.Request) // LogoutUser logs out an user session in the application LogoutUser(rw http.ResponseWriter, r *http.Request) // RegisterUser creates a new user in the application then it logs it in RegisterUser(rw http.ResponseWriter, r *http.Request) }
UserController implements an HTTP Controller for users endpoints.
func NewUserController ¶
func NewUserController(userSvc service.UserService, securitySvc service.SessionsService) UserController
NewUserController creates a new instance of UserController.
Click to show internal directories.
Click to hide internal directories.