Documentation ¶
Index ¶
- type App
- func (a *App) HaveValidSessionCookie(r *http.Request) (cache.ActiveSession, bool)
- func (a *App) InitializeBlacklist()
- func (a *App) InitializeCacheManager()
- func (a *App) Middleware(endPoint http.Handler) http.Handler
- func (a *App) NeedSessionCookie(r *http.Request) bool
- func (a *App) StartApp()
- func (a *App) TestRoute(recorder *httptest.ResponseRecorder, request *http.Request)
- func (a *App) UpdateSession(r *http.Request)
- type CartItem
- type Data
- type Error
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func (*App) HaveValidSessionCookie ¶
func (*App) InitializeBlacklist ¶
func (a *App) InitializeBlacklist()
func (*App) InitializeCacheManager ¶
func (a *App) InitializeCacheManager()
func (*App) Middleware ¶
Validate session
func (*App) NeedSessionCookie ¶
Helper function to check if login should be verified for a given request URL
func (*App) StartApp ¶
func (a *App) StartApp()
StartApp initializes the application (called by main).
func (*App) TestRoute ¶
func (a *App) TestRoute(recorder *httptest.ResponseRecorder, request *http.Request)
func (*App) UpdateSession ¶
type CartItem ¶
type CartItem struct { Product products `json:"product"` Count int `json:"count,omitempty"` }
type Data ¶
type Data struct { User db.User //to display individual user Merchant db.Merchant //to display individual merchant profile to himself logged in merchant MerchantShop db.Merchant //display individual merchant shop to consumers public page Merchants []db.Merchant //to display all the merchants Error Error //to display an error message IF there is an error msg Products []db.Product //to display featured items Cart cache.Cart //to display checkout cart }
Click to show internal directories.
Click to hide internal directories.