Documentation
¶
Index ¶
- Variables
- func DeleteCookies(w http.ResponseWriter, attributesList ...*Attributes)
- func GetTimestampCookie(r *http.Request, attributes *Attributes) (*time.Time, error)
- func RenovateCookie(w http.ResponseWriter, r *http.Request, attributes *Attributes, ...) error
- func SetCookie(w http.ResponseWriter, attributes *Attributes, value string, ...)
- func SetTimestampCookie(w http.ResponseWriter, attributes *Attributes, expiresAt time.Time)
- type Attributes
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNilRequest = errors.New("nil request") ErrNilAttributes = errors.New("nil cookie attributes") )
Functions ¶
func DeleteCookies ¶ added in v0.9.3
func DeleteCookies(w http.ResponseWriter, attributesList ...*Attributes)
DeleteCookies deletes the cookies
func GetTimestampCookie ¶ added in v0.9.3
GetTimestampCookie gets a timestamp cookie
func RenovateCookie ¶ added in v0.9.3
func RenovateCookie( w http.ResponseWriter, r *http.Request, attributes *Attributes, expiresAt time.Time, cookieNotFoundFn func( w http.ResponseWriter, attributes *Attributes, err error, ) error, ) error
RenovateCookie creates a new cookie with the same value and a new expiration time
func SetCookie ¶
func SetCookie( w http.ResponseWriter, attributes *Attributes, value string, expiresAt time.Time, )
SetCookie sets a cookie
func SetTimestampCookie ¶ added in v0.9.3
func SetTimestampCookie( w http.ResponseWriter, attributes *Attributes, expiresAt time.Time, )
SetTimestampCookie sets a cookie with a timestamp
Types ¶
Click to show internal directories.
Click to hide internal directories.