handlers

package
v0.0.0-...-1aff18f Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2021 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MySigningKey = "someAuthenticationString"
)

Variables

This section is empty.

Functions

func AboutAppHandler

func AboutAppHandler(r *mux.Router)

func AboutAppHandlerFunc

func AboutAppHandlerFunc(w http.ResponseWriter, r *http.Request)

func AboutViewHandler

func AboutViewHandler(r *mux.Router)

func AboutViewHandlerFunc

func AboutViewHandlerFunc(w http.ResponseWriter, r *http.Request)

func AddRecipeHandler

func AddRecipeHandler(r *mux.Router)

func AddRecipeHandlerFunc

func AddRecipeHandlerFunc(w http.ResponseWriter, r *http.Request)

func CheckSecurity

func CheckSecurity(next http.HandlerFunc) http.HandlerFunc

func DeleteRecipeHandler

func DeleteRecipeHandler(r *mux.Router)

func DeleteRecipeHandlerFunc

func DeleteRecipeHandlerFunc(w http.ResponseWriter, r *http.Request)

func DisplayRecipeHandler

func DisplayRecipeHandler(r *mux.Router)

func DisplayRecipeHandlerFunc

func DisplayRecipeHandlerFunc(w http.ResponseWriter, r *http.Request)

func GenerateToken

func GenerateToken(mySigningKey []byte, username string) (string, error)

func LoadUserDetailsHandler

func LoadUserDetailsHandler(r *mux.Router)

func LoadUserDetailsHandlerFunc

func LoadUserDetailsHandlerFunc(w http.ResponseWriter, r *http.Request)

func LoginHandler

func LoginHandler(r *mux.Router)

func LoginHandlerFunc

func LoginHandlerFunc(w http.ResponseWriter, r *http.Request)

func NewRecipeHandler

func NewRecipeHandler(r *mux.Router)

func NewRecipeHandlerFunc

func NewRecipeHandlerFunc(w http.ResponseWriter, r *http.Request)

func ParseToken

func ParseToken(myToken string, myKey string) bool

func RetrieveRecipeHandler

func RetrieveRecipeHandler(r *mux.Router)

func RetrieveRecipeHandlerFunc

func RetrieveRecipeHandlerFunc(w http.ResponseWriter, r *http.Request)

func SignMeInHandler

func SignMeInHandler(r *mux.Router)

func SignMeInHandlerFunc

func SignMeInHandlerFunc(w http.ResponseWriter, r *http.Request)

func SignUpHandler

func SignUpHandler(r *mux.Router)

func SignUpHandlerFunc

func SignUpHandlerFunc(w http.ResponseWriter, r *http.Request)

func UniqueUserHandler

func UniqueUserHandler(r *mux.Router)

func UniqueUserHandlerFunc

func UniqueUserHandlerFunc(w http.ResponseWriter, r *http.Request)

func UserInfoHandler

func UserInfoHandler(r *mux.Router)

func UserInfoHandlerFunc

func UserInfoHandlerFunc(w http.ResponseWriter, r *http.Request)

func UserInfoUpdateHandler

func UserInfoUpdateHandler(r *mux.Router)

func UserInfoUpdateHandlerFunc

func UserInfoUpdateHandlerFunc(w http.ResponseWriter, r *http.Request)

func UserRegisterHandler

func UserRegisterHandler(r *mux.Router)

func UserRegisterHandlerFunc

func UserRegisterHandlerFunc(w http.ResponseWriter, r *http.Request)

func ViewHandler

func ViewHandler(r *mux.Router)

func ViewHandlerFunc

func ViewHandlerFunc(w http.ResponseWriter, r *http.Request)

Types

type Authorize

type Authorize struct {
	Name  string `json:"username"`
	Token string `json:"token"`
}

type Check

type Check struct {
	Username string `json:"username"`
}

type DeleteRecipe

type DeleteRecipe struct {
	Name  string `json:"username"`
	Token string `json:"token"`
	UID   string `json:"uid"`
}

type DeleteResult

type DeleteResult struct {
	Name   string `json:"username"`
	Token  string `json:"token"`
	Status string `json:"status"`
}

type DisplayRecipe

type DisplayRecipe struct {
	Name              string `json:"username"`
	Date              string `json:"created"`
	RecipeName        string `json:"recipename"`
	RecipeDescription string `json:"recipedescription"`
	RecipeSteps       string `json:"recipesteps"`
	UID               string `json:"uid"`
}

type FetchUserDetailFromDatabase

type FetchUserDetailFromDatabase struct {
	Name     string `json:"name"`
	Token    string `json:"token"`
	Location string `json:"location"`
	About    string `json:"about"`
}

type GetRecipe

type GetRecipe struct {
	Name              string `json:"username"`
	Date              string `json:"created"`
	RecipeName        string `json:"recipename"`
	RecipeDescription string `json:"recipedescription"`
	RecipeSteps       string `json:"recipesteps"`
	UID               string `json:"uid"`
}

type LoadRequest

type LoadRequest struct {
	Name  string `json:"username"`
	Token string `json:"token"`
}

type NewRecipeInsert

type NewRecipeInsert struct {
	Name              string `json:"username"`
	Date              string `json:"created"`
	RecipeName        string `json:"recipename"`
	RecipeDescription string `json:"recipedescription"`
	RecipeSteps       string `json:"recipesteps"`
	UID               string `json:"uid"`
}

type NewRecipeRequest

type NewRecipeRequest struct {
	Name              string `json:"username"`
	Token             string `json:"token"`
	RecipeName        string `json:"recipename"`
	RecipeDescription string `json:"recipedescription"`
	RecipeSteps       string `json:"recipesteps"`
}

type Page

type Page struct {
	Title string
	Body  []byte
}

type PageDisplayRecipe

type PageDisplayRecipe struct {
	Title             string
	Body              []byte
	Name              string
	Date              string
	RecipeName        string
	RecipeDescription string
	RecipeSteps       string
	UID               string
}

type RecipeCreatedResponse

type RecipeCreatedResponse struct {
	Name   string `json:"username"`
	Token  string `json:"token"`
	Status string `json:"status`
}

type RegFields

type RegFields struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type RegisterUser

type RegisterUser struct {
	Name   string `json:"name"`
	Token  string `json:"token"`
	Result string `json:"result"`
}

type ReqUserUpdate

type ReqUserUpdate struct {
	Name     string `json:"username"`
	Token    string `json:"token"`
	Location string `json:"location"`
	About    string `json:"about"`
}

type RequestRecipe

type RequestRecipe struct {
	Name  string `json:"username`
	Token string `json:"token"`
}

type ReturnRecipes

type ReturnRecipes struct {
	Name    string      `json:"username"`
	Recipes []GetRecipe `json:"recipes"`
	Status  string      `json:"status"`
}

type SignInResponse

type SignInResponse struct {
	Name   string `json:"name"`
	Token  string `json:"token"`
	Result string `json:"result"`
}

type Signin

type Signin struct {
	Username string
	Password string
}

type Unique

type Unique struct {
	UID string `json:"uid"`
}

type UniqueUser

type UniqueUser struct {
	Name  string `json:"name"`
	Valid string `json:"valid"`
}

type UpdateUser

type UpdateUser struct {
	Name     string `json:"username"`
	Token    string `json:"token"`
	Location string `json:"location"`
	About    string `json:"about"`
}

type UserDetailResponse

type UserDetailResponse struct {
	Result   string `json:"response"`
	Name     string `json:"username"`
	Location string `json:"location"`
	About    string `json:"about"`
}

type UserExists

type UserExists struct {
	Result string `json:"result"`
}

type UserInfoPage

type UserInfoPage struct {
	Title string
	Body  []byte
}

type UserValidate

type UserValidate struct {
	Username string
	Password string
}

Jump to

Keyboard shortcuts

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