Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidSession indicates that there is no named session in the store // with the cookie value ErrInvalidSession = errors.New("invalid session") // ErrInvalidKey indicates there is no value in the underlying session that // matches the key. ErrInvalidKey = errors.New("invalid key") )
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager creates and manages cookies
func NewManager ¶
NewManager creates a safe to use Manager by initializing the map
func (*Manager) Get ¶
Get reads a cookie from a request, queries the session manager and returns the value if available. If the session is invalid ErrInvalidSession is returnted, if the key is invalid, ErrInvalidKey is returned.
func (*Manager) Set ¶
Set creates a value in an underlying session if it exists. If it doesn't, a new session is created.
func (*Manager) StartExpunge ¶
func (m *Manager) StartExpunge()
func (*Manager) StopExpunge ¶
func (m *Manager) StopExpunge()
Click to show internal directories.
Click to hide internal directories.