Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HandlerFunc ¶
type HandlerFunc func(rc RequestContextIf, w http.ResponseWriter, r *http.Request) error
our custom handler
type PicnicAppIf ¶
type PicnicAppIf interface { GetSessionManager() SessionManagerIf Execute() error GetListenAddress() string }
type RequestContextIf ¶
type RequestContextIf interface { GetApp() PicnicAppIf GetParamString(string) string GetParamInt64(string) int64 GetUser() UserSessionIf }
type SessionManagerIf ¶
type UserGetterIf ¶
type UserSessionIf ¶
type UserSessionIf interface { GetEmail() string GetName() string GetUserName() string IsLoggedIn() bool IsActive() bool IsAdministrator() bool IsValidForSession() bool SetAuthenticated(bool) error SetSessionExpiresIn(time.Duration) error GetSessionExpiresIn() int CheckPassword(string) bool }
UserSessionIf is special interface only used when requesting the session in a handler
type UserSetterIf ¶
type UserSetterIf interface { SetEmail(string) error SetName(string) error SetUserName(string) error // validate(ctx *context, r *http.Request, errors map[string]string) error GenerateRecoveryCode() (string, error) ResetRecoveryCode() GeneratePassword() error ChangePassword(string) error EncryptPassword() error UnsetPassword() }
Click to show internal directories.
Click to hide internal directories.