viewmodel

package
v0.1.17 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 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

This section is empty.

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 AuthProviderKind added in v0.1.17

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

type DeviceKind

type DeviceKind string
const (
	DeviceDesktop DeviceKind = "desktop"
	DevicePhone   DeviceKind = "phone"
	DeviceTablet  DeviceKind = "tablet"
	DeviceUnknown DeviceKind = "unknown"
)

func DeviceKindFromUserAgent

func DeviceKindFromUserAgent(ua string) DeviceKind

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