You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nnet/entity/session.go

27 lines
625 B
Go

package entity
type Session interface {
// ID 获取 Session ID
ID() int64
// UID 获取UID
UID() string
// Bind 绑定uid
Bind(uid string)
// Attribute 获取指定key对应参数
Attribute(key string) interface{}
// Keys 获取所有参数key
Keys() []string
// Exists 指定key是否存在
Exists(key string) bool
// Attributes 获取所有参数
Attributes() map[string]interface{}
// RemoveAttribute 移除指定key对应参数
RemoveAttribute(key string)
// SetAttribute 设置参数
SetAttribute(key string, value interface{})
// Invalidate 清理
Invalidate()
// Close 关闭 Session
Close()
}