device

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PollingRate = time.Second * 5
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

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

func New

func New(options options.Options, logger types.Logger) *Device

func (*Device) Register

func (d *Device) Register(prefixes []string, group huma.API)

type DeviceLoginResponse

type DeviceLoginResponse struct {
	Body DeviceLoginResponseBody
}

type DeviceLoginResponseBody

type DeviceLoginResponseBody struct {
	Code               string `json:"code" doc:"device flow code"`
	Poll               string `json:"poll" doc:"poll code for polling status"`
	PollingRateSeconds uint64 `json:"polling_rate_seconds" doc:"polling rate in seconds"`
}

type DevicePollRequest

type DevicePollRequest struct {
	Poll string `query:"poll" required:"true" minLength:"36" maxLength:"36" doc:"poll code"`
}

type DevicePollResponse

type DevicePollResponse struct {
	SessionCookie *http.Cookie `header:"Set-Cookie" required:"true" doc:"session cookie"`
}

type DeviceValidateRequest

type DeviceValidateRequest struct {
	Code string `query:"code" required:"true" minLength:"8" maxLength:"8" doc:"device flow code"`
}

Jump to

Keyboard shortcuts

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