cookie

package
v0.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2025 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetCookie

func SetCookie(
	w http.ResponseWriter,
	attributes *Attributes,
	value string,
	expiresAt time.Time,
)

SetCookie sets a cookie

Types

type Attributes

type Attributes struct {
	Name     string
	Path     string
	Domain   string
	Secure   bool
	HTTPOnly bool
	SameSite http.SameSite
}

Attributes is the structure for the attributes of a cookie

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL