Documentation
¶
Index ¶
- func DownloadAttachments(attachments []api.Attachment, id int, output string, ...) error
- func LoadConfigAndClient() (*config.Config, *api.Client, error)
- func ResolveProjectKey(cfg *config.Config, flag string) (string, error)
- func SaveAttachments(attachments []api.Attachment, id int, output string, ...) ([]string, error)
- func SaveFile(dir, name, fallback string, data []byte) (string, error)
- func StripControl(s string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadAttachments ¶ added in v1.0.1
func DownloadAttachments(attachments []api.Attachment, id int, output string, dl func(int) (string, []byte, error)) error
DownloadAttachments saves the attachments like SaveAttachments and prints the saved paths.
func LoadConfigAndClient ¶
LoadConfigAndClient loads the config file and creates an API client for the currently active space. Returns an error if not authenticated.
func ResolveProjectKey ¶ added in v1.0.1
ResolveProjectKey returns the --project flag value or the default project.
func SaveAttachments ¶ added in v1.1.0
func SaveAttachments(attachments []api.Attachment, id int, output string, dl func(int) (string, []byte, error)) ([]string, error)
SaveAttachments saves the attachments (all of them, or only id when non-zero) into output and returns the saved paths, including those saved before an error. It never writes to stdout, which is the protocol channel of the MCP server.
func SaveFile ¶ added in v1.0.1
SaveFile writes data into dir using only a sanitized base name of name, so a server-supplied name cannot escape dir. It never overwrites or follows an existing path: on collision it appends " (n)". fallback is used when name is unusable.
func StripControl ¶ added in v1.0.1
StripControl removes terminal control and bidi/format characters (see api.StripControl).
Types ¶
This section is empty.