Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetCookie ¶
func SetCookie( writer http.ResponseWriter, name string, value string, cookieConfig CookieConfig, )
Types ¶
type CookieConfig ¶
type CookieConfig struct {
Path string // optional
Domain string // optional
Expires time.Duration // optional
// MaxAge=0 means no 'Max-Age' attribute specified.
// MaxAge<0 means delete cookie now, equivalently 'Max-Age: 0'
// MaxAge>0 means Max-Age attribute present and given in seconds
MaxAge int
Secure bool
HTTPOnly bool
// SameSiteDefaultMode SameSite = iota + 1 (1)
// SameSiteLaxMode (2)
// SameSiteStrictMode (3)
// SameSiteNoneMode (4)
SameSite http.SameSite
}
type CookieNotFoundError ¶
func (CookieNotFoundError) Error ¶
func (e CookieNotFoundError) Error() string
Click to show internal directories.
Click to hide internal directories.