Documentation ¶
Index ¶
- Variables
- func Parse(jar Jar, data string) (err error)
- type Builder
- func (b Builder) Cookie() Cookie
- func (b Builder) Domain(domain string) Builder
- func (b Builder) Expires(expires time.Time) Builder
- func (b Builder) HttpOnly(httpOnly bool) Builder
- func (b Builder) MaxAge(maxAge int) Builder
- func (b Builder) Path(path string) Builder
- func (b Builder) SameSite(sameSite SameSite) Builder
- func (b Builder) Secure(secure bool) Builder
- type Cookie
- type Jar
- type SameSite
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBadCookie = errors.New("cookie has a malformed syntax")
Functions ¶
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
type Cookie ¶
type Cookie struct { Name string Value string Path string Domain string Expires time.Time // MaxAge defines a delta in seconds, when the cookie should be dropped. // Note, that zero is treated as a zero-value, so will be ignored. In order // to be added with a value of zero, it must be negative. -1 is the conventional // value for this purpose MaxAge int SameSite SameSite Secure bool HttpOnly bool }
type Jar ¶
Jar is a key-value storage for cookies. Key-value pairs consists of strings, not cookie.Cookie, as it would lead to space wasting and require a separate data structure
func NewJarPreAlloc ¶
Click to show internal directories.
Click to hide internal directories.