redis

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL