Documentation ¶
Overview ¶
Package handle contains frontend handler functions.
Index ¶
- type Redirect
- type Session
- func (s *Session) ClearDefaults()
- func (s *Session) GetAccount() *user.Account
- func (s *Session) GetDefaults() url.Values
- func (s *Session) ReadFlashErrors() frontend.ErrorMap
- func (s *Session) RemoveAccount()
- func (s *Session) Save() error
- func (s *Session) SaveDefault(key, value string)
- func (s *Session) SaveDefaults(values url.Values)
- func (s *Session) SaveFlashError(msg i18n.Key)
- func (s *Session) SaveFlashErrors(errMap frontend.ErrorMap)
- func (s *Session) SetAccount(a *user.Account)
- type SignInArgs
- type SignUpArgs
- type Worker
- func (w *Worker) EditText(context *frontend.Context) ([]byte, error)
- func (w *Worker) EditTextPOST(context *frontend.Context, session *Session) ([]byte, error)
- func (w *Worker) Extract(context *frontend.Context) ([]byte, error)
- func (w *Worker) Flavor(context *frontend.Context) ([]byte, error)
- func (w *Worker) ForgotPassword(context *frontend.Context, session *Session) ([]byte, error)
- func (w *Worker) GetResetPassword(context *frontend.Context, session *Session) ([]byte, error)
- func (w *Worker) NewExtract(context *frontend.Context, session *Session) ([]byte, error)
- func (w *Worker) NewFlavor(context *frontend.Context) ([]byte, error)
- func (w *Worker) NewFlavorPOST(context *frontend.Context, session *Session) ([]byte, error)
- func (w *Worker) ResetPassword(context *frontend.Context, session *Session) ([]byte, error)
- func (w *Worker) SignIn(context *frontend.Context, session *Session) ([]byte, error)
- func (w *Worker) SignOut(context *frontend.Context, session *Session) ([]byte, error)
- func (w *Worker) SignUp(context *frontend.Context, session *Session) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func NewSession ¶
func NewSession(r *http.Request, w http.ResponseWriter) *Session
func (*Session) ClearDefaults ¶
func (s *Session) ClearDefaults()
ClearDefaults clears the default values for the current form. It is typically called when a post request was successful.
func (*Session) GetAccount ¶
func (*Session) GetDefaults ¶
GetDefaults returns the default values for the current form.
func (*Session) ReadFlashErrors ¶
ReadFlashErrors reads the errors stored in the flash messages. Calling this method flushes the flash messages immediately.
func (*Session) RemoveAccount ¶
func (s *Session) RemoveAccount()
func (*Session) SaveDefault ¶
SaveDefault is a shorthand for saving a single default key-value pair.
func (*Session) SaveDefaults ¶
SaveDefaults saves the values as default for the current form.
func (*Session) SaveFlashError ¶
SaveFlashError is a shorthand for saving a single error message for the whole form (key "FORM").
func (*Session) SaveFlashErrors ¶
SaveFlashErrors saves the error map into the session flash messages.
func (*Session) SetAccount ¶
type SignInArgs ¶
func (*SignInArgs) CleanUp ¶
func (a *SignInArgs) CleanUp()
type SignUpArgs ¶
func (*SignUpArgs) CleanUp ¶
func (a *SignUpArgs) CleanUp()
type Worker ¶
type Worker struct { *backend.Engine Server frontend.Server // contains filtered or unexported fields }