cookie

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CookieClient

type CookieClient struct {
	Order  int64  `json:"order"`
	Status bool   `json:"status"`
	Value  string `json:"value"`
}

func NewCookieClient

func NewCookieClient(order int64, status bool, value string) CookieClient

type CookieServer

type CookieServer struct {
	Status     bool     `json:"status"`
	Code       string   `json:"code"`
	Value      string   `json:"value"`
	Domain     string   `json:"domain"`
	Path       string   `json:"path"`
	Expiration string   `json:"expiration"`
	MaxAge     int      `json:"maxage"`
	Secure     bool     `json:"secure"`
	HttpOnly   bool     `json:"httponly"`
	SameSite   SameSite `json:"samesite"`
}

func CookieServerFromString

func CookieServerFromString(cookieString string) (*CookieServer, error)

func (*CookieServer) String

func (c *CookieServer) String() string

type CookiesClient

type CookiesClient struct {
	Cookies map[string]CookieClient `json:"cookies"`
}

func NewCookiesClient

func NewCookiesClient() *CookiesClient

func (*CookiesClient) Find

func (h *CookiesClient) Find(key string) (*CookieClient, bool)

func (*CookiesClient) Put

func (h *CookiesClient) Put(key, value string) *CookiesClient

func (*CookiesClient) PutStatus

func (h *CookiesClient) PutStatus(key, value string, status bool) *CookiesClient

type CookiesServer

type CookiesServer struct {
	Cookies map[string]CookieServer `json:"cookies"`
}

func NewCookiesServer

func NewCookiesServer() *CookiesServer

type SameSite

type SameSite string
const (
	Strict SameSite = "Strict"
	Lax    SameSite = "Lax"
	None   SameSite = "None"
)

func SameSiteFromString

func SameSiteFromString(value string) (*SameSite, error)

func (SameSite) String

func (s SameSite) String() string

Jump to

Keyboard shortcuts

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