session

package
v0.1.117 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaseSessionID

func BaseSessionID(sessionID string) string

func DefaultStorePath

func DefaultStorePath() string

func ExtractAccountID

func ExtractAccountID(r *http.Request) string

func ExtractAgentType

func ExtractAgentType(r *http.Request) string

func ExtractID

func ExtractID(r *http.Request, maxBodyBytes int64) string

func ExtractModel

func ExtractModel(r *http.Request, maxBodyBytes int64) string

func ExtractUserEmail

func ExtractUserEmail(r *http.Request) string

func NormalizeAccountID

func NormalizeAccountID(value string) string

func NormalizeAgentType

func NormalizeAgentType(value string) string

func NormalizeModel

func NormalizeModel(value string) string

func NormalizeUserEmail

func NormalizeUserEmail(value string) string

func ScopedSessionKey

func ScopedSessionKey(agentType, sessionID string) string

func StickySessionID

func StickySessionID(agentType, sessionID string) string

func StripSubrouterHeaders

func StripSubrouterHeaders(headers http.Header)

Types

type Assignment

type Assignment struct {
	AgentType string    `json:"agent_type"`
	SessionID string    `json:"session_id"`
	AccountID string    `json:"account_id"`
	UserEmail string    `json:"user_email,omitempty"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type Store

type Store struct {
	// contains filtered or unexported fields
}

func NewStore

func NewStore(path string) (*Store, error)

func (*Store) All

func (s *Store) All() []Assignment

func (*Store) CountByAccount

func (s *Store) CountByAccount() map[string]int

func (*Store) Get

func (s *Store) Get(agentType, sessionID string) (Assignment, bool)

func (*Store) Put

func (s *Store) Put(agentType, sessionID, accountID, userEmail string) (Assignment, error)

Jump to

Keyboard shortcuts

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