Documentation ¶
Index ¶
- type ConfigType
- type CustomSessionServiceType
- func (c *CustomSessionServiceType) ClearUserSession() error
- func (c *CustomSessionServiceType) Close()
- func (c *CustomSessionServiceType) GetFlashMessage() (interface{}, error)
- func (c *CustomSessionServiceType) GetUserSession() (*session.UserSession, error)
- func (c *CustomSessionServiceType) SetFlashMessage(msg string) error
- func (c *CustomSessionServiceType) SetSessionService(r *http.Request, w http.ResponseWriter)
- func (c *CustomSessionServiceType) SetUserSession(userSession *session.UserSession) error
- func (c *CustomSessionServiceType) StartSession() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigType ¶
type ConfigType struct { Size int Network string Address string Password string SessionSecrets [][]byte }
ConfigType is used to connect to the redis db
type CustomSessionServiceType ¶
type CustomSessionServiceType struct { session.ServiceInterface // contains filtered or unexported fields }
CustomSessionServiceType extends session.ServiceInterface
func NewService ¶
func NewService(cnf *config.Config, redisConfig ConfigType) *CustomSessionServiceType
NewService starts the redis connection and sets the session options
func (*CustomSessionServiceType) ClearUserSession ¶
func (c *CustomSessionServiceType) ClearUserSession() error
ClearUserSession custom ClearUserSession
func (*CustomSessionServiceType) Close ¶
func (c *CustomSessionServiceType) Close()
Close stops the redis connection
func (*CustomSessionServiceType) GetFlashMessage ¶
func (c *CustomSessionServiceType) GetFlashMessage() (interface{}, error)
GetFlashMessage custom GetFlashMessage
func (*CustomSessionServiceType) GetUserSession ¶
func (c *CustomSessionServiceType) GetUserSession() (*session.UserSession, error)
GetUserSession custom GetUserSession
func (*CustomSessionServiceType) SetFlashMessage ¶
func (c *CustomSessionServiceType) SetFlashMessage(msg string) error
SetFlashMessage custom SetFlashMessage
func (*CustomSessionServiceType) SetSessionService ¶
func (c *CustomSessionServiceType) SetSessionService(r *http.Request, w http.ResponseWriter)
SetSessionService custom SetSessionStore
func (*CustomSessionServiceType) SetUserSession ¶
func (c *CustomSessionServiceType) SetUserSession(userSession *session.UserSession) error
SetUserSession custom SetUserSession
func (*CustomSessionServiceType) StartSession ¶
func (c *CustomSessionServiceType) StartSession() error
StartSession custom StartSession
Click to show internal directories.
Click to hide internal directories.