cookies

package
v1.7.7 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrValueTooLong = errors.New("cookie value too long")
	ErrInvalidValue = errors.New("invalid cookie value")
)

Functions

func Delete

func Delete(w http.ResponseWriter, name string)

func New

func New(name string, value string, expires time.Time) *http.Cookie

func Read

func Read(r *http.Request, name string) (string, error)

func ReadSigned

func ReadSigned(r *http.Request, name string, secretKey []byte) (string, error)

func Write

func Write(w http.ResponseWriter, cookie *http.Cookie) error

func WriteSigned

func WriteSigned(w http.ResponseWriter, cookie *http.Cookie, secretKey []byte) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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