session

package module
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2019 License: MIT Imports: 9 Imported by: 0

README

session

Documentation

Overview

@Time : 2019-07-12 16:30 @Author : zr

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRedisAdapter

func NewRedisAdapter(client *redis.Client, prefix string) adapter.Redis

Types

type Manager

type Manager struct {
	Prefix string
	// contains filtered or unexported fields
}

func NewManager

func NewManager(db adapter.DB) *Manager

func (Manager) CreateSession

func (m Manager) CreateSession(userId string, channel string, expireAt time.Time) (s *model.Session, err error)

func (Manager) Delete

func (m Manager) Delete(s *model.Session) error

func (Manager) DeleteByUser

func (m Manager) DeleteByUser(id string) error

func (Manager) FindByToken

func (m Manager) FindByToken(token string) (s *model.Session, err error)

func (Manager) GetUserAllSessions

func (m Manager) GetUserAllSessions(userId string) (sessions []*model.Session, err error)

func (Manager) Update

func (m Manager) Update(s *model.Session) error

Directories

Path Synopsis
@Time : 2019-07-12 16:42 @Author : zr @Time : 2019-07-12 16:34 @Author : zr
@Time : 2019-07-12 16:42 @Author : zr @Time : 2019-07-12 16:34 @Author : zr
@Time : 2019-07-12 16:39 @Author : zr
@Time : 2019-07-12 16:39 @Author : zr
@Time : 2019-07-12 17:28 @Author : zr
@Time : 2019-07-12 17:28 @Author : zr

Jump to

Keyboard shortcuts

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