Documentation ¶
Overview ¶
Package session manages the session configuration for a given host.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoSession = errors.New("no session")
ErrNoSession is returned when a session does not exist for a given host.
Functions ¶
func IsWritableHeader ¶
IsWritableHeader returns whether or not a header is writable.
func SessionsPath ¶
func SessionsPath() string
SessionsPath returns the path to the sessions configuration file.
func WriteSession ¶
func WriteSession(name string, req *http.Request, opts WriteSessionOpts) error
WriteSession writes a session to the configuration file for the given request.
Types ¶
type Session ¶
A Session represents a single session configuration.
func ReadSession ¶
ReadSession reads a session from the configuration file for the given request.
When no session is found an empty session and ErrNoSession are returned.
type WriteSessionOpts ¶
type WriteSessionOpts struct { // SaveAllHeaders specifies whether or not all headers should be saved. SaveAllHeaders bool }
WriteSessionOpts are options for writing a session.
Click to show internal directories.
Click to hide internal directories.