metathings_deviced_session_storage

package
v1.1.25-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2020 License: MIT Imports: 5 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

This section is empty.

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