Documentation
¶
Overview ¶
Package cmd holds the cobra command tree for the mio CLI. root.go defines the root command, the persistent global flags every subcommand inherits, and the shared per-invocation context (resolved config + client + output options) that resource commands pull via cmdContext.
Resource command files (products.go, contacts.go, …) self-register their command trees in their own init() via rootCmd.AddCommand, so adding a resource never requires editing this file. This is the property that lets 15 agents add resources in parallel without merge conflicts on a shared registry.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Execute ¶
func Execute() error
Execute runs the root command and returns the error (if any) for main.go to map onto a process exit code. It does not call os.Exit itself.
Types ¶
type AttrDefInput ¶ added in v0.10.0
type AttrDefInput struct {
Name *string
Slug *string
FieldType *string // → type (validated enum)
Description *string
IsContactEditable *bool // → is_contact_editable
Position *int
}
AttrDefInput carries the resolved attribute-definition create attributes, decoupled from *cobra.Command so both `contact-attributes create` and the scaffold (MIO-2543) can build the same POST body. Each pointer is nil when the flag was unset. The required-flag ergonomics (name/slug/field-type must be set) stay with the command; this builder validates the field-type VALUE.
type HubConfigInput ¶ added in v0.10.0
type HubConfigInput struct {
IsInProfile *bool // → is_in_profile
IsInOnboarding *bool // → is_in_onboarding
IsRequired *bool // → is_required
IsReadOnly *bool // → is_read_only
IsSearchable *bool // → is_searchable
}
HubConfigInput carries the hub-config boolean flags, decoupled from *cobra.Command. Each pointer is nil when the flag was unset (partial-update / upsert semantics preserved).
type PageInput ¶ added in v0.10.0
type PageInput struct {
Title *string
Slug *string
Type *string
IsHome *bool // → is_homepage
Position *int // must be >= 0
Privacy *string // validated enum
Settings map[string]any // → settings (parsed JSON object)
Meta map[string]any // → meta (parsed JSON object)
}
PageInput carries the resolved create/update page attributes, decoupled from *cobra.Command so both the `pages` commands and the scaffold homepage step (MIO-2543) can build the same write body. Each scalar pointer is nil when the flag was unset; Settings/Meta are the already-parsed JSON objects (nil = unset).
type PlaylistInput ¶ added in v0.10.0
type PlaylistInput struct {
Title *string
Description *string
Visibility *string
HubID *string // → hub_id
}
PlaylistInput carries the resolved playlist create attributes, decoupled from *cobra.Command so both `media playlists create` and the scaffold (MIO-2543) can build the same POST body. Each pointer is nil when the flag was unset. Playlists are create-only (no idempotency marker needed, per O1 decision c).
type SpaceInput ¶ added in v0.10.0
type SpaceInput struct {
Name *string
Slug *string
Description *string
Icon *string
Color *string
SegmentID *string // → segment_id
IsDefault *bool // → is_default
IsPinned *bool // → is_pinned
AccessLevel *string // → access_level (validated enum)
PostingPermission *string // → posting_permission (validated enum)
Position *int // must be >= 0
}
SpaceInput carries the resolved create/update space attributes, decoupled from *cobra.Command so both the `community spaces` commands and the scaffold (MIO-2543) can build the same write body. Each pointer is nil when the corresponding flag was unset (preserving partial-update semantics); a non-nil pointer carries the value to write.
Source Files
¶
- accessrules.go
- activity.go
- analytics.go
- apikeys.go
- automations.go
- checkout.go
- checkout_commerce.go
- community.go
- community_moderation.go
- community_spaces.go
- config.go
- contactattributes.go
- contactid.go
- contacts.go
- content.go
- coupons.go
- coupons_products.go
- email.go
- externalloginproviders.go
- flags.go
- gendocs.go
- hubmemberships.go
- hubmemberships_p2.go
- hubs.go
- hubs_blob_keys.go
- hubs_navigation.go
- hubs_scaffold.go
- hubs_update_blobs.go
- login.go
- media.go
- media_attachments.go
- media_playlist_cover.go
- media_playlist_items.go
- media_transcripts.go
- media_upload.go
- oauthclients.go
- pages.go
- pages_catalog.go
- pages_tree.go
- pages_tree_validate.go
- pages_write.go
- products.go
- products_deliverables.go
- register.go
- roles.go
- root.go
- segments.go
- skills.go
- tags.go
- teams.go
- update.go
- users.go
- verifieddomains.go
- webhookendpoints.go
- whoami.go