app

package
v1.0.0-beta Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

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

func New

func New() *App

func (*App) DefaultText

func (a *App) DefaultText() (domain.Text, error)

DefaultText returns the default text entry (metadata + content).

func (*App) DeleteCategory

func (a *App) DeleteCategory(id string) error

DeleteCategory removes a category entry by ID.

func (*App) DeleteText

func (a *App) DeleteText(id string) error

DeleteText removes a text entry by ID.

func (*App) GetSettings

func (a *App) GetSettings() (domain.Settings, error)

GetSettings returns current user settings.

func (*App) ListSessions

func (a *App) ListSessions(limit int) ([]domain.TypingSession, error)

ListSessions returns recent typing sessions (newest first).

func (*App) SaveCategory

func (a *App) SaveCategory(cat *domain.Category) error

SaveCategory creates a new category entry.

func (*App) SaveSession

func (a *App) SaveSession(payload *domain.SessionPayload) error

SaveSession persists a completed typing session.

func (*App) SaveText

func (a *App) SaveText(text *domain.Text) error

SaveText creates a new text entry.

func (*App) Shutdown

func (a *App) Shutdown(ctx context.Context)

func (*App) Startup

func (a *App) Startup(ctx context.Context) error

func (*App) SupportedLanguages

func (a *App) SupportedLanguages() []domain.LanguageInfo

SupportedLanguages returns the list of supported programming languages.

func (*App) Text

func (a *App) Text(id string) (domain.Text, error)

Text returns text content by identifier.

func (*App) TextLibrary

func (a *App) TextLibrary() (domain.TextLibrary, error)

TextLibrary returns library metadata for UI navigation.

func (*App) UpdateSetting

func (a *App) UpdateSetting(key string, value any) error

UpdateSetting modifies a single setting by key and persists the change.

func (*App) UpdateText

func (a *App) UpdateText(text *domain.Text) error

UpdateText modifies an existing text entry.

Jump to

Keyboard shortcuts

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