handlers

package
v0.0.0-...-ef346fd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRouter

func NewRouter(logger *logrus.Logger, auth *auth.Auth, store *store.Store) *chi.Mux

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) CtxID

func (h NotesHandler) CtxID(next http.Handler) http.Handler

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 (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) CtxID

func (h TodosHandler) CtxID(next http.Handler) http.Handler

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) CtxID

func (h UsersHandler) CtxID(next http.Handler) http.Handler

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)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL