store

package
v0.0.0-...-fd23dd1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2019 License: OSL-3.0 Imports: 10 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*File) DestroySessionsForUser

func (s *File) DestroySessionsForUser(user domain.User) error

func (*File) GetHashByUser

func (s *File) GetHashByUser(user domain.User) (string, error)

func (*File) Inject

func (s *File) Inject(cfg *struct {
	Path string `inject:"config:session.file"`
})

func (*File) SetHashAndSessionIdForUser

func (s *File) SetHashAndSessionIdForUser(user domain.User, hash string, id string) error

type Memory

type Memory struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*Memory) DestroySessionsForUser

func (s *Memory) DestroySessionsForUser(user domain.User) error

func (*Memory) GetHashByUser

func (s *Memory) GetHashByUser(user domain.User) (string, error)

func (*Memory) Inject

func (s *Memory) Inject(store sessions.Store)

func (*Memory) SetHashAndSessionIdForUser

func (s *Memory) SetHashAndSessionIdForUser(user domain.User, hash string, id string) error

type Nil

type Nil struct{}

func (*Nil) DestroySessionsForUser

func (s *Nil) DestroySessionsForUser(user domain.User) error

func (*Nil) GetHashByUser

func (s *Nil) GetHashByUser(user domain.User) (string, error)

func (*Nil) SetHashAndSessionIdForUser

func (s *Nil) SetHashAndSessionIdForUser(user domain.User, hash string, id string) error

type Redis

type Redis struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*Redis) DestroySessionsForUser

func (s *Redis) DestroySessionsForUser(user domain.User) error

func (*Redis) GetHashByUser

func (s *Redis) GetHashByUser(user domain.User) (string, error)

func (*Redis) Inject

func (s *Redis) Inject(pool *redis.Pool, cfg *struct {
	MaxAge float64 `inject:"config:session.max.age"`
})

func (*Redis) SetHashAndSessionIdForUser

func (s *Redis) SetHashAndSessionIdForUser(user domain.User, hash string, id string) error

type Store

type Store interface {
	DestroySessionsForUser(user domain.User) error
	SetHashAndSessionIdForUser(user domain.User, hash string, id string) error
	GetHashByUser(user domain.User) (string, error)
}

Jump to

Keyboard shortcuts

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