app

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2025 License: MIT Imports: 23 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 {
	SlackClient *slack.Client
	// contains filtered or unexported fields
}

App represents the main application instance

func New

func New(ctx context.Context, cfg *config.Config) (*App, error)

New creates a new application instance

func (*App) Config

func (app *App) Config() *config.Config

Config returns the application configuration

func (*App) NewTUI

func (app *App) NewTUI() TUIModel

NewTUI creates a new TUI model with the given app

func (*App) Shutdown

func (app *App) Shutdown()

Shutdown performs a graceful shutdown of the application

type FocusLevel

type FocusLevel int

FocusLevel represents whether the user is navigating at tab level or inside a view. FocusLevelTab allows switching tabs with Tab key, while FocusLevelView allows Tab to cycle through elements within the active view.

const (
	FocusLevelTab FocusLevel = iota
	FocusLevelView
)

type PollType

type PollType int

PollType represents the type of polling to perform

const (
	PollTypeCurrentChannel PollType = iota
	PollTypeSidebar
	PollTypeActivity
)

type PollingConfig

type PollingConfig struct {
	CurrentChannelInterval time.Duration
	SidebarInterval        time.Duration
	ActivityInterval       time.Duration
	Enabled                bool
}

PollingConfig holds configuration for different polling intervals

func DefaultPollingConfig

func DefaultPollingConfig() PollingConfig

DefaultPollingConfig returns the default polling configuration

type TUIModel

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

TUIModel holds the main application state

func (TUIModel) Init

func (m TUIModel) Init() tea.Cmd

Init initializes the application

func (TUIModel) Update

func (m TUIModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update handles messages and updates the model

func (TUIModel) View

func (m TUIModel) View() string

View renders the application UI

Directories

Path Synopsis