session

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Location

type Location struct {
	Name string
	Kind string
}

Location represents the location of the sessionId

func NewHeaderLocation

func NewHeaderLocation(name string) *Location

NewHeaderLocation creates a new sessionIdLocation for header

func NewLocation

func NewLocation(name, kind string) *Location

NewLocation creates a new sessionIdLocation

func NewQueryLocation

func NewQueryLocation(name string) *Location

NewQueryLocation creates a new sessionIdLocation for query

type Locator

type Locator struct{}

Locator is a struct that handles the location of session IDs in HTTP requests

func (*Locator) Locate

func (l *Locator) Locate(location *Location, request *http.Request) (string, error)

Locate retrieves the session ID from the specified location in the HTTP request

func (*Locator) Set

func (l *Locator) Set(location *Location, values url.Values, id string) error

Set sets the session ID in the specified location in the HTTP request

type SessionProvider

type SessionProvider struct {
	Locator
	Locations []*Location
}

func (*SessionProvider) SessionId

func (p *SessionProvider) SessionId(request *http.Request) string

SessionId retrieves the session ID from the request by checking all configured locations

Jump to

Keyboard shortcuts

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