metathings_deviced_session_storage

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidArgument             = errors.New("invalid argument")
	ErrUnknownSessionStorageDriver = errors.New("unknown session storage driver")
)

Functions

func ToSessionStorage added in v1.1.28

func ToSessionStorage(y *SessionStorage) func(string, interface{}) error

Types

type RedisSessionStorage

type RedisSessionStorage struct {
	// contains filtered or unexported fields
}

func (*RedisSessionStorage) GetStartupSession

func (self *RedisSessionStorage) GetStartupSession(id string) (int32, error)

func (*RedisSessionStorage) RefreshStartupSession

func (self *RedisSessionStorage) RefreshStartupSession(id string, expire time.Duration) error

func (*RedisSessionStorage) SetStartupSessionIfNotExists

func (self *RedisSessionStorage) SetStartupSessionIfNotExists(id string, sess int32, expire time.Duration) error

func (*RedisSessionStorage) UnsetStartupSession

func (self *RedisSessionStorage) UnsetStartupSession(id string) error

type SessionStorage

type SessionStorage interface {
	GetStartupSession(id string) (int32, error)
	SetStartupSessionIfNotExists(id string, sess int32, expire time.Duration) error
	UnsetStartupSession(id string) error
	RefreshStartupSession(id string, expire time.Duration) error
}

func NewRedisSessionStorage

func NewRedisSessionStorage(args ...interface{}) (SessionStorage, error)

func NewSessionStorage

func NewSessionStorage(driver string, args ...interface{}) (SessionStorage, error)

type SessionStorageFactory

type SessionStorageFactory func(...interface{}) (SessionStorage, error)

Jump to

Keyboard shortcuts

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