Documentation
¶
Overview ¶
Package session a middleware that provides the session management of Macaron.
Index ¶
- func AesDecrypt(key, text []byte) ([]byte, error)
- func AesEncrypt(key, text []byte) ([]byte, error)
- func DecodeGob(encoded []byte) (out map[interface{}]interface{}, err error)
- func DecryptSecret(key string, cipherhex string) (string, error)
- func EncodeGob(obj map[interface{}]interface{}) ([]byte, error)
- func EncryptSecret(key string, str string) (string, error)
- func GetCookie(req *http.Request, name string) string
- func NewCookie(name string, value string, others ...interface{}) *http.Cookie
- func NewSecret() (string, error)
- func NewSecretWithLength(length int64) (string, error)
- func Register(name string, provider Provider)
- func RegisterFn(name string, providerfn func() Provider)
- func Sessioner(options ...Options) (func(next http.Handler) http.Handler, error)
- func Version() string
- type FileProvider
- func (p *FileProvider) Count() (int, error)
- func (p *FileProvider) Destroy(sid string) error
- func (p *FileProvider) Exist(sid string) (bool, error)
- func (p *FileProvider) GC()
- func (p *FileProvider) Init(maxlifetime int64, rootPath string) error
- func (p *FileProvider) Read(sid string) (_ RawStore, err error)
- func (p *FileProvider) Regenerate(oldsid, sid string) (_ RawStore, err error)
- type FileStore
- type Manager
- func (m *Manager) Count() (int, error)
- func (m *Manager) Destroy(resp http.ResponseWriter, req *http.Request) error
- func (m *Manager) GC()
- func (m *Manager) Read(sid string) (RawStore, error)
- func (m *Manager) RegenerateID(resp http.ResponseWriter, req *http.Request) (sess RawStore, err error)
- func (m *Manager) SetSecure(secure bool)
- func (m *Manager) Start(resp http.ResponseWriter, req *http.Request) (RawStore, error)
- type MemProvider