Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DbHandler ¶
type DbHandler struct {
// contains filtered or unexported fields
}
DbHandler Is an opinionated user management handler for an http server it uses uses the same DB user manager to manage user creation, deletion, etc. todo add factory to make sure the logger is not nil todo rename to something that makes more sense
func NewDbHandler ¶
func (DbHandler) CreateUserForm ¶
func (h DbHandler) CreateUserForm() func(w http.ResponseWriter, r *http.Request)
CreateUserForm returns a handler function to print a simple create user form
func (DbHandler) CreateUserHandleForm ¶
func (h DbHandler) CreateUserHandleForm() func(w http.ResponseWriter, r *http.Request)
CreateUserHandleForm returns a handler function to process user creation post form request
func (DbHandler) UserHandler ¶
UserHandler returns a full-fledged user handling mux it is not intended as real use, but rather as an example on how to use all or part of the user manager handler it can be hooked in into any other mux like this: rootMux.Handle("/top_path/", http.StripPrefix("/top_path", subMux))