viewmodel

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: MIT Imports: 6 Imported by: 0 modules, 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

View Source
const (
	DeviceDesktop = useragent.DeviceDesktop
	DevicePhone   = useragent.DevicePhone
	DeviceTablet  = useragent.DeviceTablet
	DeviceUnknown = useragent.DeviceUnknown
)

Variables

This section is empty.

Functions

func Label

func Label(ua string) string

Types

type AuthProvider added in v0.1.17

type AuthProvider struct {
	ID          string
	Kind        AuthProviderKind
	Title       string
	Subtitle    string
	Linked      bool
	Primary     bool
	ActionLabel string
	ActionURL   string
}

func AuthProvidersFromDomain added in v0.1.17

func AuthProvidersFromDomain(
	providers []domain.AuthProvider,
	oauthProviders []oauth.OAuthProvider,
) []AuthProvider

type AuthProviderFlow added in v0.1.19

type AuthProviderFlow string
const (
	AuthProviderFlowLogin          AuthProviderFlow = "login"
	AuthProviderFlowLink           AuthProviderFlow = "link"
	AuthProviderFlowProof          AuthProviderFlow = "proof"
	AuthProviderFlowReauthenticate AuthProviderFlow = "reauthenticate"
)

type AuthProviderKind added in v0.1.17

type AuthProviderKind string
const (
	AuthProviderPassword  AuthProviderKind = "password"
	AuthProviderGoogle    AuthProviderKind = "google"
	AuthProviderApple     AuthProviderKind = "apple"
	AuthProviderMicrosoft AuthProviderKind = "microsoft"
)

type DeviceKind

type DeviceKind = useragent.DeviceKind

func DeviceKindFromUserAgent

func DeviceKindFromUserAgent(ua string) DeviceKind

type Passkey added in v0.1.21

type Passkey struct {
	ID         uuid.UUID
	Name       string
	CreatedAt  string
	LastUsedAt string
	CanDelete  bool
}

func PasskeysFromDomain added in v0.1.21

func PasskeysFromDomain(passkeys []domain.Passkey, totalAuthMethods int) []Passkey

type Session

type Session struct {
	ID         uuid.UUID
	IsCurrent  bool
	Title      string
	Subtitle   string
	DeviceKind DeviceKind
}

func SessionFromDomain

func SessionFromDomain(s domain.Session, currentSessionID uuid.UUID) Session

Jump to

Keyboard shortcuts

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