Documentation
¶
Index ¶
- type Action
- func (x *Action) Configure(ctx context.Context) error
- func (x *Action) Flags() []cli.Flag
- func (x *Action) Helper() *cli.Command
- func (x *Action) LogValue() slog.Value
- func (x *Action) Name() string
- func (x *Action) Prompt(ctx context.Context) (string, error)
- func (x *Action) Run(ctx context.Context, name string, args map[string]any) (map[string]any, error)
- func (x *Action) SetOAuthToken(token string)
- func (x *Action) SetSlackClient(client interfaces.SlackClient)
- func (x *Action) SetTestURL(url string)
- func (x *Action) Specs(ctx context.Context) ([]gollem.ToolSpec, error)
- type Attachment
- type ChannelInfo
- type Message
- type MessagesBlock
- type Paging
- type SearchMessageItem
- type SearchOptions
- type SearchOutput
- type SearchResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct {
// contains filtered or unexported fields
}
func (*Action) SetOAuthToken ¶
SetOAuthToken sets the OAuth token (for testing)
func (*Action) SetSlackClient ¶
func (x *Action) SetSlackClient(client interfaces.SlackClient)
func (*Action) SetTestURL ¶
SetTestURL sets a custom base URL (for testing)
type Attachment ¶
type Attachment struct {
ID int `json:"id"`
Pretext string `json:"pretext,omitempty"`
Text string `json:"text,omitempty"`
}
Attachment represents message attachments
type ChannelInfo ¶
ChannelInfo represents channel information
type Message ¶
type Message struct {
Type string `json:"type"`
Channel ChannelInfo `json:"channel"`
User string `json:"user"`
Username string `json:"username"`
Text string `json:"text"`
Timestamp string `json:"ts"`
Permalink string `json:"permalink"`
Team string `json:"team,omitempty"`
Attachments []Attachment `json:"attachments,omitempty"`
}
Message represents a single message in search results
type MessagesBlock ¶
type MessagesBlock struct {
Total int `json:"total"`
Pagination Paging `json:"paging"`
Matches []Message `json:"matches"`
}
MessagesBlock represents the messages block in search response
type Paging ¶
type Paging struct {
Count int `json:"count"`
Total int `json:"total"`
Page int `json:"page"`
Pages int `json:"pages"`
}
Paging represents pagination information
type SearchMessageItem ¶
type SearchMessageItem struct {
Channel string `json:"channel"`
ChannelName string `json:"channel_name"`
User string `json:"user"`
UserName string `json:"user_name"`
Text string `json:"text"`
Timestamp string `json:"timestamp"`
Permalink string `json:"permalink"`
FormattedTime time.Time `json:"formatted_time,omitempty"`
}
SearchMessageItem represents a formatted message item for output
type SearchOptions ¶
type SearchOptions struct {
Query string `json:"query"`
Sort string `json:"sort,omitempty"` // score, timestamp
SortDir string `json:"sort_dir,omitempty"` // asc, desc
Count int `json:"count,omitempty"`
Page int `json:"page,omitempty"`
Highlight bool `json:"highlight,omitempty"`
}
SearchOptions represents the options for Slack message search
type SearchOutput ¶
type SearchOutput struct {
Total int `json:"total"`
Messages []SearchMessageItem `json:"messages"`
}
SearchOutput represents the tool output format
type SearchResponse ¶
type SearchResponse struct {
OK bool `json:"ok"`
Query string `json:"query"`
Messages MessagesBlock `json:"messages"`
Error string `json:"error,omitempty"`
}
SearchResponse represents the response from Slack search API
Click to show internal directories.
Click to hide internal directories.