Documentation
¶
Index ¶
- Constants
- func Decode(name, value string, dst interface{}) error
- func Encode(name string, value interface{}) (string, error)
- func Generate() (hashKey []byte, blockKey []byte)
- func IniClient(filename string) (e error)
- func Init(filename string, maxAge time.Duration) (e error)
- func IsInit() bool
- func MaxAge() int64
- func Save(filename string, hashKey []byte, blockKey []byte) (e error)
- type Session
Constants ¶
View Source
const (
// CookieName cookie key name
CookieName = "golang-webpc-session"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Session ¶
type Session struct { Name string `json:"name,omitempty"` // 是否可獲取shell Shell bool `json:"shell,omitempty"` // 是否可讀取 檔案 Read bool `json:"read,omitempty"` // 是否可寫入 檔案 Write bool `json:"write,omitempty"` // 是否是 root Root bool `json:"root,omitempty"` }
Session user session info
func FromCookie ¶
FromCookie restore session from cookie
Click to show internal directories.
Click to hide internal directories.