cookie

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package cookie contains helper functions for setting cookie values.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Domain

func Domain(domain string) func(*http.Cookie)

Domain sets the domain for a provided cookie

func Expires

func Expires(expires time.Time) func(*http.Cookie)

Expires sets the expires and rawexpires for a provided cookie

func HTTPOnly

func HTTPOnly(httpOnly bool) func(*http.Cookie)

HTTPOnly sets the HttpOnly setting for a provided cookie

func HttpOnly

func HttpOnly(httpOnly bool) func(*http.Cookie)

HttpOnly sets the HttpOnly setting for a provided cookie

func MaxAge

func MaxAge(maxAge int) func(*http.Cookie)

MaxAge sets the maximum age for a provided cookie

func Path

func Path(path string) func(*http.Cookie)

Path sets the path for a provided cookie

func SameSite

func SameSite(sameSite http.SameSite) func(*http.Cookie)

SameSite sets the SameSite for a provided cookie

func Secure

func Secure(secure bool) func(*http.Cookie)

Secure sets the secure setting for a provided cookie

Types

This section is empty.

Jump to

Keyboard shortcuts

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