session

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

func NewSessionMgr

func NewSessionMgr() *Manager

func (*Manager) FindOrCreateSession

func (m *Manager) FindOrCreateSession(sid int64) *Session

func (*Manager) FindSession

func (m *Manager) FindSession(sid int64) *Session

func (*Manager) StoreSession

func (m *Manager) StoreSession(s *Session)

type Session

type Session struct {
	sync.RWMutex // 数据锁
	// contains filtered or unexported fields
}

func NewSession

func NewSession() *Session

func (*Session) Attribute

func (s *Session) Attribute(key string) interface{}

func (*Session) Attributes

func (s *Session) Attributes() map[string]interface{}

func (*Session) Bind

func (s *Session) Bind(uid string)

func (*Session) Exists

func (s *Session) Exists(key string) bool

func (*Session) ID

func (s *Session) ID() int64

func (*Session) Invalidate

func (s *Session) Invalidate()

func (*Session) Keys

func (s *Session) Keys() []string

func (*Session) RemoveAttribute

func (s *Session) RemoveAttribute(key string)

func (*Session) SetAttribute

func (s *Session) SetAttribute(key string, value interface{})

func (*Session) UID

func (s *Session) UID() string

Jump to

Keyboard shortcuts

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