Documentation
¶
Overview ¶
Package chatsearch is the output half shared by `team chat search` and `channel search` (hadron-cli#1327): one page of references into a chat's history. The two commands differ only in how they address the chat.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextFlags ¶
ContextFlags returns the persistent flags that selected this search, quoted for the shell, so a printed read hint reads the SAME server (and, with withApp, the same team App) rather than whatever the environment resolves.
func MapError ¶
MapError is api.MapError plus the BAD_USER_INPUT code for `--limit` below 1, which the issue lists among the typed refusals a search passes through. It is scoped to these commands: BAD_USER_INPUT is the server's generic validation code, so no other command's error envelope changes.
Types ¶
type MatchDTO ¶
type MatchDTO struct {
Seq int `json:"seq"`
URN *string `json:"urn"`
NodeID string `json:"nodeId"`
ChannelID string `json:"channelId"`
ChannelIncarnation int `json:"channelIncarnation"`
}
MatchDTO is one hit: a reference, never a body or snippet.
type PageDTO ¶
type PageDTO struct {
ChannelID *string `json:"channelId"`
ChannelIncarnation *int `json:"channelIncarnation"`
Complete bool `json:"complete"`
Cursor *string `json:"cursor"`
Items []MatchDTO `json:"items"`
}
PageDTO is the stable --json shape of TeamChatSearchPage. Complete and Cursor are passed through untouched: complete is true only when the search reached the start of the history, and an empty page with complete=false means the server's scan bound fired and the search may continue with the cursor.
func FromGen ¶
func FromGen(p gen.ChatSearchPageFields) PageDTO
FromGen projects the generated page onto the DTO, so --json does not move when the client is regenerated.