Documentation ¶
Index ¶
- func NewRouter(logger *logrus.Logger, auth *auth.Auth, store *store.Store) *chi.Mux
- type NotesHandler
- func (h NotesHandler) Create(w http.ResponseWriter, r *http.Request)
- func (h NotesHandler) CtxID(next http.Handler) http.Handler
- func (h NotesHandler) Delete(w http.ResponseWriter, r *http.Request)
- func (h NotesHandler) DeleteByID(w http.ResponseWriter, r *http.Request)
- func (h NotesHandler) GetByID(w http.ResponseWriter, r *http.Request)
- func (h NotesHandler) List(w http.ResponseWriter, r *http.Request)
- func (h NotesHandler) UpdateByID(w http.ResponseWriter, r *http.Request)
- type SessionHandler
- type TodosHandler
- func (h TodosHandler) Create(w http.ResponseWriter, r *http.Request)
- func (h TodosHandler) CtxID(next http.Handler) http.Handler
- func (h TodosHandler) DeleteByID(w http.ResponseWriter, r *http.Request)
- func (h TodosHandler) GetByID(w http.ResponseWriter, r *http.Request)
- func (h TodosHandler) ToggleByID(w http.ResponseWriter, r *http.Request)
- func (h TodosHandler) UpdateByID(w http.ResponseWriter, r *http.Request)
- type UsersHandler
- func (h UsersHandler) ChangePassword(w http.ResponseWriter, r *http.Request)
- func (h UsersHandler) Create(w http.ResponseWriter, r *http.Request)
- func (h UsersHandler) CtxID(next http.Handler) http.Handler
- func (h UsersHandler) DeleteByID(w http.ResponseWriter, r *http.Request)
- func (h UsersHandler) GetByID(w http.ResponseWriter, r *http.Request)
- func (h UsersHandler) UpdateByID(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type NotesHandler ¶
type NotesHandler struct {
// contains filtered or unexported fields
}
func NewNotesHandler ¶
func NewNotesHandler(store *store.Store) NotesHandler
func (NotesHandler) Create ¶
func (h NotesHandler) Create(w http.ResponseWriter, r *http.Request)
func (NotesHandler) Delete ¶
func (h NotesHandler) Delete(w http.ResponseWriter, r *http.Request)
func (NotesHandler) DeleteByID ¶
func (h NotesHandler) DeleteByID(w http.ResponseWriter, r *http.Request)
func (NotesHandler) GetByID ¶
func (h NotesHandler) GetByID(w http.ResponseWriter, r *http.Request)
func (NotesHandler) List ¶
func (h NotesHandler) List(w http.ResponseWriter, r *http.Request)
func (NotesHandler) UpdateByID ¶
func (h NotesHandler) UpdateByID(w http.ResponseWriter, r *http.Request)
type SessionHandler ¶
type SessionHandler struct {
// contains filtered or unexported fields
}
SessionHandler keeps the dependency for handle session.
func NewSessionHandler ¶
func NewSessionHandler(s *store.Store, a *auth.Auth) SessionHandler
func (SessionHandler) DeleteSession ¶
func (h SessionHandler) DeleteSession(w http.ResponseWriter, r *http.Request)
DeleteSession DELETE /session
func (SessionHandler) NewSession ¶
func (h SessionHandler) NewSession(w http.ResponseWriter, r *http.Request)
NewSession POST /session
type TodosHandler ¶
type TodosHandler struct {
// contains filtered or unexported fields
}
func NewTodosHandler ¶
func NewTodosHandler(store *store.Store) TodosHandler
func (TodosHandler) Create ¶
func (h TodosHandler) Create(w http.ResponseWriter, r *http.Request)
func (TodosHandler) DeleteByID ¶
func (h TodosHandler) DeleteByID(w http.ResponseWriter, r *http.Request)
func (TodosHandler) GetByID ¶
func (h TodosHandler) GetByID(w http.ResponseWriter, r *http.Request)
func (TodosHandler) ToggleByID ¶
func (h TodosHandler) ToggleByID(w http.ResponseWriter, r *http.Request)
func (TodosHandler) UpdateByID ¶
func (h TodosHandler) UpdateByID(w http.ResponseWriter, r *http.Request)
type UsersHandler ¶
type UsersHandler struct {
// contains filtered or unexported fields
}
func NewUsersHandler ¶
func NewUsersHandler(s *store.Store) UsersHandler
func (UsersHandler) ChangePassword ¶
func (h UsersHandler) ChangePassword(w http.ResponseWriter, r *http.Request)
func (UsersHandler) Create ¶
func (h UsersHandler) Create(w http.ResponseWriter, r *http.Request)
func (UsersHandler) DeleteByID ¶
func (h UsersHandler) DeleteByID(w http.ResponseWriter, r *http.Request)
func (UsersHandler) GetByID ¶
func (h UsersHandler) GetByID(w http.ResponseWriter, r *http.Request)
func (UsersHandler) UpdateByID ¶
func (h UsersHandler) UpdateByID(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.