core

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2025 License: MIT Imports: 4 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 {
	User           string
	Config         Config
	Cache          *Cache
	InitialLoading bool
	Client         *slack.Client
	MsgChan        chan tea.Msg
	CurrentChannel string
	Mutex          sync.RWMutex
}

type Attachment

type Attachment struct {
	ImageURL    string `json:"image_url,omitempty"`
	ThumbURL    string `json:"thumb_url,omitempty"`
	FromURL     string `json:"from_url,omitempty"`
	OriginalURL string `json:"original_url,omitempty"`
}

type Cache

type Cache struct {
	Users         map[string]*User
	Conversations map[string]*Conversation
}

type ChannelInfoLoadedMsg

type ChannelInfoLoadedMsg struct {
	Channel   *slack.Channel
	LatestMes string
}

type ChannelJoinedMsg

type ChannelJoinedMsg struct {
	Channel string
}

type ChannelLeftMsg

type ChannelLeftMsg struct {
	Channel string
}

type ChannelReadMsg

type ChannelReadMsg struct {
	ChannelID string
	LatestTs  string
	LastRead  string
}

type ChannelSelectedMsg

type ChannelSelectedMsg struct {
	Id string
}

type CloseErrorPopupMsg

type CloseErrorPopupMsg struct{}

type Config

type Config struct {
	Token  string `json:"token"`
	Cookie string `json:"cookie"`
	Theme  string `json:"theme"`
}

type Conversation

type Conversation struct {
	ID            string `json:"id"`
	Name          string `json:"name"`
	User          User   `json:"user"`
	UserPresence  string `json:"user_presence"`
	LastRead      string `json:"last_read"`
	LatestMessage string `json:"latest_message"`
	IsMember      bool   `json:"is_member"`
}

type DMsLoadedMsg

type DMsLoadedMsg struct {
	DMs []Conversation
}

type DeletedMessageMsg

type DeletedMessageMsg struct {
	DeletedTs string
}

type EditedMessageMsg

type EditedMessageMsg struct {
	Ts      string
	Content string
}

type FetchedCacheMsg

type FetchedCacheMsg struct {
	Users           map[string]*User
	Conversations   map[string]*Conversation
	SidebarChannels []Conversation
	SidebarDms      []Conversation
}

type File

type File struct {
	URLPrivate string `json:"url_private,omitempty"`
	Permalink  string `json:"permalink,omitempty"`
}

type GetUserMsg

type GetUserMsg struct {
	UserID string
}

type HandleEventMsg

type HandleEventMsg struct {
	Event any
}

type HistoryLoadedMsg

type HistoryLoadedMsg struct {
	Messages []Message
	LatestTs string
}

type InsertChannelInSidebarMsg

type InsertChannelInSidebarMsg struct {
	ChannelName string
	ChannelID   string
}

type Message

type Message struct {
	Ts          string
	ThreadId    string
	User        string
	Content     string
	Attachments []Attachment
	Files       []File
	Reactions   map[string][]string
	SubType     string
	ReplyCount  int
	ReplyUsers  []string
}

type NewMessageMsg

type NewMessageMsg struct {
	Message Message
}

type PresenceChangedMsg

type PresenceChangedMsg struct {
	DmID     string
	Presence string
}

type Reaction

type Reaction struct {
	Users []string
	Count int
}

type ReactionAddedMsg

type ReactionAddedMsg struct {
	MessageTs string
	Reaction  string
	User      string
}

type ReactionRemovedMsg

type ReactionRemovedMsg struct {
	MessageTs string
	Reaction  string
}

type ReactionScrollMsg

type ReactionScrollMsg struct {
	Added bool
}

type ThreadLoadedMsg

type ThreadLoadedMsg struct {
	Messages []Message
}

type User

type User struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type UserInfoLoadedMsg

type UserInfoLoadedMsg struct {
	User      *slack.User
	IsHistory bool
}

type WaitMsg

type WaitMsg struct {
	Msg      tea.Msg
	Duration time.Duration
}

Jump to

Keyboard shortcuts

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