Documentation
¶
Overview ¶
Package commands implements CLI commands for the Fizzy CLI.
Index ¶
- func Execute()
- func GetRootCmd() *cobra.Command
- func IsMachineOutput() bool
- func ResetTestMode()
- func SetTestConfig(token, account, apiURL string)
- func SetTestCreds(store *credstore.Store)
- func SetTestFormat(format output.Format)
- func SetTestProfiles(store *profile.Store)
- func SetTestSDK(baseURL string)
- func SetVersion(v string)
- func TestOutput() string
- type Account
- type Attachment
- type Board
- type Breadcrumb
- type CommandResult
- type CommentAttachment
- type SkillLocation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsMachineOutput ¶
func IsMachineOutput() bool
IsMachineOutput returns true when output should be treated as machine-consumable. True when any machine format flag is set, --agent is set, or stdout/stdin is not a TTY.
func SetTestConfig ¶
func SetTestConfig(token, account, apiURL string)
SetTestConfig sets the config for testing.
func SetTestCreds ¶
SetTestCreds sets the credential store for testing.
func SetTestFormat ¶
SetTestFormat reconfigures the output writer with the given format. Must be called after SetTestMode.
func SetTestProfiles ¶
SetTestProfiles sets the profile store for testing.
func SetTestSDK ¶
func SetTestSDK(baseURL string)
SetTestSDK configures the commands package for SDK-based testing. Pass an httptest.Server URL and the SDK will be created pointing at it.
func SetVersion ¶
func SetVersion(v string)
SetVersion sets the CLI version used for `--version` and `version`.
func TestOutput ¶
func TestOutput() string
TestOutput returns the raw output from the last command execution. Useful for verifying non-JSON format output.
Types ¶
type Attachment ¶
type Attachment struct {
Index int `json:"index"`
Filename string `json:"filename"`
ContentType string `json:"content_type"`
Filesize int64 `json:"filesize"`
Width int `json:"width,omitempty"`
Height int `json:"height,omitempty"`
DownloadURL string `json:"download_url"`
SGID string `json:"sgid"`
}
Attachment represents a parsed attachment from description_html
type Breadcrumb ¶
type Breadcrumb = output.Breadcrumb
Breadcrumb is a type alias for output.Breadcrumb.
type CommandResult ¶
CommandResult holds the result of a command execution for testing.
func SetTestMode ¶
func SetTestMode(mockClient client.API) *CommandResult
SetTestMode configures the commands package for testing. It sets a mock client factory and captures results instead of exiting.
type CommentAttachment ¶
type CommentAttachment struct {
Attachment
CommentID string `json:"comment_id"`
}
CommentAttachment extends Attachment with comment context
type SkillLocation ¶
SkillLocation represents a predefined skill installation target.
Source Files
¶
- attachment.go
- auth.go
- banner.go
- board.go
- card.go
- column.go
- columns.go
- commands.go
- comment.go
- comment_attachment.go
- completion.go
- identity.go
- markdown.go
- migrate.go
- notification.go
- pin.go
- pseudocolumns.go
- reaction.go
- root.go
- sdk_errors.go
- search.go
- setup.go
- setup_agents.go
- signup.go
- skill.go
- step.go
- tag.go
- upload.go
- user.go
- version.go
- webhook.go