requests

package
v2.23.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: GPL-3.0 Imports: 14 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RequestEnv

type RequestEnv struct {
	// Context is the per-request context. It should be derived from the app's
	// state context (st.GetContext()) with config.APIRequestTimeout, so it
	// cancels on app shutdown and on timeout. For HTTP, it should also cancel
	// when the HTTP connection closes.
	Context       context.Context
	Platform      platforms.Platform
	Config        *config.Instance
	State         *state.State
	Database      *database.Database
	LimitsManager *playtime.LimitsManager
	Profiles      *profiles.Service
	// Kiosk is the device's kiosk lock. Nil means the device has none, which
	// every query on it reports as off.
	Kiosk           *kiosk.Service
	LauncherCache   *helpers.LauncherCache
	Player          audio.Player
	PlaybackManager audio.PlaybackManager
	UI              *uievents.Service
	TokenQueue      chan<- tokens.Token
	ConfirmQueue    chan<- chan error
	IndexPauser     *syncutil.Pauser
	ScrapePauser    *syncutil.Pauser
	BackupPauser    *syncutil.Pauser
	// InputSession is non-nil only for durable transports such as WebSocket.
	// It owns keyboard and gamepad inputs held across requests.
	InputSession platforms.InputSession
	// ZapScriptHold is non-nil only for durable transports such as WebSocket.
	// It disables ZapScript until the connection closes and reports whether
	// this call acquired a new hold.
	ZapScriptHold func() (acquired bool)
	ClientID      string
	PlatformID    string
	// ClientRole is the paired client's permission role ("admin" or
	// "member"), or "" when the request carries no paired identity (local
	// connections, plaintext WebSocket, HTTP). See pkg/api/permissions.
	ClientRole string
	// PairedClientID is the paired client's stable ID, the same across its
	// connections, or "" when the request carries no paired identity.
	PairedClientID string
	Params         json.RawMessage
	IsLocal        bool
	// APIKeyAuthenticated is true when static API-key middleware authenticated
	// this non-paired request. It grants admin authority, not localhost access.
	APIKeyAuthenticated bool
	// ExcludeHidden is the normalized browse preference for this request only.
	// It is not authorization and never applies to explicit launch resolution.
	ExcludeHidden bool
}

Jump to

Keyboard shortcuts

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