options_go111.go 561 B

12345678910111213141516171819202122
  1. // +build go1.11
  2. package sessions
  3. import "net/http"
  4. // Options stores configuration for a session or session store.
  5. //
  6. // Fields are a subset of http.Cookie fields.
  7. type Options struct {
  8. Path string
  9. Domain string
  10. // MaxAge=0 means no Max-Age attribute specified and the cookie will be
  11. // deleted after the browser session ends.
  12. // MaxAge<0 means delete cookie immediately.
  13. // MaxAge>0 means Max-Age attribute present and given in seconds.
  14. MaxAge int
  15. Secure bool
  16. HttpOnly bool
  17. // Defaults to http.SameSiteDefaultMode
  18. SameSite http.SameSite
  19. }