Documentation
¶
Index ¶
- Variables
- func AtomicRename(src, dst string) error
- func FormatCardAsMarkdown(card *api.Card, comments []api.Comment) (string, error)
- func FormatCommentsForDisplay(comments []api.Comment) (string, error)
- func FormatDocumentAsMarkdown(document *api.Document, comments []api.Comment) (string, error)
- func FormatMessageAsMarkdown(message *api.Message, comments []api.Comment) (string, error)
- func FormatTodoAsMarkdown(todo *api.Todo, comments []api.Comment) (string, error)
- func ShowInPager(content string, opts *PagerOptions) error
- func SortProjectsByName(projects []api.Project)
- func ValidateColor(color string) (string, error)
- func WriteToPager(opts *PagerOptions) (io.WriteCloser, error)
- type PagerOptions
- type UserResolver
Constants ¶
This section is empty.
Variables ¶
var ValidBasecampColors = []string{
"white", "red", "orange", "yellow", "green", "blue", "aqua", "purple", "gray", "pink", "brown",
}
ValidBasecampColors contains all colors supported by the Basecamp API Reference: https://github.com/basecamp/bc3-api
Functions ¶
func AtomicRename ¶ added in v0.15.2
AtomicRename renames src to dst atomically where possible. On POSIX systems os.Rename replaces an existing dst atomically. On Windows os.Rename fails when dst already exists, so we remove the destination first and then rename. This leaves a small window where dst doesn't exist, but it prevents silent failures that would strand the temp file and leave the old config in place.
func FormatCardAsMarkdown ¶ added in v0.7.2
FormatCardAsMarkdown formats a card with all its comments as AI-optimized markdown
func FormatCommentsForDisplay ¶ added in v0.7.2
FormatCommentsForDisplay formats a list of comments for display in a pager
func FormatDocumentAsMarkdown ¶ added in v0.7.2
FormatDocumentAsMarkdown formats a document with all its comments as AI-optimized markdown
func FormatMessageAsMarkdown ¶ added in v0.7.2
FormatMessageAsMarkdown formats a message with all its comments as AI-optimized markdown
func FormatTodoAsMarkdown ¶ added in v0.7.2
FormatTodoAsMarkdown formats a todo with all its comments as AI-optimized markdown
func ShowInPager ¶
func ShowInPager(content string, opts *PagerOptions) error
ShowInPager displays content using the configured pager
func SortProjectsByName ¶
SortProjectsByName sorts a slice of projects alphabetically by name (case-insensitive)
func ValidateColor ¶ added in v0.11.3
ValidateColor checks if the provided color is valid for Basecamp resources It performs case-insensitive comparison and returns the lowercase color if valid
func WriteToPager ¶
func WriteToPager(opts *PagerOptions) (io.WriteCloser, error)
WriteToPager creates a writer that will display content through a pager
Types ¶
type PagerOptions ¶
type PagerOptions struct {
// Pager command to use (e.g., "less", "more")
Pager string
// Whether to force pager even if not a TTY
Force bool
// Whether to disable pager
NoPager bool
}
PagerOptions contains options for the pager
type UserResolver ¶
type UserResolver struct {
// contains filtered or unexported fields
}
UserResolver helps resolve user identifiers to Person objects
func NewUserResolver ¶
func NewUserResolver(client api.APIClient, projectID string) *UserResolver
NewUserResolver creates a new user resolver for a project
func (*UserResolver) ResolveUsers ¶
ResolveUsers resolves a list of user identifiers to person IDs Supports: - Email addresses: john@example.com - @mentions: @john (matches by name, case-insensitive) - Mixed: @john,jane@example.com