device

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	GCInterval = time.Minute
	Expiry     = time.Minute * 5
	Timeout    = time.Second * 30
)

Variables

View Source
var (
	ErrDBIsRequired     = errors.New("db is required")
	ErrCreatingFlow     = errors.New("error creating flow")
	ErrPollingFlow      = errors.New("error polling flow")
	ErrGettingFlow      = errors.New("error getting flow")
	ErrCompletingFlow   = errors.New("error completing flow")
	ErrRateLimitFlow    = errors.New("error rate limit")
	ErrFlowNotCompleted = errors.New("flow not completed")
)

Functions

This section is empty.

Types

type Device

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

func New

func New(db *db.DB, logger types.Logger) (*Device, error)

func (*Device) Close

func (c *Device) Close() error

func (*Device) CompleteFlow

func (c *Device) CompleteFlow(ctx context.Context, identifier string, sessionIdentifier string) error

func (*Device) CreateFlow

func (c *Device) CreateFlow(ctx context.Context) (string, string, error)

func (*Device) ExistsFlow

func (c *Device) ExistsFlow(ctx context.Context, code string) (string, error)

func (*Device) PollFlow

func (c *Device) PollFlow(ctx context.Context, poll string, pollRate time.Duration) (string, error)

Jump to

Keyboard shortcuts

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