func NewWSContext(c subs.Context, web *Web) WSContext { return &defaultWSContext{ Context: c, web: web, translations: translation.GetTranslations(GetLanguage(c.Conn().Request())), } }
func (self *Web) GetContext(w http.ResponseWriter, r *http.Request) (result *HTTPContext) { result = &HTTPContext{ response: w, request: r, web: self, translations: translation.GetTranslations(GetLanguage(r)), vars: mux.Vars(r), } result.session, _ = self.sessionStore.Get(r, SessionName) return }