cookie

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 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,
)

SetCookie sets a cookie

Types

type Attributes

type Attributes struct {
	Name      string
	Path      string
	Domain    string
	ExpiresAt time.Time
	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