viewmodel

package
v0.1.23 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: MIT Imports: 6 Imported by: 0

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"
)

type AuthProviderKind added in v0.1.17

type AuthProviderKind string
const (
	AuthProviderPassword AuthProviderKind = "password"
	AuthProviderGoogle   AuthProviderKind = "google"
)

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