Versions in this module Expand all Collapse all v3 v3.0.1 Nov 15, 2026 v3.0.0 Nov 14, 2026 Changes in this version + const AllFlagUsage + const MaxPromptOptions + const ScopeAll + const ScopeDestination + const ScopeGlobal + const ScopeMerged + const ScopeRead + const ScopeResource + const ShowAllLimit + const StartFlagUsage + func AbortUploadSession(ctx context.Context, c *client.Client, kind, sessionID string) + func AllowPrompt(cmd *cobra.Command) bool + func AppendQuery(path string, extra url.Values) string + func ApplyPaginationParams(cmd *cobra.Command, path string, p ListParams) (string, error) + func AssumeYes(cmd *cobra.Command) bool + func ClientFromCommand(cmd *cobra.Command) (*client.Client, error) + func ConfirmOrCancel(cmd *cobra.Command, opts ConfirmOptions) (bool, error) + func DecodeJSON(resp *http.Response, out any) error + func EffectiveLimit(cmd *cobra.Command, resource, flagName string, flagValue, fallbackDefault int) int + func EnsureSuccessStatus(resp *http.Response) error + func EnumVarP[T ~string](cmd *cobra.Command, flags *pflag.FlagSet, p *T, name, shorthand string, ...) + func ExclusiveFlags(cmd *cobra.Command, names ...string) error + func JSONOutputEnabled(cmd *cobra.Command) bool + func LooksLikeIDPrefix(identifierLower string) bool + func PrintJSON(v any) error + func PrintRawJSON(body []byte) error + func PrintTable(cmd *cobra.Command, headers []string, rows [][]string, ...) error + func ReadJSONBody(resp *http.Response) ([]byte, error) + func RunDelete(cmd *cobra.Command, c *client.Client, spec DeleteSpec) error + func RunEnvironments(cmd *cobra.Command, args []string, run func(*cobra.Command, []string) error, ...) error + func RunList[T any](cmd *cobra.Command, c *client.Client, spec ListSpec[T]) error + func RunMerged(cmd *cobra.Command, args []string, run func(*cobra.Command, []string) error) error + func RunScoped(cmd *cobra.Command, args []string, run func(*cobra.Command, []string) error) error + func Run[T any](cmd *cobra.Command, c *client.Client, spec Spec[T]) error + func Scope(cmd *cobra.Command) string + func SetResource[D, S any](ref ResourceRef[D, S], commands ...*cobra.Command) + func SetScope(scope string, commands ...*cobra.Command) + func UnauthClientFromCommand(cmd *cobra.Command) (*client.Client, error) + func UploadFileInChunks(ctx context.Context, c *client.Client, kind, filePath string, ...) (string, error) + type ConfirmOptions struct + Force bool + Label string + type DeleteSpec struct + Body any + FailureMessage string + Force bool + Path string + Prompt string + SuccessMessage string + type EnumValue struct + func (v *EnumValue[T]) Set(value string) error + func (v *EnumValue[T]) String() string + func (v *EnumValue[T]) Type() string + type HTTPStatusError struct + Body string + StatusCode int + func (e *HTTPStatusError) Error() string + type ListParams struct + All bool + FallbackDefault int + Limit int + Resource string + Start int + type ListSpec struct + Endpoint string + Headers []string + Params ListParams + Query url.Values + Resource string + Row func(T) []string + type ResourceRef struct + EnvironmentScoped bool + Exact func(item S, identifierLower, original string) bool + GetPath func(envID, identifier string) string + IDHint string + IDOf func(S) string + IdentifierOf func(D) string + Label func(S) string + ListCmd string + ListPath func(envID string) string + Matches func(item S, identifierLower, original string) bool + Plural string + Promote func(S) *D + SearchCandidates func(context.Context, *client.Client, string) ([]S, error) + SelectCandidate func([]S, string, bool) (*S, error) + Singular string + Validate func(D, string) error + func (ref ResourceRef[D, S]) Fetch(ctx context.Context, c *client.Client, identifier string, allowPrompt bool) (*D, error) + func (ref ResourceRef[D, S]) Resolve(ctx context.Context, c *client.Client, identifier string, allowPrompt bool) (*D, bool, error) + type Spec struct + Body any + FailureMessage string + Method string + Path string + Render func(T) error + Timeout time.Duration + type TableSummary struct + Paginated bool + Resource string + Total int64