controller

package
v0.0.0-...-7acbc57 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2021 License: BSD-2-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddItemPayload

type AddItemPayload struct {
	ItemId string
	Amount int64
}

type IAuthRestAPI

type IAuthRestAPI interface {
	VerifyLogin(w http.ResponseWriter, r *http.Request)
	RegisterUser(w http.ResponseWriter, r *http.Request)
	Register() http.Handler
}

IAuthRestAPI user controller interface RegisterUser -> the register user request handler VerifyLogin -> this is the one handling login request

func NewAuth

func NewAuth(tokenAuth *jwtauth.JWTAuth) IAuthRestAPI

create new auth controller

type ICartRestAPI

type ICartRestAPI interface {
	GetCart(w http.ResponseWriter, r *http.Request)
	GetCarts(w http.ResponseWriter, r *http.Request)
	SaveCart(w http.ResponseWriter, r *http.Request)
	AddItemToCart(w http.ResponseWriter, r *http.Request)
	RemoveItemFromCart(w http.ResponseWriter, r *http.Request)
	Checkout(w http.ResponseWriter, r *http.Request)
	//HideItem(w http.ResponseWriter, r *http.Request)
	Register() http.Handler
}

func NewCart

func NewCart(token *jwtauth.JWTAuth, transactionChannel chan<- model.Transaction) ICartRestAPI

type IItemRestAPI

type IItemRestAPI interface {
	GetItem(w http.ResponseWriter, r *http.Request)
	GetItems(w http.ResponseWriter, r *http.Request)
	SaveItem(w http.ResponseWriter, r *http.Request)
	HideItem(w http.ResponseWriter, r *http.Request)
	Register() http.Handler
}

func NewItem

func NewItem(token *jwtauth.JWTAuth) IItemRestAPI

Jump to

Keyboard shortcuts

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