handlers

package
v0.0.0-...-b9d1559 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetValue

func GetValue(jr *JsonRequest, key string) (string, bool)

func JsonResponseWriter

func JsonResponseWriter(response JsonResponse)

Types

type Handler

type Handler struct {
	Db     *models.Model
	Logger *utils.Logger
}

func (*Handler) About

func (app *Handler) About(w http.ResponseWriter, r *http.Request)

func (*Handler) Contact

func (app *Handler) Contact(w http.ResponseWriter, r *http.Request)

func (*Handler) CreateProduct

func (app *Handler) CreateProduct(w http.ResponseWriter, r *http.Request)

func (*Handler) DeleteProduct

func (app *Handler) DeleteProduct(w http.ResponseWriter, r *http.Request)

func (*Handler) DeleteProfile

func (app *Handler) DeleteProfile(w http.ResponseWriter, r *http.Request)

func (*Handler) Home

func (app *Handler) Home(w http.ResponseWriter, r *http.Request)

func (*Handler) IV

func (app *Handler) IV() (result string)

func (*Handler) ImageHandler

func (app *Handler) ImageHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) Login

func (app *Handler) Login(w http.ResponseWriter, r *http.Request)

func (*Handler) LoginHashedPassword

func (app *Handler) LoginHashedPassword(password string, iv string) (hashedPassword string)

func (*Handler) Logout

func (app *Handler) Logout(w http.ResponseWriter, r *http.Request)

func (*Handler) NewPassword

func (app *Handler) NewPassword(w http.ResponseWriter, r *http.Request)

func (*Handler) ReadProduct

func (app *Handler) ReadProduct(w http.ResponseWriter, r *http.Request)

func (*Handler) ReadProfile

func (app *Handler) ReadProfile(w http.ResponseWriter, r *http.Request)

func (*Handler) Register

func (app *Handler) Register(w http.ResponseWriter, r *http.Request)

func (*Handler) RegisterHashedPassword

func (app *Handler) RegisterHashedPassword(password string) (iv string, hashedPassword string)

func (*Handler) ResetPassword

func (app *Handler) ResetPassword(w http.ResponseWriter, r *http.Request)

func (*Handler) Token

func (app *Handler) Token() (result string)

func (*Handler) UpdatePassword

func (app *Handler) UpdatePassword(w http.ResponseWriter, r *http.Request)

func (*Handler) UpdateProduct

func (app *Handler) UpdateProduct(w http.ResponseWriter, r *http.Request)

func (*Handler) UpdateProfile

func (app *Handler) UpdateProfile(w http.ResponseWriter, r *http.Request)

func (*Handler) VerifyEmail

func (app *Handler) VerifyEmail(w http.ResponseWriter, r *http.Request)

type JsonRequest

type JsonRequest struct {
	Data map[string]interface{}
}

func JsonRequestDecoder

func JsonRequestDecoder(r *http.Request) (*JsonRequest, error)

type JsonResponse

type JsonResponse struct {
	ResponseWriter http.ResponseWriter
	Data           any
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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