device

package
v0.2.92 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPollingRate = 5 // 5 seconds
)

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 *zerolog.Logger) *Device

func (*Device) App

func (d *Device) App() *fiber.App

func (*Device) DeviceCallback

func (d *Device) DeviceCallback(ctx *fiber.Ctx) error

DeviceCallback godoc @Summary DeviceCallback validates the device code and returns the flow identifier @Description DeviceCallback validates the device code and returns the flow identifier @Tags device, callback @Accept json @Produce json @Param code query string true "device code" @Success 200 {object} models.DeviceCallbackResponse @Failure 400 {string} string @Failure 401 {string} string @Failure 500 {string} string @Router /device/callback [post]

func (*Device) DeviceFlow

func (d *Device) DeviceFlow(ctx *fiber.Ctx) error

DeviceFlow godoc @Summary DeviceFlow starts the device code flow @Description DeviceFlow starts the device code flow @Tags device, login @Accept json @Produce json @Success 200 {object} models.DeviceFlowResponse @Failure 401 {string} string @Failure 500 {string} string @Router /device/flow [post]

func (*Device) DevicePoll

func (d *Device) DevicePoll(ctx *fiber.Ctx) error

DevicePoll godoc @Summary DevicePoll polls the device code flow using the user code @Description DevicePoll polls the device code flow using the user code @Tags device, poll @Accept json @Produce json @Param code query string true "user code" @Success 200 {string} string @Failure 400 {string} string @Failure 401 {string} string @Failure 403 {string} string @Failure 429 {string} string @Failure 500 {string} string @Router /device/poll [post]

Jump to

Keyboard shortcuts

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