Documentation
¶
Index ¶
- Constants
- func AuthUser(w http.ResponseWriter, r *http.Request)
- func CreateNote(w http.ResponseWriter, r *http.Request)
- func CreateUser(w http.ResponseWriter, r *http.Request)
- func DeleteUser(w http.ResponseWriter, r *http.Request)
- func DeleteUserNote(w http.ResponseWriter, r *http.Request)
- func ExecuteCode(w http.ResponseWriter, r *http.Request)
- func GenerateCode(w http.ResponseWriter, r *http.Request)
- func GetNote(w http.ResponseWriter, r *http.Request)
- func GetNotes(w http.ResponseWriter, r *http.Request)
- func GetUser(w http.ResponseWriter, r *http.Request)
- func GetUserNotes(w http.ResponseWriter, r *http.Request)
- func Handle(e error)
- func ToggleUserNote(w http.ResponseWriter, r *http.Request)
- func UpdatePassword(w http.ResponseWriter, r *http.Request)
- func UpdateUser(w http.ResponseWriter, r *http.Request)
- func UpdateUserNote(w http.ResponseWriter, r *http.Request)
- type Application
Constants ¶
const (
UserKey key = "user"
)
UserKey is a constant context key
Variables ¶
This section is empty.
Functions ¶
func AuthUser ¶
func AuthUser(w http.ResponseWriter, r *http.Request)
AuthUser is the handler function for authorizing user login
func CreateNote ¶
func CreateNote(w http.ResponseWriter, r *http.Request)
CreateNote is the handler function for adding a note to the database
func CreateUser ¶
func CreateUser(w http.ResponseWriter, r *http.Request)
CreateUser is the handler function for adding a new account into the databsse
func DeleteUser ¶
func DeleteUser(w http.ResponseWriter, r *http.Request)
DeleteUser is the handler function for removing a user from the database
func DeleteUserNote ¶
func DeleteUserNote(w http.ResponseWriter, r *http.Request)
DeleteUserNote is the handler function for removing a note created by current user from the database
func ExecuteCode ¶
func ExecuteCode(w http.ResponseWriter, r *http.Request)
ExecuteCode is the handler function for carrying out a token action
func GenerateCode ¶
func GenerateCode(w http.ResponseWriter, r *http.Request)
GenerateCode is the handler function for creating a new reset token
func GetNote ¶
func GetNote(w http.ResponseWriter, r *http.Request)
GetNote is the handler function for getting a note from the database
func GetNotes ¶
func GetNotes(w http.ResponseWriter, r *http.Request)
GetNotes is the handler function for getting all notes from database
func GetUser ¶
func GetUser(w http.ResponseWriter, r *http.Request)
GetUser is the handler funcion for getting a user fom the database.
func GetUserNotes ¶
func GetUserNotes(w http.ResponseWriter, r *http.Request)
GetUserNotes is the handler funcion for getting notes created by current user
func ToggleUserNote ¶
func ToggleUserNote(w http.ResponseWriter, r *http.Request)
ToggleUserNote is the handler function for togglling visibility for a note created by current user in the database
func UpdatePassword ¶
func UpdatePassword(w http.ResponseWriter, r *http.Request)
UpdatePassword is the handler function for changing a user's password
func UpdateUser ¶
func UpdateUser(w http.ResponseWriter, r *http.Request)
UpdateUser is the handler function for editing a user in the database
func UpdateUserNote ¶
func UpdateUserNote(w http.ResponseWriter, r *http.Request)
UpdateUserNote is the handler function for editing a note created by current user in the database
Types ¶
type Application ¶
Application is a copy of the app.App struct
var (
App *Application
)
App is an instance of Application